Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Advanced Ordernumbers 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:

Zip based elivery charges 02 May 2014 07:01 #1

  • raunhar
  • raunhar's Avatar Topic Author
Virtuemart version 2.6

I want a rule for New Zealand Shipping, where there are extra charge if the shipping address is of Rural are. the zip code for Rural area starts from RD.

I tried the following rule:
Name="Free shipping, city area"; Amount>99; Shipping=0
Name="Flat rate, City area"; Shipping=4.99
Name="Reduced rate, rural area"; ZIP~"RD 1"; Amount>99; Shipping=5.99
Name="Flat rate, rural area"; ZIP~"RD 1"; Shipping=10.98

The Vm took the first two line which are for normal delivery. It did not consider the other two lines. Then I tried:
Name="Reduced rate, rural area"; ZIP~"RD 1"; Amount>99; Shipping=5.99
Name="Flat rate, rural area"; ZIP~"RD 1"; Shipping=10.98
Name="Free shipping, city area"; Amount>99; Shipping=0
Name="Flat rate, City area"; Shipping=4.99
This time, it took the rule for Rural Delivery but not for city delivery.

What rule should I give, so that VM takes both the rules.

Please help, as it is very urgent.

Zip based elivery charges 03 May 2014 22:57 #2

Your second set of rules works fine (see attached screenshot)...
The plugin takes both the rural or the city rule, depending on whether the Zip code starts with "RD 1" or not.

Best regards,
Reinhold

PS: To understand why the first set uses only the first two rules, you have to understand how the plugin processes the rules: It goes through the rules one by one, until it finds a rule that matches. It will then use that shipping costs for the whole order, and it will not look at the remaining rules.
In your case, the second rule does not have any conditions, so it will always match. Thus the third and fourth rules will never even be considered by the plugin.
Attachments:

Zip based elivery charges 03 May 2014 23:19 #3

Ah, looking at your other posting, I'm now realizing that you were using the free version of the plugin. Unfortunately the ~ operator to match the beginning of a variable is implemented only in the advanced (i.e. paid) version of the plugin. The free plugin provides only the <, <=, >, >=, <>, != and == operators, but no other operators or functions.

With the advanced version of the plugin, your second set of rules works just fine.

Best regards,
Reinhold
  • Page:
  • 1