Tuesday, 27 November 2012 21:27

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 );

Good Luck!

Thursday, 22 November 2012 22:37

This is a Small tutorial on how to use Virtuemart’s jQuery, CSS and Javascripts in your Joomla extensions (components, modules or plugins)
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.

    if (!class_exists ('VmConfig')) {
        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.
vmJsApi::cssSite ();

Thursday, 27 September 2012 08:22

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

P == Pending
U == Confirmed by shopper
C == Confirmed
X == Cancelled
R == Refunded
S == Shipped
This could be important for any developer who might want to do a plugin for confirmed or cancelled order. For instance, if you want to send an additional email on every confirmed order... or if you want to perform a specific action after order status change.

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'



Wednesday, 04 April 2012 19:08

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.


1. Selecting PayPal not working in IE (Some Javascript problem) (I also figured out that if you have jquery loading on your site... then this is a problem for Firefox and Chrome as well.)

Solution here:

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]


change to:

[code]<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="2" />[/code]




2. PayPal API showing a blank Credit Card Option Even though its not required or working.

Described here:

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:


4. Update Shipping Address, Billing address while in checkout process and get redirected to last step.

Conditions :

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.

Saturday, 06 April 2013 23:43

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);
return $db->loadResult();


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 This e-mail address is being protected from spambots. You need JavaScript enabled to view it and we can help you make the change on an hourly basis.


JoomDev Corporation