Don't save shipping number in dropshipping
This commit is contained in:
parent
70afb97e26
commit
9cadd3e8af
@ -293,6 +293,8 @@ class AdminAntDropshippingtracking extends AdminTab
|
|||||||
$history->id_employee = 0;
|
$history->id_employee = 0;
|
||||||
$history->add();
|
$history->add();
|
||||||
|
|
||||||
|
if ($infosTrackingEnable == 1) {
|
||||||
|
|
||||||
Db::getInstance()->ExecuteS('
|
Db::getInstance()->ExecuteS('
|
||||||
INSERT INTO `'._DB_PREFIX_.'shipping_history`
|
INSERT INTO `'._DB_PREFIX_.'shipping_history`
|
||||||
VALUES (
|
VALUES (
|
||||||
@ -304,7 +306,6 @@ class AdminAntDropshippingtracking extends AdminTab
|
|||||||
)
|
)
|
||||||
');
|
');
|
||||||
|
|
||||||
if ($infosTrackingEnable) {
|
|
||||||
global $_LANGMAIL;
|
global $_LANGMAIL;
|
||||||
$subject = 'Package in transit';
|
$subject = 'Package in transit';
|
||||||
$customer = new Customer((int) $order->id_customer);
|
$customer = new Customer((int) $order->id_customer);
|
||||||
|
@ -165,7 +165,7 @@ if(($id_order = (int) Tools::getValue('id_order'))
|
|||||||
// Image
|
// Image
|
||||||
$p['id_image'] = 0;
|
$p['id_image'] = 0;
|
||||||
|
|
||||||
if((int) $p['product_attribute_id'] != 0) {
|
if ((int) $p['product_attribute_id'] != 0) {
|
||||||
$img = Db::getInstance()->getRow('
|
$img = Db::getInstance()->getRow('
|
||||||
SELECT `id_image`
|
SELECT `id_image`
|
||||||
FROM `'._DB_PREFIX_.'product_attribute_image`
|
FROM `'._DB_PREFIX_.'product_attribute_image`
|
||||||
@ -175,7 +175,7 @@ if(($id_order = (int) Tools::getValue('id_order'))
|
|||||||
$p['id_image'] = $img['id_image'];
|
$p['id_image'] = $img['id_image'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($p['id_image'] == 0) {
|
if ($p['id_image'] == 0) {
|
||||||
$img = Db::getInstance()->getRow('
|
$img = Db::getInstance()->getRow('
|
||||||
SELECT `id_image`
|
SELECT `id_image`
|
||||||
FROM `'._DB_PREFIX_.'image`
|
FROM `'._DB_PREFIX_.'image`
|
||||||
@ -259,12 +259,12 @@ if(($id_order = (int) Tools::getValue('id_order'))
|
|||||||
$shipping_numbers[] = '"'.pSQL($row['shipping_number']).'"';
|
$shipping_numbers[] = '"'.pSQL($row['shipping_number']).'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((int) $p['product_quantity_sent'] === 0) && Db::getInstance()->getRow('
|
if (((int) $p['product_quantity_sent'] === 0) && Db::getInstance()->getRow('
|
||||||
SELECT h.`id_sale`
|
SELECT h.`id_sale`
|
||||||
FROM `'._DB_PREFIX_.'shipping_history` h
|
FROM `'._DB_PREFIX_.'shipping_history` h
|
||||||
WHERE h.`id_sale` = '.((int) $p['id_sale'] === 999999 ? 0: (int) $p['id_sale']).'
|
WHERE h.`id_sale` = '.((int) $p['id_sale'] === 999999 ? 0 : (int) $p['id_sale']).'
|
||||||
AND h.`id_order` = '.(int) $order->id.'
|
AND h.`id_order` = '.(int) $order->id.'
|
||||||
'.(count($shipping_numbers) > 0? 'AND h.`shipping_number` NOT IN ('.implode(', ', $shipping_numbers).')': '').'
|
'.(count($shipping_numbers) > 0 ? 'AND h.`shipping_number` NOT IN ('.implode(', ', $shipping_numbers).')': '').'
|
||||||
')) {
|
')) {
|
||||||
$p['product_quantity_sent'] = $p['product_quantity'] - ( $p['product_quantity_return'] > 0 ?
|
$p['product_quantity_sent'] = $p['product_quantity'] - ( $p['product_quantity_return'] > 0 ?
|
||||||
$p['product_quantity_return']: $p['product_quantity_refunded'] );
|
$p['product_quantity_return']: $p['product_quantity_refunded'] );
|
||||||
|
Loading…
Reference in New Issue
Block a user