Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

URL key of product doesn’t get updated if suffix (-1, -2) is created
 
Georg Ringer
Member
 
Avatar
Total Posts:  63
Joined:  2008-07-04
Linz, Austria
 

Hi,

I just found a bug concerning the url_key and reported it (http://www.magentocommerce.com/bug-tracking/issue/?issue=2983).

Maybe got the same problems and maybe my fix is fine for you too!

The text is the same as in the bug report
Imagine 2 products in the same category with the title “cellphone”. If you just save the products in the admin section, both will get the url_key “cellphone”. Same if you import products via MagentoConnect!

If you browse the shop, one product will get the url “cellphone.html” and one “cellphone-1.html” which is nearly perfect. The bug is that the field url_key of the product doesn’t get updated and so the url key is just wrong!

Problems because of that bug
- I try to export all my products and want to use the url_key field to create a navigation to the products but I can’t because I can’t trust the field!
- $_product->getUrlPath() will deliver also a not valid value (yes not the best way to create a navigation but still).

My bugfix is now to get the entity_id with SELECT entity_id FROM catalog_product_entity WHERE sku= $product[$sku] and after that the real url with SELECT value FROM catalog_product_entity_varchar WHERE $entity_id AND attribute_id=570

It is really important to fix this to be able to create links from an csv

Georg

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top