mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 05:06:07 +03:00
fixed synchronization when removing or adding products in retailCRM
This commit is contained in:
parent
74a5d2c642
commit
9e5b1ba2d8
@ -41,15 +41,13 @@ class RetailcrmHistoryHelper {
|
|||||||
$orders[$change['order']['id']]['items'][$change['item']['id']] = $change['item'];
|
$orders[$change['order']['id']]['items'][$change['item']['id']] = $change['item'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($change['oldValue'])
|
if (empty($change['oldValue'])
|
||||||
&& empty($change['oldValue'])
|
|
||||||
&& $change['field'] == 'order_product'
|
&& $change['field'] == 'order_product'
|
||||||
) {
|
) {
|
||||||
$orders[$change['order']['id']]['items'][$change['item']['id']]['create'] = true;
|
$orders[$change['order']['id']]['items'][$change['item']['id']]['create'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($change['newValue'])
|
if (empty($change['newValue'])
|
||||||
&& empty($change['newValue'])
|
|
||||||
&& $change['field'] == 'order_product'
|
&& $change['field'] == 'order_product'
|
||||||
) {
|
) {
|
||||||
$orders[$change['order']['id']]['items'][$change['item']['id']]['delete'] = true;
|
$orders[$change['order']['id']]['items'][$change['item']['id']]['delete'] = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user