update low_stock_date

16 lines
-12 Removals
15 lines
+11 Additions
UPDATE `cataloginventory_stock_item`
UPDATE `cataloginventory_stock_item`
SET `low_stock_date` = IF((use_config_notify_stock_qty = 1
SET `low_stock_date` = IF((use_config_notify_stock_qty = 1
AND qty < 3)
AND qty < 3)
OR (use_config_notify_stock_qty = 0
OR (use_config_notify_stock_qty = 0
AND qty < notify_stock_qty), '2020-11-18 22:02:11', NULL)
AND qty < notify_stock_qty), '2020-11-18 22:25:38', NULL)
WHERE (website_id = 0
WHERE (website_id = 1)
AND ((use_config_manage_stock = 1
AND (product_id IN
AND 1 = 1)
OR (use_config_manage_stock = 0
AND manage_stock = 1))
AND product_id IN
(SELECT `catalog_product_entity`.`entity_id`
(SELECT `catalog_product_entity`.`entity_id`
FROM `catalog_product_entity`
FROM `catalog_product_entity`
WHERE (type_id IN('simple',
WHERE (type_id IN ('simple',
'virtual',
'virtual',
'downloadable'))))
'downloadable'))))
AND ((use_config_manage_stock = 0
AND manage_stock = 1)
OR use_config_manage_stock = 1)
Editor
Clear
Export as PDF