VirtueMart hacks

The shop to be used in Joomla!  is aging a bit - but is still one of most powerful solutions you can found. And with a little hacking you can make it even more terrific!

Multi-currency store: wrong currency on PayPal checkout

VirtueMart is great when you want to set up a store which works with multiple currencies. You can set up your own prices for each currencies in your shop, or you can use one of available currency converters. The core functionality supports the use of European Central Bank's live currency rates, but there are plugins supporting other rates too.

But you can run into trouble where you'd expect to not have any surprises: on PayPal checkout page.

Special quantity options for a VirtueMart Shopper Group

A seemingly simple question caused serious headaches in past weeks. One of my clients who has an already seriously cross-hacked VirtueMart shop (SkinRich) asked me to make it possible, that a specific shopper group she had, the Distributors, namely, to be able to order products only in six-packs, making warehouse people's life much easier, and costs lower. The other users should have the default quantity options.

After thinking a lot about how to solve the problem, I came out with a 4 line simple hack, which works perfectly for me.

Virtuemart Shopper Group discount problem

The VirtueMart forums are full of complaints like:

When a shopper from my wholesale group (50% off) opens the product page it shows the parent products discounted price as the price of each child. Any help would be appreciated.

So, here's the much awaited fix!

VirtueMart's SMTP problems

More and more users are switching to Google Mail, Hotmail and other free mail services these days. It's a great move... unless you have VirtueMart and your Joomla is set to send your mails through SMTP. You may easily end seeing something like:

Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.gmail.com:25

The mails from other Joomla apps are sent, just the VirtueMart is behaving badly. Weird thing is, that you can see in the main Joomla config the mailer set up properly, and the port to be used is 465, as required for Google Mail, but as you can see the error message indicates that VirtueMart tries to use port 25! The problem is that VirtueMart has a code flaw, when sending mails through SMTP the port 25 is hardcoded, and isn't inherited from main Joomla configuration file.

The fix is relatively easy, but you must get your hands dirty with some PHP code.