[ic] Using IF to check [country-region]???

interchange at tvcables.co.uk interchange at tvcables.co.uk
Wed Sep 1 15:36:15 EDT 2004

Quoting Jon Jensen <jon at endpoint.com>:

> On Wed, 1 Sep 2004 interchange at tvcables.co.uk wrote:
> > Today I am trying to build an IF based on country region, I have tried
> this:-
> > 
> > [if value country-region ="Europe-EC"]
> > do something.....
> > [/if]
> > 
> > But is doesn't work.
> What is "country-region"? Is that actually a value you set somewhere? 
> Normally you'd name values variables with Perl-standard names, e.g. _ 
> instead of - and the = operator is not valid either. You need 'eq' for 
> string comparisons:
> [if value country_region eq "Europe-EC"]
> But that's not going to do you any good if you don't set the 
> "country_region" value somewhere first ...

country-region is stored in the country table, default options are Europe-EC, 
North America or Other. I decided to use this for assigning my own sales tax 
at checkout as the built in sales tax (IMHO) sucks and has errors in the 
calculation if any discounts are applied.


More information about the interchange-users mailing list