View Single Post
  #3  
Old 07-21-2015, 06:34 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default Re: x5 - Subdirectories for languages using htaccess rewrite

In the end I found I had to go to the top and in var/run/classes/XLiteAbstract.php

edit getShopURL

Code:
public function getShopURL($url = '', $isSecure = null, array $params = array()) { $url = 'es/'.$url ; return \XLite\Core\URLManager::getShopURL($url, $isSecure, $params); }

to get the subdirectory to appear in links. This is just a test! I now have to incorporate the code here x5 set language from browser and make it into a module.

There is one thing that doesn't work though.. when there's more than one category in the url (ie domain.com/es/toys/rc-toys) gives a page not found.
__________________
Core version: 5.5.xx
Reply With Quote