4

I'm creating the shipping rates depending on country. I've got groups of countries with the same rate.

I've installed Shipping 2.0 and Flat Rate module.

I've limited the available countries through the customer profile and then I've created the flat rates for group of country (ITALY or BRAZIL) and some for a single country (UK).

In the components I did this

Condition: Order address component comparision

Address : Shipping address

Address component : Country

VALUE : GB

(REMEMBER, THE VALUE IS THE TWO LETTER ABBREVIATION, ITALY WILL BE IT AND UNITED KINGDOM IS GB. YOU CAN FIND IT LOOKING A THE HTML OF THE SHIPPING FORM)

I've added one condition per each country of that group. I've implemented with OR but for some reason it does not work.

This is the result: Condition 1 : IT

OR

Condition 2: FR

This does not work, so I tried:

Condition 1: IT

--OR

----Condition 2: FR

But nothing...

What Am I doing wrong? It's something related to the "OR"?

The flat rate with single country works, the one with complex rules doesn't.


I SOLVED IT: IT WAS THE CONDITIONS POSITIONS. THE RIGHT WAY TO USE "OR" IS THIS:

OR

--CONTITION 1

--CONTIDION 2

HERE YOU CAN FIN A REALLE NICE RULES TUTORIAL

2 Answers 2

7

The OR and AND-groups takes all conditions inside of them with the chosen operator.

Your:

Condition 1: IT
--OR
----Condition 2: FR

Will be converted into ([Condition 1] AND ([Condition 2])).

Try putting both Condition 1 and Condition 2 in the OR-group:

--OR
----Condition 1: IT
----Condition 2: FR

This should be converted into ([Condition 1] OR [Condition 2]). If that's what you're after.

Edit: Just a couple of minutes too late :)

0
0

I am trying to exclude a shipping rate for certain countries and had no luck with the examples above.

But this one works:

--NOT Country A
--OR
----NOT Country B
--OR
----NOT Country C

1
  • You would actually not need the OR-groups in your example above which is the same as: (NOT Country A) AND (NOT Country B) AND (NOT Country C).
    – hampusn
    Jan 9, 2016 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.