Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Feb 2016
    Posts
    20
    Plugin Contributions
    0

    Default How do I modify paging's display mode?

    Hello, every friend! I meet a question that can't be sloved, I hope for some help about it, thanks!
    I want alter paging's display mode. for example, I want alter it from "Displaying 1 to 10 (of 24 products)" to "Total 24 Products", which file should I change, how do modify it?
    Name:  1.jpg
Views: 406
Size:  5.0 KB

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: How do I modify paging's display mode?

    If I got your page correct then

    admin > config > Maximum Values > Maximum Number of Products to list per page on main page > set to higher number
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2016
    Posts
    20
    Plugin Contributions
    0

    Default Re: How do I modify paging's display mode?

    Thank kobra's answer, It is a very good method! But I couldn't fully express the question before, I only need display "Total 24 Products", and don't change display number of each page.

  4. #4
    Join Date
    Feb 2016
    Posts
    20
    Plugin Contributions
    0

    Default Re: How do I modify paging's display mode?

    Problem has been sloved, It need add below code in tpl_modules_product_listing.php.

    <?php
    $allnum=$db->Execute($listing_sql);
    $total=$allnum->RecordCount();
    echo 'Total' . $total . 'Products';
    ?>

  5. #5
    Join Date
    Sep 2008
    Posts
    210
    Plugin Contributions
    21

    Default Re: How do I modify paging's display mode?

    Quote Originally Posted by sfgl View Post
    Problem has been sloved, It need add below code in tpl_modules_product_listing.php.

    <?php
    $allnum=$db->Execute($listing_sql);
    $total=$allnum->RecordCount();
    echo 'Total' . $total . 'Products';
    ?>
    If you have a large site, this code can make your site slow.
    Our Site: http://zucando.com
    Marketing Plugins: Marketing Modules
    Free Response Templates: Responsive Templates

  6. #6
    Join Date
    Mar 2016
    Posts
    14
    Plugin Contributions
    0

    Default Re: How do I modify paging's display mode?

    Quote Originally Posted by cvhainb View Post
    If you have a large site, this code can make your site slow.
    I agree with you.
    To modify paging's display code, edit includes/classes/split_page_results.php -> display_count() method, line# 156
    PHP Code:
    return sprintf($text_output$from_num$to_num$this->number_of_rows); 
    to
    PHP Code:
    return sprintf('Total %d Products'$this->number_of_rows); 

  7. #7
    Join Date
    Feb 2016
    Posts
    20
    Plugin Contributions
    0

    Default Re: How do I modify paging's display mode?

    Thank cvhainb and DrInt's reply! DrInt offer a better solution, I decide to adopt his method.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: How do I modify paging's display mode?

    The reply from DrInt will break your pagination on other pages. You should not touch the split_page_results.php file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Mar 2016
    Posts
    14
    Plugin Contributions
    0

    Default Re: How do I modify paging's display mode?

    Quote Originally Posted by DrByte View Post
    The reply from DrInt will break your pagination on other pages. You should not touch the split_page_results.php file.
    DrByte sensei you're right; a better way to do this,
    edit includes/languages/english.php, find the line below:
    PHP Code:
    define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS''Displaying <strong>%d</strong> to <strong>%d</strong> (of <strong>%d</strong> products)'); 
    modify like :
    PHP Code:
    define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS''<span style="display:none">%d%d</span>Total %d Products'); 

  10. #10
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: How do I modify paging's display mode?

    Or assuming that the above works, could maybe shorten it up further:
    Code:
    define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Total %3$d Products');
    This would reduce any unnecessary output; however, may make refinding this text a little harder to do than before...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Look for help about ajax paging to display extra data
    By sfgl in forum General Questions
    Replies: 5
    Last Post: 26 Apr 2016, 04:11 PM
  2. v139h How to modify my template to not show display-only attributes?
    By AvaAdorn in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 19 Jun 2014, 07:50 PM
  3. Replies: 6
    Last Post: 22 May 2010, 12:59 AM
  4. How to modify upsxml to display french date for ETA?
    By hshin77 in forum Addon Shipping Modules
    Replies: 0
    Last Post: 2 Apr 2010, 03:38 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