jpayam Posted March 22, 2017 Share Posted March 22, 2017 Hi, In last Cubecart, when a visitor click on change language on page http://mysite.com/SEO-URL.html , site go to http://mysite.com/index.php?seo_path=SEO-URL instead of http://mysite.com/SEO-URL.html Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 22, 2017 Share Posted March 22, 2017 This is my very initial guess at changing this. The reason this ends up looking like it does is because another fix was needed to stop crashes in other situations. In /controllers/controller.index.inc.php, near line 38, find: //Initialize language $GLOBALS['language'] = Language::getInstance(); //Initialize hooks $GLOBALS['hooks'] = HookLoader::getInstance(); //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); //Initialize SEO $GLOBALS['seo'] = SEO::getInstance(); if (isset($_GET['seo_path']) && !empty($_GET['seo_path'])) { $_GET['seo_path'] = preg_replace('/(\/\~[a-z0-9]{1,}\/)/', '', $_GET['seo_path']); // Remove /~username/ from seo_path $GLOBALS['seo']->getItem($_GET['seo_path']); } Change to: //Initialize hooks $GLOBALS['hooks'] = HookLoader::getInstance(); //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); //Initialize SEO $GLOBALS['seo'] = SEO::getInstance(); //Initialize language $GLOBALS['language'] = Language::getInstance(); if (isset($_GET['seo_path']) && !empty($_GET['seo_path'])) { $_GET['seo_path'] = preg_replace('/(\/\~[a-z0-9]{1,}\/)/', '', $_GET['seo_path']); // Remove /~username/ from seo_path $GLOBALS['seo']->getItem($_GET['seo_path']); } The above has been tested only to show that after the customer changes to a different language, the URL is still "friendly". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.