Language login redirect on J3.4.1 with multilanguage site

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Language login redirect on J3.4.1 with multilanguage site

Postby admin » Wed Apr 29, 2015 3:09 pm

Hello friends, if you are using Joomla 3.4.1 and you are struggling with multilanguage, you may want to try our fix for proper language redirect.

This is the problem:
- when an English user logs into Spanish (default language) OPC cart page, he gets redirected to the front page
- if you configure Menu associations within joomla 3.4.x (you create a VM's Cart link to both languages EN+ES and set up OPC to use these IDs), the reverse logic does work (when a Spanish customer logs into English OPC Cart page)

To solve this problem (possibly only on 3.4.1) you may want to comment the line which alters the return URL of the user being logged in:

\plugins\system\languagefilter\languagefilter.php

comment this section:

Code: Select all

            // Change the redirect (language has changed).
            /*
            if (isset($associations[$lang_code]) && $menu->getItem($associations[$lang_code]))
            {
               $itemid = $associations[$lang_code];
               $this->app->setUserState('users.login.form.return', 'index.php?&Itemid=' . $itemid);
            }
            else
            {
               JLoader::register('MultilangstatusHelper', JPATH_ADMINISTRATOR . '/components/com_languages/helpers/multilangstatus.php');
               $homes   = MultilangstatusHelper::getHomepages();
               $itemid = isset($homes[$lang_code]) ? $homes[$lang_code]->id : $homes['*']->id;
               $this->app->setUserState('users.login.form.return', 'index.php?&Itemid=' . $itemid);
            }
*/


The above code alters the return URL, BUT the return URL is further processed within the user login controller and router, thus the URL alteration here does not make sense.

Best Regards, Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron