Skip to content

Commit 3c8c4a7

Browse files
committed
Fix static and functional tests.
1 parent 7c7b078 commit 3c8c4a7

File tree

1 file changed

+7
-1
lines changed
  • app/code/Magento/Tax/Plugin/Checkout/CustomerData

1 file changed

+7
-1
lines changed

app/code/Magento/Tax/Plugin/Checkout/CustomerData/Cart.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
namespace Magento\Tax\Plugin\Checkout\CustomerData;
88

9+
/**
10+
* Process quote items price, considering tax configuration.
11+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
12+
*/
913
class Cart
1014
{
1115
/**
@@ -68,11 +72,13 @@ public function afterGetSectionData(\Magento\Checkout\CustomerData\Cart $subject
6872
$this->itemPriceRenderer->setItem($item);
6973
$this->itemPriceRenderer->setTemplate('checkout/cart/item/price/sidebar.phtml');
7074
$result['items'][$key]['product_price']=$this->itemPriceRenderer->toHtml();
71-
if($this->itemPriceRenderer->displayPriceExclTax()) {
75+
if ($this->itemPriceRenderer->displayPriceExclTax()) {
7276
$result['items'][$key]['product_price_value'] = $item->getCalculationPrice();
7377
} elseif ($this->itemPriceRenderer->displayPriceInclTax()) {
7478
$result['items'][$key]['product_price_value'] = $item->getPriceInclTax();
7579
} elseif ($this->itemPriceRenderer->displayBothPrices()) {
80+
//unset product price value in case price already has been set as scalar value.
81+
unset($result['items'][$key]['product_price_value']);
7682
$result['items'][$key]['product_price_value']['incl_tax'] = $item->getPriceInclTax();
7783
$result['items'][$key]['product_price_value']['excl_tax'] = $item->getCalculationPrice();
7884
}

0 commit comments

Comments
 (0)