1

I want to form a SEF url for the products. For example, if the product name is Sony Ericcsson K550 , my url will be sony-ericcsson-k550. But in case of other languages like turkish, russian and chinese if we enter product name in those particular languages i want to do the same (to form a product url) with out using another field to get product name in english.

I have checked in magento with russian language, when i entered russian language it tooks russian texts for product name and it forms product url in a different manner in english language.

For example, in magento i have added product name as "Новые, Xbox 360 Slim, любой модификации" and it forms an url as follows. privet-jeto-ispytanij-produkta

How it is possible? How to do it in normal php? can any one help me? Thanks in advance.

jeeva
  • 1,573
  • 2
  • 15
  • 24

2 Answers2

0

You can specify the product URL key at a store view level. Russian, turkish, etc are store views. When you edit the product you can change the scope:

  • Choose Store View (top - left corner)
  • Put the value you need in the field: URL Key
  • Save

Using php, you need to specify the storeId:

Mage::app()->setCurrentStore(STORE_ID);
$product
->setUrlKey('your-url-key-at-a-store-view-level')
->save()
FlorinelChis
  • 1,488
  • 1
  • 11
  • 24
  • Thanks for your info FlorinelChis.. But i don't need it in magento. I need to do it in plain php. how to do it? – jeeva Dec 31 '12 at 09:25
  • Seems like you need to start with a step back and open another question: how do I work with Magento using php... – FlorinelChis Dec 31 '12 at 09:43
  • Please understand my question. I want the same type of functionality in normal php. i don't want to use it in magneto. I told magento for example. can any one help me? – jeeva Jan 02 '13 at 10:34
  • I could not find what was done in magento to generate the url .So kindly any one post the required code ? It ll be very helpful to me – jeeva Jan 05 '13 at 04:37
0

By default magento dose not support non-latin characters in URL key, but there is an extension on Magento connect, named "URL Key Master by Magendev" which allows you to use any character in almost any language in URL key which is more SEF.

it also can automatically generate and replace new URL keys base on product name with your old messy URL keys in a safe and quick way just by two clicks.

take a look at these videos:

http://magendev.com/urlkeymaster-doc/urlkeymaster-introduction.html http://magendev.com/urlkeymaster-doc/urlkeymaster-auto-generate.html

quantum
  • 16
  • 1