Skip to content

Commit c5536d3

Browse files
author
Jeroen
committed
Don't recalculate tax for every price on category page
1 parent 60a4372 commit c5536d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Tax/Model/Config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,20 +832,20 @@ public function getInfoUrl($store = null)
832832
* If it necessary will be returned conversion type (minus or plus)
833833
*
834834
* @param null|int|string|Store $store
835-
* @return bool
835+
* @return bool|int
836836
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
837837
*/
838838
public function needPriceConversion($store = null)
839839
{
840-
$res = false;
840+
$res = 0;
841841
$priceIncludesTax = $this->priceIncludesTax($store) || $this->getNeedUseShippingExcludeTax();
842842
if ($priceIncludesTax) {
843843
switch ($this->getPriceDisplayType($store)) {
844844
case self::DISPLAY_TYPE_EXCLUDING_TAX:
845845
case self::DISPLAY_TYPE_BOTH:
846846
return self::PRICE_CONVERSION_MINUS;
847847
case self::DISPLAY_TYPE_INCLUDING_TAX:
848-
$res = true;
848+
$res = false;
849849
break;
850850
default:
851851
break;

0 commit comments

Comments
 (0)