Totally Zenned
- Join Date:
- Oct 2006
- Location:
- Italy
- Posts:
- 636
- Plugin Contributions:
- 0
Post #1 by 100asa
It's possible to show in what's new list products with last modified within 7 days?
Started by 100asa on 28 Sep 2007, 5:06 PM · Views: 1,485
Totally Zenned
It's possible to show in what's new list products with last modified within 7 days?
Black Belt
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.
Totally Zenned
where's this "new products listing" file?
Black Belt
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.
Totally Zenned
Thank's for help
Totally Zenned
Solved!
in includes-->modules-->pages-->products_new-->header_php.php
comment out
$display_limit = zen_get_new_date_range();
and add:
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_last_modified) <= 7';
:clap:
Oba-san
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 ...
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!
Totally Zenned
Ajeh:
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
Oba-san
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 ...
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!
Totally Zenned
Ajeh:
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?
Tell staff why this post should be reviewed.