fashionpup Posted March 13, 2014 Share Posted March 13, 2014 Hi there Are new products considered "new" from the date of creation or when they are first activated? We have a lot of new products come in. However, we need prepare the products in advance but only activate them when they arrive. This also usually means that what's new is often not at the top of the block. Is there a way to get around that? We need to prep the stock before hand but I would like recently activated products to show first on the top of the block. Thanks heaps. Link to comment Share on other sites More sharing options...
dioniz Posted March 13, 2014 Share Posted March 13, 2014 New products are based on date added. You can change date only from database Link to comment Share on other sites More sharing options...
vekia Posted March 13, 2014 Share Posted March 13, 2014 without database modification it's not possible. i know that it will be at least boring to change each product date_add field one by one... so, you can chage it automatically, when product will be "active" (when you switch product status) you can do it with... mysql triggers! something like: CREATE TRIGGER update_date_add BEFORE UPDATE ON `ps_product_shop` FOR EACH ROW BEGIN IF NEW.active=1 THEN SET NEW.date_add = DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%s') END IF END 1 Link to comment Share on other sites More sharing options...
fashionpup Posted March 14, 2014 Author Share Posted March 14, 2014 Thanks everyone. I was hoping not to need to touch the database. Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 unfortunately, it's not possible in this case. but trigger is nice option for that, you will not have to do anything, just activate products in BO Link to comment Share on other sites More sharing options...
Recommended Posts