Page 4 of 15 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 147
  1. #31
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: Set number of products displayed per page (support thread)

    Quote Originally Posted by opengrave View Post
    This is showing up on my site like this:

    Number of Products Per Page:
    Number of Products Per Page: 21 42 60 81 102


    How can I get rid of the top line so that it only says "Number of Products Per Page:" one time?
    Go into your admin > Tools > Developers Tool Kit and search for "Number of Products Per Page". The Tool Kit will show you which file you need to edit in order to remove the duplicate verbiage.

    I'm running Zen Cart 1.3.9f with tons of add-ons so mine may differ, but when I did it, it showed the file that needed to be edited was includes/templates/MY-CUSTOM-FILES/templates/tpl_modules_product_listing.php. You probably have TEXT_DISPLAY_STEPS_NUMBER_OF_PRODUCTS three times when it should only be in the template twice (one at the top and one at the bottom).

  2. #32
    Join Date
    Nov 2010
    Location
    Los Angeles, Ca
    Posts
    5
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    Hello.

    I am having an issue installing this mod. I am running v1.3.9h. I have looked endlessly, and still am, on a fix to my problem. I followed the readme.txt but when I get to the line where I must replace $max_results= in the product_listing.php file, that variable is not listed in that file. Can someone please help me with this. On the site you will see: Show Number of Products Per Page: 0 0 0 All and they link to nothing. Here is the site.

  3. #33
    Join Date
    Dec 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    Hi Guys

    I got this working on the site as expected, thank you so much for this contribution.

    I would like to take it one step forward and instead of having text links for items per page, I would like to have images displayed.

    I have nearly got it but i think I have spent to much time on this now and Im just going backwards and forwards over my code and plus to much coffee doesn't help!

    The code I have so far is:

    Code:
    if($step != '6') {
    $result .= '<a href="'.zen_href_link($page, zen_get_all_get_params(array('max_display',$listing_page_name)))."&amp;max_display=$max_display".'" title="Show All Products" style="text-align:center; margin-left:40px;"><img src="includes/templates/TEMPLATENAME/images/button_showall.png" width="150" height="20" alt="Show All Products" /></a> ';
    			
    			}  
    			
    elseif($step = 'All') {
    $result .= '<a href="'.zen_href_link($page, zen_get_all_get_params(array('max_display',$listing_page_name)))."&amp;max_display=$max_display".'" title="Show 6 Products" style="text-align:center; margin-left:40px;"><img src="includes/templates/TEMPLATENAME/images/button_show6.png" width="150" height="20" alt="Show 6 Products" /></a> ';
    	}
    So my intention with this is:

    1. When you arrive on the page, it is displayed as 6 prods per page and only the "Show All" button is displayed plus the page navigation i.e. 1 2 3 4 [Next >>]
    2. If the visitor clicks "Show All" the Image for "Show 6" is displayed
    3. If the Visitor is in "Show All" Mode, then the "Show 6" Button will display


    But I'm stuck. Any help much appreciated.

    Thanks in advance.

  4. #34
    Join Date
    Nov 2010
    Location
    Los Angeles, Ca
    Posts
    5
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    kid,
    what version of zen are you using? where did you replace the $max_results= ??

  5. #35
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Set number of products displayed per page (support thread)

    Small point:

    elseif($step = 'All') {

    should be

    elseif($step == 'All') {


    And really, the logic seems odd...
    If $step is '6', neither part will be executed, and if $step is 'All", it will not be '6' and only the first part will be executed. The second part can never be executed.
    Last edited by gjh42; 18 Nov 2010 at 03:32 AM.

  6. #36
    Join Date
    Dec 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    Hi Guys

    We are using v1.3.9h

    The max display comes from:

    includes/functions/extra_functions/max_display.php

    It is the same kind of module as http://www.zen-cart.com/index.php?ma...roducts_id=716

    Thanks for your help

  7. #37
    Join Date
    Nov 2010
    Location
    Los Angeles, Ca
    Posts
    5
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    in my includes/functions/extra_functions/ i do not have a max_display.php file. is that where you input the $max_results line? the instructions say to edit /includes/modules/YOUR_TEMPLATE/product_listing.php am I missing something/don't know how to read? let me know.

    Thanks

  8. #38
    Join Date
    Dec 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    Sorry, I am using an older version of this module, all thats different is the name of the files. The file in the new version is named set_num_products.php. both the new and old module use $max_display

    the original code that came with the module is below:

    Code:
    	$result .= '<a href="'.zen_href_link($page, zen_get_all_get_params(array('max_display',$listing_page_name)))."&amp;max_display=$max_display".'">'.$step.'</a> ';
    and I am trying to turn the links into images with the following code:

    Code:
    if($step != '6') {
    $result .= '<a href="'.zen_href_link($page, zen_get_all_get_params(array('max_display',$listing_page_name)))."&amp;max_display=$max_display".'" title="Show All Products" style="text-align:center; margin-left:40px;"><img src="includes/templates/TEMPLATENAME/images/button_showall.png" width="150" height="20" alt="Show All Products" /></a> ';
    			
    			}  
    			
    elseif($step = 'All') {
    $result .= '<a href="'.zen_href_link($page, zen_get_all_get_params(array('max_display',$listing_page_name)))."&amp;max_display=$max_display".'" title="Show 6 Products" style="text-align:center; margin-left:40px;"><img src="includes/templates/TEMPLATENAME/images/button_show6.png" width="150" height="20" alt="Show 6 Products" /></a> ';
    	}
    	}
    but my intention with this is:

    1. When you arrive on the page, it is displayed as 6 prods per page and only the "Show All" button is displayed plus the page navigation i.e. 1 2 3 4 [Next >>]
    2. If the visitor clicks "Show All" the Image for "Show 6" is displayed
    3. If the Visitor is in "Show All" Mode, then the "Show 6" Button will display


    But I'm stuck. Any help much appreciated.

  9. #39
    Join Date
    Nov 2010
    Location
    Los Angeles, Ca
    Posts
    5
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    I understand that you are trying to put images instead of the text but how did you get it to work? how did you complete this step
    Edit /includes/modules/YOUR_TEMPLATE/product_listing.php with the following code

    Find:
    $max_results = (PRODUCT_LISTING_LAYOUT_STYLE=='columns' && PRODUCT_LISTING_COLUMNS_PER_ROW>0) ? (PRODUCT_LISTING_COLUMNS_PER_ROW * (int)(MAX_DISPLAY_PRODUCTS_LISTING/PRODUCT_LISTING_COLUMNS_PER_ROW)) : MAX_DISPLAY_PRODUCTS_LISTING;

    Replace by:
    $max_results = (PRODUCT_LISTING_LAYOUT_STYLE=='columns' && PRODUCT_LISTING_COLUMNS_PER_ROW>0) ? (PRODUCT_LISTING_COLUMNS_PER_ROW * (int)($_SESSION['product_listing_max_display']/PRODUCT_LISTING_COLUMNS_PER_ROW)) : $_SESSION['product_listing_max_display'];

    where did you find the $max_results line? there is no $ max_results in my Edit /includes/modules/YOUR_TEMPLATE/product_listing.php file.

  10. #40
    Join Date
    Dec 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: Set number of products displayed per page (support thread)

    I already have the following code in my override folder for product_listing.php

    $max_results = (PRODUCT_LISTING_LAYOUT_STYLE=='columns' && PRODUCT_LISTING_COLUMNS_PER_ROW>0) ? (PRODUCT_LISTING_COLUMNS_PER_ROW * (int)($_SESSION['product_listing_max_display']/PRODUCT_LISTING_COLUMNS_PER_ROW)) : $_SESSION['product_listing_max_display'];

    The module is working as it was intented to, but I want to change text links to images but only show the option relevant.

    i.e.
    if six products are displayed - show the "display all products" image only
    if all products displayed - show the "display 6 products" image only

 

 
Page 4 of 15 FirstFirst ... 2345614 ... LastLast

Similar Threads

  1. v151 Option to select number of products displayed per page
    By DeeL in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 6 Mar 2013, 03:09 AM
  2. v151 Error after trying to install Set Number of products displayed
    By DeeL in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 8 Feb 2013, 07:08 AM
  3. Changing number of products displayed per category
    By dpet102 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jun 2009, 06:45 PM
  4. where to set number of products per page?
    By bronwen in forum Basic Configuration
    Replies: 1
    Last Post: 25 Jul 2007, 11:15 PM
  5. Allow user to set "Number of Products Per Page"?
    By yellow1912 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Apr 2007, 10:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR