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!

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

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.