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

How to set time limit for new product listing?

Views: 3,646

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

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());