[ic] Barlink not searching locale products

Ton Verhagen tverhagen at alamerce.nl
Fri Feb 4 04:32:02 EST 2005

Quoting Anthony van Winkle <demandread at gmail.com>:
>Originally From Mike Heins:
> >Quoting Anthony van Winkle (demandread at gmail.com):
> >> The problem I'm having is that the links in category_vertical are
> >> still searching the original products database, and thus returning no
> >> results. The foreign database (products_de_DE.gdbm) is fully
> >> functional, because the random and cross_sell products all show up in
> >> German. If I force the bar_link to search it (by adding
> >> fi=products_de_DE) to the scan string then it returns properly. I
> >> cannot figure out how to get the locale variable to influence this
> >> automatically, however.
> >
> >Depending on how the argument is developed, it might be as
> >easy as:
> >
> >       [if scratch mv_locale =~ /^$|__DEFAULT_LOCALE__/]
> >               fi=products
> >       [else]
> >               fi=products_[scratch mv_locale]
> >       [/else]
> >       [/if]
> >
> >--
>Your code to define the fi as the locale products looks good, but I
>can't just toss that into catalog_before.cfg because the bar_link code
>is lower than the interchange variables. If I could imitate the above
>code in perl directly to implement in bar_link, that would work. Or
>did you have a place to utilize the above?
>On a more theoretical level, shouldn't this be inherit in the
>interchange code, to recognize separate products databases for the
>varying languages? Not that prices or quantities change, but
>descriptions and content do. Any input/help is again greatly

Interchange has such functionality already.

You could place the following lines in products.mysql

Database products MAP description de_DE products::description_de
Database products MAP description nl_NL products::description_nl
Database products MAP description fallback 1

If the current locale is nl_NL, the description of a product would be
taken from the description_nl field in the products table. If desired
you could MAP to another table as well, like:

Database products MAP description de_DE products_DE::description

Be sure to restart the Interchange server after making those changes.

Good luck !

Best regards,


Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    info at alamerce.nl    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting 

More information about the interchange-users mailing list