Don't save shipping number in dropshipping
This commit is contained in:
parent
70afb97e26
commit
9cadd3e8af
@ -293,18 +293,19 @@ class AdminAntDropshippingtracking extends AdminTab
|
||||
$history->id_employee = 0;
|
||||
$history->add();
|
||||
|
||||
Db::getInstance()->ExecuteS('
|
||||
INSERT INTO `'._DB_PREFIX_.'shipping_history`
|
||||
VALUES (
|
||||
'.(int) $order->id.',
|
||||
"'.pSQL($o['tracking_number']).'",
|
||||
NOW(),
|
||||
0,
|
||||
'.(int)$id_sale.'
|
||||
)
|
||||
');
|
||||
|
||||
if ($infosTrackingEnable) {
|
||||
if ($infosTrackingEnable == 1) {
|
||||
|
||||
Db::getInstance()->ExecuteS('
|
||||
INSERT INTO `'._DB_PREFIX_.'shipping_history`
|
||||
VALUES (
|
||||
'.(int) $order->id.',
|
||||
"'.pSQL($o['tracking_number']).'",
|
||||
NOW(),
|
||||
0,
|
||||
'.(int)$id_sale.'
|
||||
)
|
||||
');
|
||||
|
||||
global $_LANGMAIL;
|
||||
$subject = 'Package in transit';
|
||||
$customer = new Customer((int) $order->id_customer);
|
||||
|
@ -165,7 +165,7 @@ if(($id_order = (int) Tools::getValue('id_order'))
|
||||
// Image
|
||||
$p['id_image'] = 0;
|
||||
|
||||
if((int) $p['product_attribute_id'] != 0) {
|
||||
if ((int) $p['product_attribute_id'] != 0) {
|
||||
$img = Db::getInstance()->getRow('
|
||||
SELECT `id_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'];
|
||||
}
|
||||
|
||||
if($p['id_image'] == 0) {
|
||||
if ($p['id_image'] == 0) {
|
||||
$img = Db::getInstance()->getRow('
|
||||
SELECT `id_image`
|
||||
FROM `'._DB_PREFIX_.'image`
|
||||
@ -259,12 +259,12 @@ if(($id_order = (int) Tools::getValue('id_order'))
|
||||
$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`
|
||||
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.'
|
||||
'.(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_return']: $p['product_quantity_refunded'] );
|
||||
|
Loading…
Reference in New Issue
Block a user