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


Shippment doesn't work 24 Feb 2014 10:26 #1

  • cespal
  • cespal's Avatar Topic Author

In Shipping by Rules Plugin for VirtueMart 2 I have diferents zip in the same country. When the buyer put his zip I want that automatically show the cost.
But I have a problem. In the zip code 25000-25999, if they make purchases over 30 euros, this is free.
And in the other zips, if you have a purchase amount 80 is free.
How I mix this information? I've tried:

Name=Zaragoza; 50000<=ZIP1<50999; Shipping=3.99
Name=Free shipping above 30€;30<=Amount;Shipping=0
Name=Barcelona; 08000<=ZIP2<08999; Shipping=5.99
Name=Las palmas; 35000<=ZIP3<35999; Shipping=5.99
Name=Free shipping above 80€;80<=Amount;Shipping=0

Thank you very much

Shippment doesn't work 24 Feb 2014 13:03 #2

To find the solution, you have to understand how the rules are evaluated: The plugin uses the **first rule that matches**. This means that you should always place the rules for free shipping first, and that you need to include the ZIP check in the rule for free shipping, too.

Also, you need to understand that each rule is interpreted on its own. In particular, you cannot group several rules like you appear to do for e.g. Zaragoza. The "Name=Zaragoza; 50000<=ZIP<50999;" conditions only apply in the line where they are written. In the next line these conditions do NOT apply automatically, but have to be repeated in general.

And third, it appears you misunderstood the ZIP1, ZIP2 variables: ZIP1 is the very first digit of the postal code, ZIP2 are the first two digits of the postal code. If you want to check the whole postal code, you need to use the ZIP variable.

I would use the following rules:
Name=Zaragoza; 50000<=ZIP<50999; 30<=Amount; Shipping=0
Name=Zaragoza; 50000<=ZIP<50999; Shipping=3.99

Name=Barcelona, free shipping above 80€; 08000<=ZIP<08999; 80<=Amount; Shipping=5.99
Name=Barcelona; 08000<=ZIP<08999; Shipping=5.99

Name=Las palmas, free shipping above 80€; 35000<=ZIP<35999; 80<=Amount; Shipping=5.99
Name=Las palmas; 35000<=ZIP<35999; Shipping=5.99
  • Page:
  • 1