Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

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!

×

Notice

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

TOPIC:

express postage for certain postcodes only 10 Nov 2013 01:59 #1

  • lushplants
  • lushplants's Avatar Topic Author
Hi again,
I was wondering how I would setup the following.
Postage to postcodes 0800-0999 is express post only.
I have 2 different rules setup, one regular post & one express post.
How could I exclude those postcodes from regular post (so regular post doesn't show up, only express post).
Current syntax for regular post below

Name=Flat Rate, add as many plants as you like!; shipping=15
name=N.T. Express post - SMALL PLANTS ONLY; 0800<=ZIP<=0999; 0.5<WEIGHT<=1; shipping=18.50
name=N.T. Express post over 1kg - SMALL PLANTS ONLY. Never pay more than $24.95!; 0800<=ZIP<=0999; WEIGHT>1; shipping=24.95

express postage for certain postcodes only 10 Nov 2013 10:31 #2

Simply place the flat rate last.
The plugin goes through the rules sequentially and returns the first one that matches. Since your flat rate without any conditions is first, it will always match, and the express post rules will never even be considered.

However, if you first check for express post, you can handle the postcodes 0800-0999 first, and if the third rule is ever evaluated, you know that the postcode is not in that range (because if it is, one of the first two rules would have applied).

name=N.T. Express post - SMALL PLANTS ONLY; 0800<=ZIP<=0999; 0.5<WEIGHT<=1; shipping=18.50
name=N.T. Express post over 1kg - SMALL PLANTS ONLY. Never pay more than $24.95!; 0800<=ZIP<=0999; WEIGHT>1; shipping=24.95
Name=Flat Rate, add as many plants as you like!; shipping=15
  • Page:
  • 1