From f9300ad4c53af294baaacb0d67e62517cc12aff1 Mon Sep 17 00:00:00 2001 From: Magefan Date: Sun, 7 Oct 2018 00:11:10 +0300 Subject: [PATCH] Fixed error on product duplication Fix for: When try to Save & Duplicate product get this error Notice: Undefined index: qty in /vendor/kiwicommerce/module-admin-activity/Helper/TrackField.php on line 661 --- Helper/TrackField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Helper/TrackField.php b/Helper/TrackField.php index 683f712..69cbcde 100644 --- a/Helper/TrackField.php +++ b/Helper/TrackField.php @@ -658,7 +658,7 @@ public function getWildCardData($model, $method) if ($method == self::PRODUCT_METHOD) { $newQty = $model->getData('stock_data'); $oldQty = $model->getOrigData('quantity_and_stock_status'); - if ($newQty['qty'] != $oldQty['qty']) { + if (isset($newQty['qty']) && isset($oldQty['qty']) && $newQty['qty'] != $oldQty['qty']) { $logData['qty'] = [ 'old_value' => $oldQty['qty'], 'new_value' => $newQty['qty']