[ic] Catalog v.s. admin: locale change

Ton Verhagen tverhagen at alamerce.nl
Tue Jun 26 05:51:59 EDT 2007

Quoting Ton:
At 11:31 AM 6/26/2007, you wrote:
>Quoting Racke:
>At 09:36 PM 6/25/2007, you wrote:
>>Ton Verhagen wrote:
>>>Dear All,
>>>With every order we save the locale under which the
>>>order is placed. Doing so enables us to print the invoice
>>>(and packing list) in the customer's locale.
>>>Unfortunately one problem occurs:
>>>In the admin it seems not possible to change the locale on the fly.
>>>In other words the [setlocale] tag does not work....
>>Unfortunately the UI has its own set of locales.
>>>The only way getting the invoice and packing list print in the
>>>corresponding locale is to login with the locale set on the login page.
>>>What could we do in order to be able to print a bunch of invoices
>>>in one go, all with their own locale?
>>The code switching to the "UI" locale is contained in [mm_locale].
>>You can probably figure out a way to keep the catalog locale by
>>passing a scratch variable on your print page and modify the 
>>[mm_locale] code slightly.
>Wouldn't it be better/simpler to add an option to the [mm_locale] tag?
>[mm_locale catalog=1]
>         or
>[mm_locale no_admin=1]
>When catalog=1 (or no_admin=1) is set, the Locale repository of the
>catalog is used. Also the mv_shadowpass wouldn't be set in such case.

Forgot some code, see below.

>Doing so would enable one to do the following:
>[loop list="[value-extended order]"]
>         [comment]
>                 Loop over selected orders
>         [/comment]

                 Set locale for current order
         [value name="ui_locale" set="[loop-data transactions 
currency_locale]" hide=1]
         [mm_locale catalog=1]
         [tmp mv_shadowpass]0[/tmp]

>         ... Order info here...
>         ...Order line info below...
>         [l]Qty[/l]   [l]Description[/l]   [l]Price[/l]
>         [query list=1 table=orderline sql="select * from orderline 
> where order_number = '[loop-code]' order by sku"]
>                 [sql-param quantity]
>                 [sql-param description]
>                 [sql-param price]
>         [/query]
>And when mapping is in place for the description field, one could display the
>description of the product in the proper locale as well. That would be nice ;)

Maybe we could change the [mm_locale] a bit more so it one could
instruct to use a certain locale instead of the locale as saved in 
value ui_locale.


[mm_locale catalog=1 locale=de_DE]
         or better
[mm_locale catalog=1 locale=de_DE shadowpass=0]

The above would instruct mm_locale to use the catalog Locale repository
and use the de_DE locale... (second example: enable field mapping 
based on locale as well)

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