Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - Difference between url_path and url_key

Pretty much everything is in the title of my question.

What is the difference between the columns url_path and url_key in the flat products tables - like catalog_product_flat_(store_id) - of Magento ?

Thanks !

like image 456
Laila Avatar asked Mar 03 '15 23:03

Laila


People also ask

What is an URL key?

The URL key is the part of a static URL that describes the product or category. When you create a product or category, an initial URL key is automatically generated, based on the name. To change the URL key, see the Search Engine Optimization section of the product information.

What is URL key in Magento?

What is the Magento URL key? Basically, the Magento URL key is a part of a product URL that is an address of a product page on your website. As you can see below, it is identical to the product mentioned in terms of content. About format, it contains a case with hyphens to separate the word.


1 Answers

  • url_key is the field you fill in the admin as is. (If there is nothing specified it create one by using the name of the product by lowercasing it and replace blank in it with hyphen).

  • url_path will be a concatenation of url_key and the Product URL Suffix defined under System > configuration > Catalog > Search Engine Optimization. It will also ensure that you do not have duplicate url_path by suffixing your url_key with an hyphen and the entity_id of the product if the same url_key already exists.

like image 150
β.εηοιτ.βε Avatar answered Oct 03 '22 02:10

β.εηοιτ.βε