Ravi Varma
Ravi Varma

Reputation: 138

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

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

Upvotes: 2

Views: 6034

Answers (2)

Martin Kokeš
Martin Kokeš

Reputation: 11

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.

Upvotes: 1

yenshirak
yenshirak

Reputation: 3106

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

Upvotes: 2

Related Questions