Shipping by Rules for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1


Rules for multiple manufacturers 07 Mar 2016 23:07 #1

  • fcdigital
  • fcdigital's Avatar Topic Author
  • Offline
  • Posts: 1

I have a store with 3 different manufacturers A, B, C. I need to write a rule that help me to charge extra shipment in case products came from different manufacturers. Example:

3 products from manufacturer A, shipping $10

But in case are 3 products 1 from A 1 from B and 1 from C, shipping should be $30, $10 for each manufacturer.

Or even a more complex rule, same case that above but shipping A $5 shipping B $8 and shipping C $12

Please how can I write this kind of rules?


Please Log in or Create an account to join the conversation.

Rules for multiple manufacturers 08 Mar 2016 21:37 #2

Der fcdigital,
If I understand you correctly, your have three manufacturers, and each of them has a flat rate of $5, $8 and $12 independent of how many products are ordered.

The first case (each manufacturer has a $10 flat rate) is very simple:

The second case (each manufacturer has a different rate) is a little more work, but still quite simple:
Variable=MyShipping; Value=0;
Variable=MyShipping; 1 in Manufacturers; Value=MyShipping+5
Variable=MyShipping; 2 in Manufacturers; Value=MyShipping+8
Variable=MyShipping; 3 in Manufacturers; Value=MyShipping+12

It might also work to use contains_any as a multiplier (contains_any is zero if the manufacturer is not in the list, 1 if it is):
Shipping=5*contains_any(Manufacturers, 1) + 8*contains_any(Manufacturers, 2) +12*contains_any(Manufacturers, 3)
Please notice that I haven't tried the last example (and we have never tested contains_any to be used as such a multiplier, but if you are lucky, it might work out). Please let me know i this works.

Best regards,

PS: You will need the advanced version of the plugin, because all of the examples above use mathematical expressions and list handling (the Manufacturers list is a list, so there is really no way around this)...

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

VM - Shopping cart


Cart empty

Login Formular