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


UK inward postcode 26 Sep 2013 15:51 #1

  • wanniez
  • wanniez's Avatar Topic Author

I would like set up the rule depending on the inward code for example All BH4 8A* is charged £2 for delivery no matter what the last letter of the postcode is. Do I just put :

Name="£2 Delivery charge"; UK_Outward=="BH4" AND UK_Inward=="8A","8B","8D","8W","8X","8Y","9D","9N","9Y","9Z"."0"; Shipping=2.00

I did this and had an error "Error during parsing expression". Please help.

Thanks so much

UK inward postcode 28 Sep 2013 22:01 #2

The comparison operator == can only take one value to compare and not a list like you tried.

Unfortunately, I currently don't have any short solution to check the first two letters of the inward code. The only way I see is to use the ~ operator and check each of the values explicitly:
Name="£2 Delivery charge"; UK_Outward=="BH4" AND (UK_Inward~"8A" OR UK_Inward~"8B" OR UK_Inward~"8D" OR UK_Inward~"8W" OR UK_Inward~"8X" OR UK_Inward~"8Y" OR UK_Inward~"9D" OR UK_Inward~"9N" OR UK_Inward~"9Y" OR UK_Inward~"9Z"); Shipping=2.00

I have put it on my TODO list to add a "substring" function that can e.g. return just the first two letters of the inward code. With such a function one could then use a rule:
Name="£2 Delivery charge"; UK_Outward=="BH4" AND substring(UK_Inward,1,2) in list("8A","8B","8D","8W","8X","8Y","9D","9N","9Y","9Z"); Shipping=2.00
However, this is just an idea for now. I have no idea when and if I'll be able to add such a function.

  • Page:
  • 1