// Allow to force routes #PSCFV-2592
This commit is contained in:
+3
-2
@@ -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 '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user