Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2004
    Posts
    130
    Plugin Contributions
    0

    Default list all products

    Is there a way to list all the products in one category, without pagination? I don't want to do it all the time, I just want them to be able to click on a page number to go to that page OR have an option to list them ALL on one page together like other carts do.

  2. #2
    Join Date
    Jun 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: list all products

    Hi,

    Not sure if this has been posted somewhere else but I also needed something like this and I came up with the following:

    In includes->modules->TEMPLATE->product_listing.php paste
    PHP Code:
    if(!empty($_REQUEST['ShowAll'])){$max_results $_REQUEST['ShowAll'];} 
    Directly under
    PHP Code:
    $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
    Then in includes->templates->TEMPLATE->tpl_modules_product_listing.php paste something like this
    PHP Code:
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // REDPAINT MODIFICATION TO ACTIVATE SHOW ALL FUNCTIONALITY 
    if(!empty($_REQUEST['ShowAll'])){
        
    $ShowAll $_REQUEST['ShowAll'];
        
    $QS str_replace('ShowAll='.$ShowAll,'',$_SERVER['QUERY_STRING']);
        print 
    '<a href="'.$_SERVER['SCRIPT_NAME'].'?'.$QS.'">Show '.MAX_DISPLAY_PRODUCTS_LISTING.' Per Page</a>';
    }else{
        print 
    '<a href="'.$_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'].'&amp;ShowAll='.$listing_split->number_of_rows.'">Show all</a> | ';
    }
    // END MODIFICATION
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    Put the code directly after line 28 which should read
    PHP Code:
    <div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php
    It may not be the most eloquent solution but I hope this helps someone else.

  3. #3
    Join Date
    Jun 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: list all products

    Actually, you'll need to wrap the code with another if tag like so:
    PHP Code:
    if($listing_split->number_of_rows MAX_DISPLAY_PRODUCTS_LISTING){
    if(empty(
    $_REQUEST['ShowAll'])){
        print 
    '<a href="'.$_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'].'&amp;ShowAll='.$listing_split->number_of_rows.'">Show all</a> | ';
    }else{
        
    $ShowAll $_REQUEST['ShowAll'];
        
    $QS str_replace('ShowAll='.$ShowAll,'',$_SERVER['QUERY_STRING']);
        print 
    '<a href="'.$_SERVER['SCRIPT_NAME'].'?'.$QS.'">Show '.MAX_DISPLAY_PRODUCTS_LISTING.' Per Page</a>';
    }


  4. #4
    Join Date
    Jun 2004
    Posts
    130
    Plugin Contributions
    0

    Default Re: list all products

    Thank you so much! This worked like a charm....

  5. #5
    Join Date
    Jun 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: list all products

    No problem, glad to help.

    :)

  6. #6
    Join Date
    May 2008
    Location
    Virginia Beach, Virginia, United States
    Posts
    52
    Plugin Contributions
    0

    Default Re: list all products

    Has anyone gotten this to work for the lastest version of Zen Cart? It won't work for me and I'm assuming it's because names to things have changed and I don't know what I need to change to make it work. Help pleeeeaaase!

  7. #7
    Join Date
    May 2008
    Location
    Virginia Beach, Virginia, United States
    Posts
    52
    Plugin Contributions
    0

    Default Re: list all products

    After exhaustive searching (this really has been five days of searching), I found this hack on the split_page_results.php that worked exactly how I needed it to! The thread is linked below:

    http://www.zen-cart.com/forum/showth...t=38551&page=4

 

 

Similar Threads

  1. Disabling New Products & Enabling All Products in Category List
    By JRayfield in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Jan 2010, 04:49 PM
  2. Display list of ALL categories and links to ALL products
    By mattys in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Apr 2009, 04:24 PM
  3. display categories on list of all products
    By Smartsoul in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Aug 2007, 03:40 PM
  4. alignment on list all products
    By Erica in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Jan 2007, 08:06 PM
  5. List of all products
    By Tobias Schlemmer in forum General Questions
    Replies: 0
    Last Post: 29 Jun 2006, 01:48 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