在prestashop中从多存储中获取产品URL

时间:2018-03-28 15:22:01

标签: prestashop multistore

我需要在具有不同域的prestashop多区域中获取某个产品的产品网址链接。

我知道我可以通过以下方式获得产品链接: getProductLink($ id_product)

但是这会从主商店返回网址,我需要能够获取特定id_store的产品链接

1 个答案:

答案 0 :(得分:1)

您需要将getProductLink与参数一起使用。第6个参数是id shop。 使用

$link = new Link();
$link->getProductLink(1, null, null, null, null, 'your_shop_id_here');

在php中,或

{$link->getProductLink(1, null, null, null, null, 'your_shop_id_here')}
聪明的

相关问题