PrestaShop $link -> getProductLink($product) gives incorrect URL

泪湿孤枕 提交于 2020-01-24 13:01:45

问题


I'm generating my product links in custom ajax powered module with $link -> getProductLink($product)

it's generating a URL like http://example.com/prestashop/2-blouse.html

which is throwing an error saying

[Debug] This page has moved Please use the following URL instead: http://example.com/prestashop/blouses/2-blouse.html

How do I avoid the same

Thanks

P.S: I'm using prestashop 1.6


回答1:


Set _PS_MODE_DEV_ to false in config/defines.inc.php.




回答2:


In Preferences > SEO & URLs

  1. set disable friendly URLs and Save
  2. set enable friendly URLs and Save

The .htaccess file will be refreshed and now it will not show you that message.



来源:https://stackoverflow.com/questions/25528902/prestashop-link-getproductlinkproduct-gives-incorrect-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!