Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

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:

Why this syntax doesn't work? 12 Oct 2015 12:18 #1

  • marceff
  • marceff's Avatar Topic Author
Hi,
I regret to post this question, because I already know it will be a very stupid issue...
I am trying to set a very simple rule: customer who buys 50 (or more) Eur of products won't pay shipping fee.
Here is the code:

Name=Shipping to Sardegna oristano; 08010<=ZIP<09170; Shipping=5.88
Name=Shipping to Sardegna sassari; 07010<=ZIP<07100; Shipping=5.88
(the above codes are for different zone shipping fee, just to show you others codes I set up)

Name=Shipping to Italy; Shipping=5.48;
Name=Free Shipping; 50<=Amount;0.00

I have tried several variable sintax but when I simulate a purchase it always shows the "Shipping to Italy" fee.
If I simulate a purchase from one of the above ZIP code it works correctly.
What am I doing wrong?
Thanks
PS I am on Joomla 2.5 and VM 2.6

Why this syntax doesn't work? 14 Oct 2015 22:36 #2

Dear Marceff,
You need to be aware of how the plugin evaluates the rules: It simply goes through the rules, one after the other, until it finds a matching rule.
In your case, the "Shipping to Italy" rule has not conditions at all, so it will always match and thus offer a shipping rate of 5.48. The next rule for shipping will never be evaluated.

So, the general advice / approach is to put rules with conditions FIRST:
Name=Free Shipping; 50<=Amount;0.00
Name=Shipping to Sardegna oristano; 08010<=ZIP<09170; Shipping=5.88
Name=Shipping to Sardegna sassari; 07010<=ZIP<07100; Shipping=5.88
Name=Shipping to Italy; Shipping=5.48;

Best regards,
Reinhold
  • Page:
  • 1