Jump to content

Recommended Posts

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

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
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...