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


Postal Code Exclusion Not Recognized 01 Oct 2013 03:22 #1

  • closethedistance
  • closethedistance's Avatar Topic Author
I am trying to set different shipping rates based on location in Canada and exclude the territories, so I entered the following rule:

Name="No shipping available"; Canada_Area=="X"; NoShipping
Name="Newfoundland"; Canada_Area=="A" AND "A"<=Canada_Subarea<="N"; Shipping=50
Name="PEI"; Canada_Area=="C"; Shipping=50
Name="Free Shipping"; 0<=Amount; Shipping=0

This rule works for everything but the first rule (No shipping to Canada_Area=="X"). When I enter X0A 0H0 for the customer's shipping address postal code the cart says "No shipment selected". When I try to "Select shipment" it says that no shipment method matches the characteristics of my order. Again, if I have an address in any of the other postal code ranges, it works fine. Can you tell me what am I doing wrong?

I've tried the first rule as both:
Name="No shipping available"; Canada_Area=="X"; Shipping=NoShipping


Name="No shipping available"; Canada_Area=="X"; NoShipping

Neither works for me.

Thanks for your help.

Postal Code Exclusion Not Recognized 02 Oct 2013 14:03 #2

Unfortunately, VirtueMart itself is not so flexible. A shipping plugin can only provide a shipping rate, in which case the name will be displayed, or it offeres not shipping rate, but then it can not show any message...
So, it is not possible for the shipping plugin to display the Name string to the user, unless the plugin offers a shipping rate.

Basically, what you experience (a postal code of X0A 0H0 not offering the free shipping of your fourth rule) is actually the best that can currently be done in VirtueMart.


PS: I have amended the docs on NoShipping to make this clear.

Postal Code Exclusion Not Recognized 02 Oct 2013 14:23 #3

  • closethedistance
  • closethedistance's Avatar Topic Author
Thank you. Your explanation makes sense. I had not understood Virtuemart's limitations.

I'm probably going to hack my Virtuemart site to make it work the way I need it to in conjunction with your Shipping by Rules plugin (which is great, by the way).
  • Page:
  • 1