VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: Why this syntax doesn't work?

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

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
The administrator has disabled public write access.

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
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular