Skip to content

Commit 3d05e6b

Browse files
author
Jeroen
committed
Don't recalculate tax for every price on category page
1 parent 3085bda commit 3d05e6b

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
@@ -831,20 +831,20 @@ public function getInfoUrl($store = null)
831831
* If it necessary will be returned conversion type (minus or plus)
832832
*
833833
* @param null|int|string|Store $store
834-
* @return bool
834+
* @return bool|int
835835
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
836836
*/
837837
public function needPriceConversion($store = null)
838838
{
839-
$res = false;
839+
$res = 0;
840840
$priceIncludesTax = $this->priceIncludesTax($store) || $this->getNeedUseShippingExcludeTax();
841841
if ($priceIncludesTax) {
842842
switch ($this->getPriceDisplayType($store)) {
843843
case self::DISPLAY_TYPE_EXCLUDING_TAX:
844844
case self::DISPLAY_TYPE_BOTH:
845845
return self::PRICE_CONVERSION_MINUS;
846846
case self::DISPLAY_TYPE_INCLUDING_TAX:
847-
$res = true;
847+
$res = false;
848848
break;
849849
default:
850850
break;

0 commit comments

Comments
 (0)