File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -921,7 +921,9 @@ public function needPriceConversion($store = null)
921
921
$ res = false ;
922
922
$ priceIncludesTax = $ this ->priceIncludesTax ($ store )
923
923
|| $ this ->getNeedUseShippingExcludeTax ()
924
- || $ this ->shippingPriceIncludesTax ($ store );
924
+ || $ this ->shippingPriceIncludesTax ($ store )
925
+ || $ this ->displayCartShippingInclTax ()
926
+ || $ this ->displayCartShippingBoth ();
925
927
if ($ priceIncludesTax ) {
926
928
switch ($ this ->getPriceDisplayType ($ store )) {
927
929
case self ::DISPLAY_TYPE_EXCLUDING_TAX :
Original file line number Diff line number Diff line change @@ -381,4 +381,20 @@ public function dataProviderScopeConfigMethods(): array
381
381
]
382
382
];
383
383
}
384
+
385
+ /**
386
+ * Tests check if necessary do product price conversion
387
+ *
388
+ * @return void
389
+ */
390
+ public function testNeedPriceConversion (): void
391
+ {
392
+ $ scopeConfigMock = $ this ->getMockForAbstractClass (ScopeConfigInterface::class);
393
+ $ scopeConfigMock
394
+ ->method ('getValue ' )
395
+ ->willReturn (true );
396
+ /** @var Config */
397
+ $ model = new Config ($ scopeConfigMock );
398
+ $ this ->assertEquals (true , $ model ->needPriceConversion ());
399
+ }
384
400
}
You can’t perform that action at this time.
0 commit comments