[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Interchange on Mac OS X Panther Locale problem.. nearly solved


At 22:14 25/02/2004, you wrote:

On 24 Feb 2004, at 22:12, Mark Bryant wrote:

At 20:53 24/02/2004, you wrote:

Hi All,

I am running Interchange 5.1 on Mac OS X 10.3.2 Panther With standard Apache, MySQL and recompiled unthreaded perl 5.8.3. Its not a production site just a test rig in fact its running on a G3 Lombard Powerbook and it works fine.

But I am having a problem setting the locale for the UK I have set the locale to be en_GB in the catalog.cfg file and in the Admin interface under internationalisation.

I have added a en_GB column to locale.txt in products directory

I have attempted to set the default tax to VAT and 17.5 % in the tax admin area

I have also tried to crib as much as I can from www.webmaint.net's excellent UK localisation documentation (thanks) and from the interchange documentation wiki.

The result is that Tax does not work and I have lost the default dollar sign but the UK pound sign has not appeared.

I don't think the problem is down to Mac OS X it is more likely to be I have missed some steps in the localisation.

Can anyone give me some pointers please.

Thanks,

Hillary

Hi Hilary,

To get UK tax showing through in pages such as the fly page and components like random, best sellers, etc after setting the tax in the admin UI, I still had to put this usertag in my catalog.cfg and edit a few pages to make them call/use it:

# per item tax calculations
UserTag addtax Order amount cat notax
UserTag addtax addAttr
UserTag addtax Routine   <<EOR
sub {
        my ($amount, $cat, $notax, $ref) = @_;
        return currency( $amount, $ref->{noformat} ) if $notax;
        my $cfield = $::Variable->{MV_COUNTRY_FIELD} || 'country';
        my $country = $ref->{country} || $::Values->{$cfield};
        return 0 if ! $country;
        my $ctable   = $ref->{country_table}
                                || $::Variable->{MV_COUNTRY_TABLE}
                                || 'country';
        my $c_taxfield   = $ref->{country_tax_field}
                                || $::Variable->{MV_COUNTRY_TAX_FIELD}
                                || 'tax';
        my $type ||= $Tag->data($ctable, $c_taxfield, $country);
        return currency( $amount, $ref->{noformat} ) if ! $type;
        $type =~ s/^\s+//;
        $type =~ s/\s+$//;
        my $tax = Vend::Util::get_option_hash($type);
        my $taxrate = defined $tax->{$cat} ? $tax->{$cat} : $tax->{default};
        $taxrate =~ s/\s*%\s*$// and $taxrate /= 100;
        $amount += $amount * $taxrate;
        return currency( $amount, $ref->{noformat} );
}
EOR



I then edited the pages that were not showing the tax inclusive prices to use this line instead of the default one

Our Price: <b>[item-price]</b>

becomes:

Our Price: <b>[addtax [item-price noformat=1][item-field tax_category][item-field nontaxable]]</b>

The GBP pound sign should then appear along with the tax inclusive price.

I hope this helps solve your problem :)

Mark



Eros Shop
vwe internet ltd
PO BOX 1067
SLOUGH
SL1 7YA
UK

Shop - http://www.eros-shop.co.uk
EMail - suppressed
Tel - 0870 737 3369
Fax - 0870 737 4469

Hi Mark, All,

Thanks for the pointers everyone. I have made some progress.

I looked at Marks suggestion but could not see why I would have to enter that much code when previous versions of Interchange worked OK So....

By carefully re-reading the instructions at www.webmaint.net I realised that I had been going to the admin > preferences . Tax part of the menu when I should have been going to admin > COMMERCE > tax

Duh. When I did that and set the tax rate and shipping as directed Tax worked but I still could not get a GBP Pound sign.

I then looked at the ISO listing of country names and found that the UK and Great Britain are treated as two separate places. With ISO information letter code GBR iso number 826 but blanks for the similar rows in the UK entry. I copied the GBR code and 826 number into the respective places in the UK entry and presto it worked.

However.... The pound sign has now replaced the dollar *after* the price. But in the UK the currency symbol should appear *before* the price.

I tried altering the price_picture entry for en_GB in locale.txt but this has not worked.

So I am again asking for help. Are there any other ways I should try and set the pound sign correctly?

best wishes,

Hillary

Hillary,

In your locale.txt, make sure that p_cs_precedes is set to 1 for the en_GB column and apply changes. That should sort the location of the pound sign for you :)

Mark




Eros Shop
vwe internet ltd
PO BOX 1067
SLOUGH
SL1 7YA
UK

Shop - http://www.eros-shop.co.uk
EMail - suppressed
Tel - 0870 737 3369
Fax - 0870 737 4469


_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.