Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default show last modified products in what's new

    It's possible to show in what's new list products with last modified within 7 days?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: show last modified products in what's new

    There is a "products_last_modified" field in the products table in the database, so you could access that when building the new products listing.

  3. #3
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: show last modified products in what's new

    where's this "new products listing" file?

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: show last modified products in what's new

    Sorry, making this functionality is going to require a good knowledge of PHP coding. You will probably be best off posting in the Commercial Help Wanted forum if the feature is important to you. Or perhaps someone who already knows how to do this will come by and show you.

  5. #5
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: show last modified products in what's new

    Thank's for help

  6. #6
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: show last modified products in what's new

    Solved!
    in includes-->modules-->pages-->products_new-->header_php.php
    comment out
    PHP Code:
    $display_limit zen_get_new_date_range(); 
    and add:
    PHP Code:
    $display_limit ' and TO_DAYS(NOW()) - TO_DAYS(p.products_last_modified) <= 7'

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

    Default Re: show last modified products in what's new

    That will slow you down considerably on a database of any size ...

    Look at how those functions were re-written for the new products and upcoming products ...
    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
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: show last modified products in what's new

    Quote Originally Posted by Ajeh View Post
    That will slow you down considerably on a database of any size ...

    Look at how those functions were re-written for the new products and upcoming products ...
    Sorry, Idon't understand.
    Why slow?
    I'm using 1.3.5 version, but I don't see difference with latest version

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

    Default Re: show last modified products in what's new

    TO_DAYS(NOW()) in a select statement must touch every record vs have the index help to touch only the records needed ...

    If you were to take a database of 2000 products, you would see the TO_DAYS(NOW()) statement touch all 2000 products each time it is used even if there are only 3 products that meet the select statement ...

    Using the methods we have for new products and upcoming to address the date fields you would see it touching only the 3 records ...

    TO_DAYS(NOW()) slows down queries considerably ...
    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!

  10. #10
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: show last modified products in what's new

    Quote Originally Posted by Ajeh View Post
    TO_DAYS(NOW()) in a select statement must touch every record vs have the index help to touch only the records needed ...

    If you were to take a database of 2000 products, you would see the TO_DAYS(NOW()) statement touch all 2000 products each time it is used even if there are only 3 products that meet the select statement ...

    Using the methods we have for new products and upcoming to address the date fields you would see it touching only the 3 records ...

    TO_DAYS(NOW()) slows down queries considerably ...
    I want only to see the products I have modified in the last 7 days:
    what change I made for?

 

 

Similar Threads

  1. v150 How to bulk update the products last modified?
    By Terrill_Taylor in forum General Questions
    Replies: 1
    Last Post: 16 Jul 2012, 04:25 AM
  2. last modified Date
    By purelypoultry in forum Basic Configuration
    Replies: 1
    Last Post: 28 Jan 2010, 12:06 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