12583 - add query string with tracking in urls when redirecting category with 1 products

This commit is contained in:
Srv Privilege de marque 2017-03-02 17:17:19 +01:00
parent 7cdb41edbd
commit ce5f1377bc

View File

@ -18,6 +18,11 @@ class CategoryController extends CategoryControllerCore
}
$product = reset($this->cat_products);
$link = Context::getContext()->link->getProductLink($product);
if (isset($_SERVER['REDIRECT_QUERY_STRING'])) {
$link .= '?'.$_SERVER['REDIRECT_QUERY_STRING'];
}
Tools::redirect($link);
}