<script>
var countries = ["BE", "BG", "CZ", "DK", "DE", "EE", "IE", "GR", "ES", "FR", "HR", "IT", "CY", "LV", "LT", "LU", "HU", "MT", "NL", "AT", "PL", "PT", "RO", "SI", "SK", "FI", "SE", "GB", "IS"]
$.get("https://ipinfo.io", function(response) {
if(countries.indexOf(response.country) === -1) {
var discount = '<input type="hidden" name="discount" value="EU tax regulation">'
$('form').append(discount);
}
}, "jsonp");
</script>
Hi,
I was able to add discount code on the cart via script, dont know if this help you.
This will add a discount code to the cart if the user is our case is outside EU.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |