5

The site has 2 languages: English and French, represented by 2 store views. French is the default one. For our SEO efforts we need to have the following urls:

French - http://www.domain.com/category/product
English - http://www.domain.com/en/category/product

System -> Configuration -> Web -> Add Store Codes to URL is the all or nothing setting. i turn it off for the default store only. I’ve done a lot of searching through the forums and wiki but there’s nothing on the subject.

Please any sugestions?

7

By chance I worked on this same problem recently and created this store codes extension. It works by inserting itself into the router chain, something most module devs aren't even aware of. Instructions are given on the github page.

Caveat Emptor: I've only used this on one site so far and it's not yet released on Magento Connect because it lacks testing.

  • thanks @clockworkgeek for your reply , but tell how i can use your post on github to slove my problem? – karim karimeri Sep 9 '14 at 16:32
  • There is a "Download ZIP" button on that page. Click it. When you have that ZIP extract the "app" folder from it to your Magento web folder. – clockworkgeek Sep 9 '14 at 16:39
  • ok i will add your module to my project and i will reply you about the result – karim karimeri Sep 9 '14 at 16:47
  • @ clockworkgeek , i have installed your module and i did all the instruction in you guid but when i run my application , it gives me thie error : Fatal error: Call to a member function getIdFieldName() on a non-object in C:\wamp\www\project-name\includes\src__default.php on line 5504 , have you an idea about this error ? – karim karimeri Sep 9 '14 at 18:03
  • Yes. You have compilation turned on which means you need to go to "System > Tools > Compilation" and click the rebuild button after installing extensions. – clockworkgeek Sep 9 '14 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.