I faced redirection problem on all the form of virtumart. I used joomla 1.5.15 and virtumart 1.1.4.
The problem is when user register and submit the form it move to index.php(home) page. same problem on checkout section for Next button or when I change/add shipping address, its always redirect to home page. I have found some solution someone suggest to change action url from “PHP_SELF” to “REQUEST_URI”, it worked for some form but not all the form.
I have fount one solution which is really great, here is that
1. Find the file ‘libraries/joomla/application/application.php’
2. Find these 2 lines (they are located somewhere around line #191)
// get the full request URI $uri = clone(JURI::getInstance());
put the following code after the above line
// VM uri fix if (!$uri->getVar('Itemid') && isset($_REQUEST['Itemid']) || !$uri->getVar('option') && isset($_REQUEST['option'])) { if (!$uri->getVar('Itemid') && isset($_REQUEST['Itemid'])) { $uri->_query = ($uri->_query ? '&' : '').'Itemid='.(int)$_REQUEST['Itemid']; } if (!$uri->getVar('option') && isset($_REQUEST['option'])) { $uri->_query = ($uri->_query ? '&' : '').'option='.$_REQUEST['option']; } parse_str($uri->_query, $uri->_vars); } // end VM uri fix
Its worked, each and every form of virtumart working properly.