Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    Plugin Contributions
    0

    Default New products is showing *all* products

    Hello again.

    Working on my test site first.

    The New Products listing is showing ALL products, even though:

    1) I set Admin > configuration > Maximum value > New Product Listing - Limited to ... 7 days

    2) I checked my products table and changed all the 0000-00-00 00:00:00 (artifact of EZPopulate) to 2006-01-01 00:00:00.

    Still, all those products with products_date_added going back even to 2005, are showing up in New Products.

    Doesn't New Products draw its list from products table, products_date_added field?

    THANKS in advance!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: New products is showing *all* products

    Yes, that's what it's supposed to do.

    What version of Zen Cart ?
    What addons are installed?
    What version of MySQL/PHP?
    .

    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.

  3. #3
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    Plugin Contributions
    0

    Default Re: New products is showing *all* products

    What version of Zen Cart ?

    Upgraded 1.3.0.2 --> 1.3.5

    What addons are installed?

    Many modifications, but none that would impact this.
    Cross Sell 1.3.0, Purchase Order, USPS with handling % option, Comodo Trust (with thawte substituted), css flyout categories, MZMT, custom order motive based on order source, tax exempt, email address exporter. and a custom product type called "register" which doesn't have any special features yet.

    What version of MySQL/PHP?

    PHP 4.4.1
    MySQL 4.0.25

    My testing website

  4. #4
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    Plugin Contributions
    0

    Default Re: New products is showing *all* products

    Reverting /includes/modules/pages/products_new/header_php.php to the previous version (1.3.0.1) fixed this problem.

    Perhaps this has something to do with it:

    Code:
    line 19  $display_limit = zen_get_products_new_timelimit();
    version 1.3.5: changed to

    Code:
                $display_limit = zen_get_new_date_range();
    these functions are defined in includes/functions/functions_lookups.php

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

    Default Re: New products is showing *all* products

    In v1.3.5 you should have everywhere:
    $display_limit = zen_get_new_date_range();

    Are you sure you did not have a file out of date?

    I see all lines for:

    $display_limit = zen_get_products_new_timelimit();

    commented out ...
    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: v1.5.5]
    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!

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

    Default Re: New products is showing *all* products

    Oh good grief ... some idiot ... left in a:
    return "";

    before the proper return value ...

    and forgot to finish the code ... gads ...

    NOTE: NEW CODE 9-10-2006
    Change the code to read:
    PHP Code:
    // build date range for new products
      
    function zen_get_new_date_range($time_limit false) {
        if (
    $time_limit == false) {
          
    $time_limit SHOW_NEW_PRODUCTS_LIMIT;
        }

        
    // 120 days; 24 hours; 60 mins; 60secs
        
    $date_range time() - ($time_limit 24 60 60);
    // echo 'Now:      '. date('Y-m-d') ."<br />";
    // echo $time_limit . ' Days: '. date('Ymd', $date_range) ."<br />";
        
    $zc_new_date date('Ymd'$date_range);
        switch (
    true) {
        case (
    SHOW_NEW_PRODUCTS_LIMIT == 0):
          
    $new_range '';
          break;
        case (
    SHOW_NEW_PRODUCTS_LIMIT == 1):
          
    $zc_new_date date('Ym'time()) . '01';
          
    $new_range ' and p.products_date_added >=' $zc_new_date;
          break;
        default:
          
    $new_range ' and p.products_date_added >=' $zc_new_date;
        }
        return 
    $new_range;
      } 
    How terribly embarassing ...

    Thanks for the catch ...
    Last edited by Ajeh; 11 Sep 2006 at 03:24 AM.
    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: v1.5.5]
    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!

  7. #7
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Re: New products is showing *all* products

    I have the same problem, but am unsure what i am suppose to do..

    // display limits
    // $display_limit = zen_get_products_new_timelimit();
    $display_limit = zen_get_new_date_range();

    $products_new_query_raw = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price,
    That is my lines from the page
    header_php.php

    from directory
    /public_html/shop/includes/modules/pages/products_new/

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

    Default Re: New products is showing *all* products

    Check the bugfix in this thread for the New Products ...

    http://www.zen-cart.com/forum/showth...165#post259165
    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: v1.5.5]
    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!

  9. #9
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Re: New products is showing *all* products

    Thanks for your help..

  10. #10
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    Plugin Contributions
    0

    Default Re: New products is showing *all* products

    Thanks for the fix, Ajeh-san!


 

 

Similar Threads

  1. v153 All products showing as new
    By SStreich in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 11 Nov 2014, 04:57 AM
  2. New Products For August - Showing all months
    By imfsub12 in forum General Questions
    Replies: 7
    Last Post: 4 Aug 2009, 03:56 PM
  3. Replies: 13
    Last Post: 4 Aug 2009, 02:04 AM
  4. All Products showing as New Products!
    By sketchhgal in forum General Questions
    Replies: 2
    Last Post: 4 Feb 2009, 10:03 AM
  5. "New products box" not showing all products
    By chris21 in forum Basic Configuration
    Replies: 1
    Last Post: 27 Aug 2007, 01:18 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