From f32f16e833e3def5427b0399872177bd7211e075 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Wed, 18 Sep 2013 09:17:49 +0200 Subject: [PATCH] fix product without pse in loop --- core/lib/Thelia/Core/Template/Loop/Product.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Product.php b/core/lib/Thelia/Core/Template/Loop/Product.php index 4a401d464..7c71e542b 100755 --- a/core/lib/Thelia/Core/Template/Loop/Product.php +++ b/core/lib/Thelia/Core/Template/Loop/Product.php @@ -597,14 +597,16 @@ class Product extends BaseI18nLoop $loopResult = new LoopResult($products); + $taxCountry = CountryQuery::create()->findPk(64); // @TODO : make it magic + foreach ($products as $product) { $loopResultRow = new LoopResultRow($loopResult, $product, $this->versionable, $this->timestampable, $this->countable); $price = $product->getRealLowestPrice(); - $taxedPrice = $product->getTaxedPrice( - CountryQuery::create()->findOneById(64) // @TODO : make it magic + $taxedPrice = null === $price ? null : $product->getTaxedPrice( + $taxCountry ); // Find previous and next product, in the default category.