[-] CORE : getModuleLink not working on module custom route, merge from https://github.com/PrestaShop/PrestaShop/pull/487 thanks @zimmi1
This commit is contained in:
+6
-3
@@ -373,15 +373,18 @@ class LinkCore
|
||||
$shop = new Shop($id_shop);
|
||||
$url = $base.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang);
|
||||
|
||||
// Set available keywords
|
||||
$params['module'] = $module;
|
||||
$params['controller'] = $controller ? $controller : 'default';
|
||||
|
||||
|
||||
// If the module has its own route ... just use it !
|
||||
if (Dispatcher::getInstance()->hasRoute('module-'.$module.'-'.$controller, $id_lang, $id_shop))
|
||||
return $this->getPageLink('module-'.$module.'-'.$controller, $ssl, $id_lang, $params);
|
||||
else
|
||||
{
|
||||
// Set available keywords
|
||||
$params['module'] = $module;
|
||||
$params['controller'] = $controller ? $controller : 'default';
|
||||
return $url.Dispatcher::getInstance()->createUrl('module', $id_lang, $params, $this->allow, '', $id_shop);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user