// Allow to force routes #PSCFV-2592

This commit is contained in:
rMalie
2012-05-28 13:41:00 +00:00
parent b22e311ed8
commit 87d0e018cd
4 changed files with 46 additions and 12 deletions
+3 -2
View File
@@ -76,7 +76,7 @@ class LinkCore
* @param int $ipa ID product attribute
* @return string
*/
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0)
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false)
{
$dispatcher = Dispatcher::getInstance();
$url = _PS_BASE_URL_.__PS_BASE_URI__;
@@ -129,7 +129,7 @@ class LinkCore
}
$anchor = $ipa ? $product->getAnchor($ipa) : '';
return $url.$dispatcher->createUrl('product_rule', $params, $this->allow, $anchor);
return $url.$dispatcher->createUrl('product_rule', $params, $force_routes, $anchor);
}
/**
@@ -532,6 +532,7 @@ class LinkCore
{
if (!$context)
$context = Context::getContext();
var_dump(Language::isMultiLanguageActivated());
if (!$this->allow || !Language::isMultiLanguageActivated())
return '';