Forums / Setting Up Categories, Products, Attributes / How to set time limit for new product listing?

How to set time limit for new product listing?

Started by andrewcklau on 11 Mar 2010, 7:46 AM · Views: 3,656

Results 1 to 5 of 5
11 Mar 2010, 7:46 AM
#1
andrewcklau avatar

andrewcklau

New Zenner

Join Date:
Jul 2009
Posts:
13
Plugin Contributions:
0

How to set time limit for new product listing?

I want to display my products as "new" within 180 days that I added.

How can I configure from zen cart admin to do that?

Or I need to modify the source?

Thanks a lot!

11 Mar 2010, 7:50 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to set time limit for new product listing?

admin > config > maximum values > New Product Listing - Limited to ... > select

Zen-Venom Get Bitten

11 Mar 2010, 10:19 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: How to set time limit for new product listing?

Also answered by looking it up in the FAQ area: https://www.zen-cart.com/tutorials/index.php?article=3

.
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.

25 Apr 2018, 3:55 PM
#4
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: How to set time limit for new product listing?

DrByte:

Also answered by looking it up in the FAQ area: https://www.zen-cart.com/tutorials/index.php?article=3

Sorry to dig up an old thread but i don't think the OP was asking how to change it in admin.... they're asking how to change the limit from 120 days to say, 180 days or 500 days.

Is this a MYSQL table or a PHP file?

25 Apr 2018, 4:21 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to set time limit for new product listing?

limelites:

Sorry to dig up an old thread but i don't think the OP was asking how to change it in admin.... they're asking how to change the limit from 120 days to say, 180 days or 500 days.

Is this a MYSQL table or a PHP file?
The options available for the selection are stored in the database associated with the configuration_key of 'SHOW_NEW_PRODUCTS_LIMIT'. The limit(s) can be extended by adding to the list of options (don't have to replace the existing ones) and modifying the code of the function zen_get_products_new_timelimit found in includes/functions/functions_lookups.php. The function begins around line 863 with changes to be made at or after 867. The original sql statement to generate the list was:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('New Product Listing - Limited to ...', 'SHOW_NEW_PRODUCTS_LIMIT', '0', 'Limit the New Product Listing to<br />0= All Products<br />1= Current Month<br />7= 7 Days<br />14= 14 Days<br />30= 30 Days<br />60= 60 Days<br />90= 90 Days<br />120= 120 Days', '3', '40', 'zen_cfg_select_option(array(\'0\', \'1\', \'7\', \'14\', \'30\', \'60\', \'90\', \'120\'), ', now());

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...