Results 1 to 10 of 147

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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.

  4. #4
    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.

  5. #5
    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

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

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

    Does anybody have any ideas about this one?

    All I want to do is hide the image that is dispalying that is not 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

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    I am not familiar with this code, but something that stands out is that you are using:
    Code:
    elseif($step = 'All') {
    what happens if you change that to:
    Code:
    elseif($step == 'All') {
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

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

    Version 1.3a was just uploaded

    Bug Fix - Changed ADMIN CONFIG to match what was added to configuration. Post #122

    Display Fix - Added existing class "back" so the links/drop-down doesn't clobber the next/previous links. Post #120

    Clean Up - Cleaned up the code in Example File (/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_modules_product_listing.php) for easier merging.

    You can see the DEMO & DOWNLOAD here while you wait for it to be approved.

  9. #9
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

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

    I have downloaded the latest and the previous version of the plugin looking for the css file. It doesn't seem to be in either. Should there be a css file?

 

 

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

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