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!



The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1


Filter categories or sku 06 Nov 2013 12:32 #1

  • Valerio
  • Valerio's Avatar Topic Author
I wanted to do a standard shipping for all products except for one category to which I wanted to do it for free. and so far I have done so
Name = standard; Categories! = List (9) Shipping = 9
Name = Free; Categories == list (9) Shipping = 0
but that if I wanted the basket there were mixed products ie those on normal and free shipping cost had another .. but I could not configure it with them using the sku Categories

Name=standard;Categories != list(9); Shipping=9
Name=Misto;Categories == list(9) AND Categories<2 ; Shipping=6
Name=Gratis;Categories == list(9); Shipping=0

How can I do?

Filter categories or sku 09 Nov 2013 12:58 #2

If I understand you correctly, you want shipping costs as follows (notice that I rearranged the logic a bit):
-) I the user only buys products from category 9, shipping is free
-) Otherwise, if the user buys products from category 9 AND some other category, shipping is 6
-) If the user buys only products from other categories (i.e. the conditions of the first two lines are not met), then the shipping is 9

With my plugin, a rule will only be evaluated if none of the rules above apply. so e.g. in the second rule you can safely assume that the conditions of the first rule are not met. With this additional knowledge, your rules can be written as:
Name=Gratis; Categories == list(9); Shipping=0
Name=Misto; 9 in Categories; Shipping=6
Name=Standart; Shipping=0

The first rule checks whether category 9 is the only category, and in that case provides free shipping.
In the second rule you know that category 9 is NOT the only category, so we only need to check whether category 9 is in the cart at all.
And in the third rule we know that category 9 is NOT in the cart at all, so we don't need any further checks.
  • Page:
  • 1