mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 06:36:06 +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'];
|
||||
}
|
||||
|
||||
if (isset($change['oldValue'])
|
||||
&& empty($change['oldValue'])
|
||||
if (empty($change['oldValue'])
|
||||
&& $change['field'] == 'order_product'
|
||||
) {
|
||||
$orders[$change['order']['id']]['items'][$change['item']['id']]['create'] = true;
|
||||
}
|
||||
|
||||
if (isset($change['newValue'])
|
||||
&& empty($change['newValue'])
|
||||
if (empty($change['newValue'])
|
||||
&& $change['field'] == 'order_product'
|
||||
) {
|
||||
$orders[$change['order']['id']]['items'][$change['item']['id']]['delete'] = true;
|
||||
|
Loading…
Reference in New Issue
Block a user