Magento: convert all wrong product links in their canonical equivalent.

Rate this post

Sometimes in magento product links are listed in the following mode:
[text][/text]catalog/product/view/id/3/s/product-name/category/3/[text][/text]
which can be very inconvenient from the SEO point of view. To solve this issue you can force a canonical form of product url in following mode:

In theme/template/catalog/product/list replace all instances of
[php]$_product->getProductUrl()[/php]

with
[php]
Mage::getUrl($_product->getUrlKey())
[/php]

You may also like...

Lascia un Commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">