Files
PrestaShop/install-dev/upgrade/sql/1.5.0.6.sql
T
mDeflotte 712ce8a688 [-] FO : #PSCFI-4762 - When cart contains virtuals products and physicals products, use only physicals to calculate shipping cost
// Product virtuals added before upgrading need to have the column ps_product.is_virtual at 1

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13477 b9a71923-0436-4b27-9f14-aed3839534dd
2012-02-20 16:40:22 +00:00

13 lines
340 B
SQL

SET NAMES 'utf8';
UPDATE `PREFIX_orders` o
SET o.`current_state` = (
SELECT oh.`id_order_state`
FROM `PREFIX_order_history` oh
WHERE oh.`id_order` = o.`id_order`
ORDER BY oh.`date_add` DESC
LIMIT 1
);
UPDATE `PREFIX_product` set is_virtual = 1 WHERE id_product IN (SELECT id_product FROM `PREFIX_product_download` WHERE active = 1);