Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop
This commit is contained in:
commit
e6020ae11c
@ -139,6 +139,44 @@ class Order extends OrderCore {
|
||||
') as $key => $info) {
|
||||
$data[$info['id_order_detail']] = $info['total_send'];
|
||||
}
|
||||
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT
|
||||
d.`id_order_detail`,
|
||||
IF(
|
||||
(SELECT COUNT(p.`id_order_detail`)
|
||||
FROM `'._DB_PREFIX_.'mondialrelay_parcel` p
|
||||
WHERE d.`id_order_detail` = p.`id_order_detail`),
|
||||
(SELECT SUM(p.`quantity`)
|
||||
FROM `'._DB_PREFIX_.'mondialrelay_parcel` p
|
||||
WHERE d.`id_order_detail` = p.`id_order_detail`),
|
||||
0
|
||||
) as `total_send`
|
||||
FROM `'._DB_PREFIX_.'order_detail` d
|
||||
WHERE d.`id_order_detail` IN ('.implode(',', $ids).')
|
||||
') as $key => $info) {
|
||||
if($data[$info['id_order_detail']]==0){
|
||||
$data[$info['id_order_detail']] = $info['total_send'];
|
||||
}
|
||||
}
|
||||
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT
|
||||
d.`id_order_detail`,
|
||||
IF(
|
||||
(SELECT COUNT(p.`id_order_detail`)
|
||||
FROM `'._DB_PREFIX_.'ant_dropshipping_parcel` p
|
||||
WHERE d.`id_order_detail` = p.`id_order_detail`),
|
||||
(SELECT SUM(p.`quantity`)
|
||||
FROM `'._DB_PREFIX_.'ant_dropshipping_parcel` p
|
||||
WHERE d.`id_order_detail` = p.`id_order_detail`),
|
||||
0
|
||||
) as `total_send`
|
||||
FROM `'._DB_PREFIX_.'order_detail` d
|
||||
WHERE d.`id_order_detail` IN ('.implode(',', $ids).')
|
||||
') as $key => $info) {
|
||||
if($data[$info['id_order_detail']]==0){
|
||||
$data[$info['id_order_detail']] = $info['total_send'];
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user