From 5d932788f74e7c7f15d929dd41abbee476d9e73c Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 16 Jan 2012 16:05:44 +0000 Subject: [PATCH] // Fix not found products --- controllers/front/ProductController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index e286204ea..19cb482d4 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -70,15 +70,15 @@ class ProductControllerCore extends FrontController else $this->canonicalRedirection(); - if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) - $this->product->quantity = 0; - - $this->product->description = $this->transformDescriptionWithImg($this->product->description); - if (!Validate::isLoadedObject($this->product)) $this->errors[] = Tools::displayError('Product not found'); else { + if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) + $this->product->quantity = 0; + + $this->product->description = $this->transformDescriptionWithImg($this->product->description); + /* * If the product is associated to the shop * and is active or not active but preview mode (need token + file_exists)