I want to create a discount code that automatically is applied to all shipping countries except for the UK.

My default shipping country is UK but when a new user enters the site magento seems to consider the default shipping country unset until you open the checkout. The result is that if I set the price rule to "Shipping country is not UK" the discount will be applied directly until the user opens the checkout (so the minicart and shopping cart page will show the wrong price until the user reaches checkout).

A solution that works is to set a rule for every non-uk country as in hundreds of rows of "Shipping country is Canada", "Shipping country is Australia", etc. I am though not really interested in spending a couple of days entering all these.

So I'm all ears for ideas on how I can get my price rule to not apply for users that havn't set their shipping country and for users that have set it to UK but have it applied for all other countries. And to do this without manually entering hundreds of lines in the price rules.

2 Answers 2


Step 1: Create your initial Rule

  • Add the Condition Shipping Country is not United Kingdom
  • Add a Priority e.g. 5
  • Add the Discount

Step 2: Create a Second Rule

  • Add the Condition Shipping Country is ... <- Leave the Country Empty
  • Add a Priority e.g. 3 (should be lower the the Priority from Rule 1)
  • Choose in the Action Tab Stop Further Rules Processing = Yes


The Second rule serves as a "Stop-Rule". What happen is, the Stop Rule has an lower Priority, so this rule fires first. For a new User the Condition of the Rule is true, because the shipping country is ... (empty). And then it stops all further Rules.
If the first Rule is true, shipping country != GB (the second rule is automatically false). So, the customer gets the discount.

This solution doesn't affect other rules, because the default priority is 0.


Figured out another possible solution myself. The cart price rules allow matching on shipping method. So if you have unique shipping methods for non-EU countries you can match the rule on that.

Having unique shipping methods for different countries is not always the case when running the default magento methods. But if you you use a shipping extension such as Meanbee's you can create very unique shipping methods for specific countries, regions or stuff like customer groups. These can then in turn be used to trigger price rules.

Your Answer

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

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