WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
number of products on page - can't change (19 posts)

  1. kapara
    Member
    Posted 1 year ago #

    hi

    i saw the link:
    http://wcdocs.woothemes.com/snippets/change-number-of-products-displayed-per-page/

    wherever i paste it - it doesn't work.
    where should i paste it inside functions.php?

    in the script there's "24" and "20".
    what does each number do?

    can't i change the number of products from the admin?

    thanks

    http://wordpress.org/extend/plugins/woocommerce/

  2. samueljeden
    Member
    Posted 1 year ago #

    add_filter('loop_shop_per_page', 'show_products_per_page );

    function show_products_per_page() {

    return 20;

    }

    Change the 20 to your desired amount...
    this should be placed in your themes functions.php

  3. kapara
    Member
    Posted 1 year ago #

    please help, i don't speak PHP.

    Where do i paste it? before something? after something?

    thanks

    lenny

  4. samueljeden
    Member
    Posted 1 year ago #

    Lenny,

    in your WordPress admin, in the appearance -> editor... go to your functions.php file...

    at the bottom before the final ?>

    copy and paste what i have put above.

  5. kapara
    Member
    Posted 1 year ago #

    i do it and get an error:

    The website encountered an error while retrieving (my url)/wp-admin/theme-editor.php?file=functions.php&theme=twentytwelve&scrollto=31488&updated=true. It may be down for maintenance or configured incorrectly.

    sorry, thanks.

    besides, i now see only part of the products, why no arrow or numbering to see the rest?

    thanks
    again

  6. samueljeden
    Member
    Posted 1 year ago #

    can you provide a url to your website?

  7. kapara
    Member
    Posted 1 year ago #

    it's a tee shirts shop: http://www.u-tees.me/

    it's under construction

  8. samueljeden
    Member
    Posted 1 year ago #

    Try adding the code again

    add_filter('loop_shop_per_page', 'show_products_per_page' );
    
    function show_products_per_page() {
    return 20;
    }
  9. kapara
    Member
    Posted 1 year ago #

    yeiiiiiii

    works!!!!!!

    great, thanks.

  10. kapara
    Member
    Posted 1 year ago #

    wait, one more thing...
    (:

    i currently have 70 products in the shop.
    i write 99, BUT only see 32 products.

    Without the change to functions.php i also saw only 32 products.
    how do i enable 99 ?

    the script enables me to show less than 32, but not more than 32.

    is there a limit somewhere?

    thanks

  11. kapara
    Member
    Posted 1 year ago #

    AND, if i write 99, the links to next and back disapper.

    see the site now, the script says 99, i only see 32 and no links to next.

    thanks

  12. samueljeden
    Member
    Posted 1 year ago #

    possibly because there is only 70 products? try limiting it to 60.

  13. kapara
    Member
    Posted 1 year ago #

    in the script i wrote the exact number of products.

    it still shows only 32 (as you can see) and no numbering or arrows

    thanks

  14. samueljeden
    Member
    Posted 1 year ago #

    hmmm, very strange. just tested this on my install and i can see in excess on 32 products in my list :/ and it works fine.

    Could be a theme issue, do you have any snippets for anything else that could be conflicting?

    What version are you using?

  15. kapara
    Member
    Posted 1 year ago #

    wp 3.5
    woocommerce 1.6.6

  16. kapara
    Member
    Posted 1 year ago #

    it seems as if maybe the page stops loading?

    all the internal pages show at the buttom some link to WP (it's a theme without a footer) (twenty twelve).
    and a link to another plugin i use.

    On the homepage ("shop" page) i don't see the links on the buttom.

  17. samueljeden
    Member
    Posted 1 year ago #

    There is a problem with something (unrelated to WC) in the final product i see there is avascript which is stopping the rest from outputting < - this looks theme related to me.

    <li class="product first">
    
    	<a href="http://www.u-tees.me/shop/tee-shirts-for-men/i-heart-me/">
    
    		<img width="300" height="300" src="http://www.u-tees.me/wp-content/uploads/2012/11/i-love-me-b-300x300.jpg" class="attachment-shop_catalog wp-post-image" alt="i-love-me-b">
    		<h3>I Heart Me</h3>
    
    	<span class="price"><span class="amount">$18.99</span></span>
    
    	</a>
    
    	<script src="http://stats.wordpress.com/e-201252.js" type="text/javascript"></script>
    	<script type="text/javascript">
    	st_go({v:'ext',j:'1:2.0.4',blog:'42070187',post:'0',tz:'0'});
    	var load_cmc = function(){linktracker_init(42070187,0,2);};
    	if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc);
    	else load_cmc();
    	</script><img id="wpstats" src="http://stats.wordpress.com/g.gif?host=www.u-tees.me&rand=0.7636764745693654&v=ext&j=1%3A2.0.4&blog=42070187&post=0&tz=0&ref=http%3A//wordpress.org/support/topic/number-of-products-on-page-cant-change%3Freplies%3D15" alt=""></li>

    Change your theme to a default theme.. NON-Customized and see what happens.

  18. kapara
    Member
    Posted 1 year ago #

    ahahah

    this js comes from src="http://stats.wordpress.com
    which is jetpack.

    i deactivated jetpack and - voila - now i see all products.

    BUT BUT BUT...

    jetpack allowed me to change some important css thrugh appearance.
    now i don't have it.
    i can't continuwe without it.

    i will have to build a child theme or some other way to change the css, or disable stats in jetpack, what do you think?

    I don't know how to disable only stats in jetpack?
    i'm not sure it's possible

    thanks

  19. samueljeden
    Member
    Posted 1 year ago #

    To be completely honest, i dont use jetpack so i cannot tell you if theres a way to only disable stats in jetpack..

    but we have found your issue now :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic