fix labelgenerate
This commit is contained in:
parent
133c8769cd
commit
56da5a1b8f
@ -55,13 +55,13 @@ class AdminLabelGenerate extends AdminTab {
|
||||
WHERE `id_product` = ' . (int)$product->id .'
|
||||
AND `id_product_attribute` = ' . (int)$combination['id_product_attribute']
|
||||
);
|
||||
// Db::getInstance()->Execute('
|
||||
// UPDATE
|
||||
// `'._DB_PREFIX_.'order_detail`
|
||||
// SET `product_ean13` = "'. pSQL($ean_generate) .'"
|
||||
// WHERE `product_id` = '. (int)$product->id .'
|
||||
// AND `product_attribute_id` = '. (int)$combination['id_product_attribute']
|
||||
// );
|
||||
Db::getInstance()->Execute('
|
||||
UPDATE
|
||||
`'._DB_PREFIX_.'order_detail`
|
||||
SET `product_ean13` = "'. pSQL($ean_generate) .'"
|
||||
WHERE `product_id` = '. (int)$product->id .'
|
||||
AND `product_attribute_id` = '. (int)$combination['id_product_attribute']
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,7 @@ class AdminLabelGenerate extends AdminTab {
|
||||
$result_quantities = Db::getInstance()->executeS('
|
||||
SELECT od.`product_quantity`,od.`product_quantity_reinjected`
|
||||
FROM '._DB_PREFIX_.'order_detail od
|
||||
WHERE od.`product_id` = ' . (int)$product->id . ' AND `id_product_attribute` = 0'
|
||||
WHERE od.`product_id` = ' . (int)$product->id . ' AND `product_attribute_id` = 0'
|
||||
);
|
||||
$quantity = 0;
|
||||
foreach ($result_quantities as $od) {
|
||||
@ -85,13 +85,13 @@ class AdminLabelGenerate extends AdminTab {
|
||||
SET `ean13` = '. $ean_generate . '
|
||||
WHERE `id_product` = ' . (int)$product->id
|
||||
);
|
||||
// Db::getInstance()->Execute('
|
||||
// UPDATE
|
||||
// `'._DB_PREFIX_.'order_detail`
|
||||
// SET `product_ean13` = "'. pSQL($ean_generate) .'"
|
||||
// WHERE `product_id` = '. (int)$product->id .'
|
||||
// AND `product_attribute_id` = 0
|
||||
// ');
|
||||
Db::getInstance()->Execute('
|
||||
UPDATE
|
||||
`'._DB_PREFIX_.'order_detail`
|
||||
SET `product_ean13` = "'. pSQL($ean_generate) .'"
|
||||
WHERE `product_id` = '. (int)$product->id .'
|
||||
AND `product_attribute_id` = 0
|
||||
');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user