Added default currency for updateOrderItems

This commit is contained in:
gleemand 2022-04-28 16:29:09 +03:00 committed by GitHub
parent 06ca38be56
commit b9445e3cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1805,6 +1805,11 @@ class RetailcrmHistory
];
$orderdb = new Order($orderId);
if (null === Context::getContext()->currency) {
Context::getContext()->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
}
foreach ($orderdb->getProducts() as $item) {
if (isset($item['product_attribute_id']) && 0 < $item['product_attribute_id']) {
$productId = $item['product_id'] . '#' . $item['product_attribute_id'];