From 3ea5e69e81ab4e65c90fc494b3b373ca9f569515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 3 Oct 2019 11:29:46 +0300 Subject: [PATCH] fixed getting product price from order basket --- .../classes/general/history/RetailCrmHistory_v5.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index 2cc1f64d..f9ed36ac 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -689,7 +689,12 @@ class RetailCrmHistory } if (array_key_exists('discountTotal', $product)) { - $itemCost = $item->getField('BASE_PRICE'); + $itemCost = $item->getField('PRICE'); + + if (empty($itemCost)) { + $itemCost = $item->getField('BASE_PRICE'); + } + $discount = (double) $item->getField('DISCOUNT_PRICE'); if (isset($itemCost) && $itemCost >= 0) {