Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2005
    Posts
    63
    Plugin Contributions
    0

    Default Adding more limited days for the new products box

    I have now in my admin under New Product Listing - Limited to ... the following days:

    Limit the New Product Listing to
    0= All desc
    1= Current Month
    30= 30 Days
    60= 60 Days
    90= 90 Days
    120= 120 Days

    How can I add more days? for example 3 or 7 days

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

    Default Re: Adding more limited days for the new products box

    You would need to set the configuration_key SHOW_NEW_PRODUCTS_LIMIT for the number of days ...

    In theory, anything not set to 0 or 1 will be that many days ...
    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!

  3. #3
    Join Date
    Apr 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: Adding more limited days for the new products box

    Hi

    That is what I meant what is not working, I have changed that, in the new_products.php and all other files where these lines are in, but nothing changes in the admin file.

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

    Default Re: Adding more limited days for the new products box

    Note: that this theory would only work in v1.3.5 ...

    What version of Zen Cart are you running?
    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!

  5. #5
    Join Date
    Apr 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: Adding more limited days for the new products box

    Hi Ajeh,

    I am using 1.2.7,

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

    Default Re: Adding more limited days for the new products box

    Well ... that isn't going to work then without a lot of coding ...

    The new method uses a totally different scheme for obtaining New Products based on date to speed up the processes ...

    The old method used date math in a more primative way and it really slowed things down on large sites ... or sites with poor configuration of MySQL ...

    You can try a search via the Tools ... Developer's Tool Kit ... in the bottom input box for:
    SHOW_NEW_PRODUCTS_LIMIT

    This should locate all of the code that needs to be customized in v1.2.7 ...
    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
    Apr 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: Adding more limited days for the new products box

    Quote Originally Posted by Ajeh
    Well ... that isn't going to work then without a lot of coding ...

    The new method uses a totally different scheme for obtaining New Products based on date to speed up the processes ...

    The old method used date math in a more primative way and it really slowed things down on large sites ... or sites with poor configuration of MySQL ...

    You can try a search via the Tools ... Developer's Tool Kit ... in the bottom input box for:
    SHOW_NEW_PRODUCTS_LIMIT

    This should locate all of the code that needs to be customized in v1.2.7 ...
    Hi Ajeh,

    That is what I have tried before, but the admin doesn't change for some reason...

  8. #8
    Join Date
    Apr 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: Adding more limited days for the new products box

    I shall explain more precisely what I have done.

    I have searched for every file where :

    case (SHOW_NEW_PRODUCTS_LIMIT == '30'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';
    break;

    was in,

    I have changed that to

    case (SHOW_NEW_PRODUCTS_LIMIT == '3'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 3';
    break;

    But the admin doesn't change, it still shows

    Limit the New Product Listing to
    0= All desc
    1= Current Month
    30= 30 Days
    60= 60 Days
    90= 90 Days
    120= 120 Days

    When I choose 30 days hoping that that will be 3 days, then the box shows all products randomly

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

    Default Re: Adding more limited days for the new products box

    The choices do not change just because you changed the code ...

    You would need to manually edit the configuration_key for that from 30 to 3 in phpMyAdmin and see if that works for you ...
    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!

 

 

Similar Threads

  1. Replies: 4
    Last Post: 12 Mar 2010, 09:56 PM
  2. Adding more than just 3 products to the featured product box
    By peter3827 in forum Basic Configuration
    Replies: 2
    Last Post: 28 Apr 2009, 07:32 PM
  3. Adding the manufacturer for new products
    By kingster147 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Aug 2007, 06:03 PM
  4. What's New Side Box - Limiting # of Days For Product?
    By KRW Knitwear in forum Basic Configuration
    Replies: 1
    Last Post: 2 May 2007, 11:42 PM
  5. Limited Number of Items in New Products For <month> When Category is clicked.
    By DrBit in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Oct 2006, 04:23 AM

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