0
votes

My website is on Prestashop 1.6 with multistore feature enabled. When I m in store n°1, I would like to insert a link of store N°2 without having to write the url. Smarty has the variable {$base_dir} ( URL of the store). The value of this variable change depending the context (if I m in store n°1 or store n°2). Is there any way to have a smarty variable with which I can get a url of a store in particular?

Thanks

2

2 Answers

0
votes

I just found this :

{assign var="foo" value=Shop::getShops() }

It returns an array with the urls of all the shops.

To have the url of shop n°1 :

{$foo[1]['uri']}

To have the url of shop n°2 :

 {$foo[2]['uri']}

very easy to use!

0
votes

You can use :

$link->getPageLink($controller, $ssl = null, $id_lang = null, $request = null, $request_url_encode = false, $id_shop = null, $relative_protocol = false).

All functions in Link class accept id_shop param. 'index' for IndexController.