From d4e7f7cd00a35ae6de52b52b3b6f45802323f5a8 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 31 Jan 2013 12:03:16 +0100 Subject: [PATCH] [-] FO : Fix bug #PSCFV-7504 last category for parent and not always default one --- controllers/front/ProductController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index c57997bbd..84c45a956 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -145,7 +145,7 @@ class ProductControllerCore extends FrontController // Load category if (isset($_SERVER['HTTP_REFERER']) - && !strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost()) // Assure us the previous page was one of the shop + && strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost()) // Assure us the previous page was one of the shop && preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs)) { // If the previous page was a category and is a parent category of the product use this category as parent category