In this post... we will show you on how to manage redirect after the Registration process in Virtuemart.
There are two type of registrations.
1. During the checkout process, where user is automatically redirected back to the shopping cart.
2. When you create a menu item type "Account Maintenance" for Virtuemart.
By default the user will be redirected to the Edit Address page... but you can change it by going to the following file and change following code.
file: JOOMLA_ROOT/components/com_virtuemart/controllers/user.php (line 145)
You will see a function named saveUser and just like after that is the code
$this->setRedirect( JRoute::_('index.php?option=com_virtuemart&view=user&layout='.$layout), $msg );
Now, you can change this to index.php if you want to redirect you users to the homepage or any page... doesn't matter.
$this->setRedirect( JRoute::_('index.php'), $msg );
The reason you should using the Virtuemart’s CSS is to maintain consistency according to your Virtuemart site. This will automatically pick up templates overrides too (if any).
First of all… you will need to include the main config file using the code below.
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php');
Code for adding Virtuemart jQuery.
Code for adding Virtuemart Scripts.
Code for adding Virtuemart Frontend CSS.
VM 2.0 has been released and up for a while and here is some handy information you can use about Order Statuses and code associated with each of them.
The following Status codes are avaliable Virtuemart 2.0.x
U == Confirmed by shopper
C == Confirmed
X == Cancelled
R == Refunded
S == Shipped
I have also attached a plugin to this post which works with Virtuemart's plugin group 'vmpayment' and event 'plgVmConfirmedOrder'. The attached plugin is install able and returns two arrays with the current Cart info in '$cart' and current order info in '$order'
There have been multiple problems over the forum for PayPal new API and i will try to explain or combine most of them here on this post.
go to file: in [JOOMLA_HOME]/components/com_virtuemart\themes\default\templates\checkout\get_payment_method_paypal_ex.tpl.php
line 78 would look something like this:
[code]<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />[/code]
[code]<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="2" />[/code]
NOTE: PLEASE ONLY APPLY THIS PATCH IF YOU ONLY USE ONE PAYMENT METHOD “Paypal (new API)", THIS WILL DISABLE THE SELECTION FOR OTHER PAYMENT METHODS.
2. PayPal API showing a blank Credit Card Option Even though its not required or working.
The above link actually solves your problem and will not display the Credit Card blank option.
3. "Error: PayPal returned: Tax total is invalid.
This occurs if you are not charging Tax to your customers but PayPal API still needs a 0.00 tax amount.
Fix described here: http://forum.virtuemart.net/index.php?topic=78957.0
4. Update Shipping Address, Billing address while in checkout process and get redirected to last step.
1. Normally users are redirected to PayPal or charged at end of step 4.
2. In New PayPal API... users are redirected to PayPal after step 3 (selecting payment method)
3. After users edit their info during the checkout process... they are redirected to step 4.
3. Unfortunately, there is no Step 4 using the New PayPal API! Therefore it gives out two errors.
I am unable to resolve this one yet.
One of the most common things Joomla doesn't have is a Core "Login Via Email" option that can be enabled by core. There are plugins for it Email as Username.
This can be benefical for your website users and they have and option to login either via Email or Username (both using the same password).
In the tutorial below we will be hacking two of the core Joomla files (Joomla User helper Library and Joomla authentication plugin).
File: JOOMLA_ROOT/libraries/joomla/user/helper.php (around line: 294) look for function getUserId.
Once found... repalce all the function code with the code below.
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->where($db->quoteName('username') . ' = ' . $db->quote($username));
$db->setQuery($query, 0, 1);
Now the plugin
File: JOOMLA_ROOT/plugins/authentication/joomla/joomla.php (around line: 44) it's in the very first function onUserAuthenticate.
Change the query from line 48 to the following.
$query->where('username=' . $db->Quote($credentials['username']));
That should do it and as explained above, Your website users will be able to login using thier username or email using the same password :).
Please do Backup your website before you making any changes and it is not recommented at all to make changed to the core code as it may get overwritten next time you update your Joomla Install. If you don't feel comfortable editing the code your self... you may contact us at
and we can help you make the change on an hourly basis.