File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/code/Magento/Tax/Plugin/Checkout/CustomerData Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Tax \Plugin \Checkout \CustomerData ;
8
8
9
+ /**
10
+ * Process quote items price, considering tax configuration.
11
+ * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
12
+ */
9
13
class Cart
10
14
{
11
15
/**
@@ -68,11 +72,13 @@ public function afterGetSectionData(\Magento\Checkout\CustomerData\Cart $subject
68
72
$ this ->itemPriceRenderer ->setItem ($ item );
69
73
$ this ->itemPriceRenderer ->setTemplate ('checkout/cart/item/price/sidebar.phtml ' );
70
74
$ result ['items ' ][$ key ]['product_price ' ]=$ this ->itemPriceRenderer ->toHtml ();
71
- if ($ this ->itemPriceRenderer ->displayPriceExclTax ()) {
75
+ if ($ this ->itemPriceRenderer ->displayPriceExclTax ()) {
72
76
$ result ['items ' ][$ key ]['product_price_value ' ] = $ item ->getCalculationPrice ();
73
77
} elseif ($ this ->itemPriceRenderer ->displayPriceInclTax ()) {
74
78
$ result ['items ' ][$ key ]['product_price_value ' ] = $ item ->getPriceInclTax ();
75
79
} 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 ' ]);
76
82
$ result ['items ' ][$ key ]['product_price_value ' ]['incl_tax ' ] = $ item ->getPriceInclTax ();
77
83
$ result ['items ' ][$ key ]['product_price_value ' ]['excl_tax ' ] = $ item ->getCalculationPrice ();
78
84
}
You can’t perform that action at this time.
0 commit comments