Problem changing culture with order.email.templates using minimum validation

Aug 2, 2009 at 3:18 PM
Edited Aug 2, 2009 at 7:17 PM

Indicating this problem with minimum validation i find out that i can't change order.email.template for emailing orders with proper culture (fi-FI)
no merchant.email either. i've both merchant and chqpayment  for proper culture done, but can't  sending emails with right culture (fi-Fi)
but in checkout  it is ok with right culture. Only default .template (en-GB) is used with right culture sending emails
This happens when you are using minimum validation.  language url ditection doesn't  work for emails sent with right culture
but checkout is OK.
It is funtioning only when you use the same merchant.culture code (fi-FI etc.) both default and other cultures.
Is it possible to fix it in next release.

Regards,

Markku

Coordinator
Aug 3, 2009 at 5:55 PM

Hi Marku I'll have a look, if it's easily solved I'll put it into the next build.

Coordinator
Aug 4, 2009 at 8:00 AM

Hi Marku,

Which payment provider are you using, is it paypal?

Aug 4, 2009 at 8:00 PM
Edited Aug 5, 2009 at 4:53 AM

it doesn't depend on which provider, but if you change language from panel it doesn't change culture for email-
customer to email with right culture chq provider for instance doesn't work right way only in checkout  order view, not  emailing
with right language to customer. very sad situation now.

secodly how categories is funtioning  so that i found right tab for my productlists. what are these referencies cat/11 etc.
to which productlist is it refering

Regards,

Markku

Aug 5, 2009 at 5:03 AM
Edited Aug 5, 2009 at 5:06 AM

Again. is culture changed by changing language from front panel (nationality flags)  changing culture of customer.

secondly currency is changed in checkout and other reports but in EU we use the same currency €.
if you have 3 different nationality the currency is the same, €, but there are exceptions (Sweden,Denmark,Norway,UK etc.)
So we need more utilities setting currency to €.
How is it possible to use or lock currency to €.

Regards,

Markku.

Coordinator
Aug 5, 2009 at 6:48 AM

Hi Markku,

Thye language of the email to the client checks for tho things, first it checks for the prefered language of the client (DNN user) and uses this (I suspect your test user has a set prefered language), if it can't find a user for the order (non-user purchase) then it uses the current culture.

The cat/11 refers to the itemid of the category in the database, so it will display all the products in categoryid 11 on the product list.

I solve the problem of needing the "€" to appear in en-GB, etc by using the DSLocalizator (free download module), you have a replacement option which I setup to replace "£" with "€".  This doesn't work with the "$" because the $ is used to specify ids when redering in DNN.  So you are forced to make english use the the en-GB language instead of en-US.  Obviously I have plans to be able to specify a currecy symbol for the store in the settings and I hope to put this in the next release.

Regards,

Dave.

Aug 5, 2009 at 7:29 AM
Edited Aug 5, 2009 at 7:38 AM

The last issue sounds good. Once again concerning cultures.
if you change front panel the language diffrent from the broser.
switch finnish to swedish or english it is expected to have email with that language.
but now it not happens. Using url based culture changing you get right result with non-user customers.
is this current so or not. And finally this (stg/5) syndrome goes first.!
To change currency to € (EU) based is OK.

Categories have no tabids(urls) to find right tabid. how point out the right tad to find certain productlist.
i mean productlists  have certain tabid and category mentioned  in productlist module settings.
how catch those for categories.

Regards,

Markku

Coordinator
Aug 5, 2009 at 7:51 AM

HI,

The email language will always the the prefered language of the user, this may not be the current browser language.  When a user registers they will be in a perticular language, this is then used for their prefered language and all emails will be set to them in this language.  If the users changes their prefered language then the email will also change language to match their prefered language. (Basically it sounds like it's working correct, I've been using this method for two year on some of my e-commerce site and nobody has complained about getting the wrong language emails)

It sounds like you've setup categories on different tabs, in this case you'll need to use the DNN menu to goto the correct tab and set the productlist to default to your selected category and set no browsing in the options.  Usually I setup just one tab with the problem list, add the category menu to the tab and set the settings of the productlist to browsing enabled.  This way you don;t have to create a new tab for each category and when the manager adds a category it is automatically added to the category menu and can be seen without having to create a new tab for it.

Regards,

Dave.

 

Aug 6, 2009 at 7:58 AM
Edited Aug 6, 2009 at 8:39 AM

i've now checked everyhting for culture problem.
Finally i've found out that country doesn't been updated when you set your address  as registered customer.
country field stay empty and also preferred locale (culture field) doesn't been updated either when you change your language).  when i change locale manually, everything works fine.
in  country list there is for instance only sweden. it will not be updated and language change doesn't  been updated to sv-SE (default)  either.
if non-user customer (minimum validation or not ) change language (front panel) country changes, but preferred locale (default) doesn't for instance finnish to swedish or english etc.
that's the reason to all my email problem.
i wonder how change preferred locale with minimum validation. county changes but preferred locale doesn't..

Could you check this out.

And finally paypal what parameters are sent back to change order to unveryfied to verified. (difference) my orders stay always unverified and
email is not sent  to customer only to merchant.

Regards,

Markku

Coordinator
Aug 6, 2009 at 9:24 AM

Hi Markku,

I have just fixed a probelm with the "getcurrentcuntrycode" function, I'm not sure this is the cause of your issues, but I'll definatly make a note to look into this before I make the next release stable.

The paypal orders stay unverified if the paypal IPN has not been setup, also in some of the older documents I forgot to put the /ordID/[ORDERID] parameter on the examples:

<root>
  <paymentURL>https://www.sandbox.paypal.com/xclick</paymentURL>
  <verifyURL>https://www.sandbox.paypal.com/cgi-bin/webscr</verifyURL>
  <PayPalID>paypal@MyWebsite.com</PayPalID>
  <CartName>TEST</CartName>
  <ButtonImageURL>/Desktopmodules/NB_Store/img/paypal60x38.gif</ButtonImageURL>
  <Currency>EUR</Currency>
  <ReturnURL>http://www.MyWebsite.com/Cart/tabid/56/stg/5/ordID/[ORDERID]/Default.aspx?PayPalExit=RETURN</ReturnURL>
  <ReturnCancelURL>http://www.MyWebsite.com/Cart/tabid/56/stg/5/ordID/[ORDERID]/Default.aspx?PayPalExit=CANCEL</ReturnCancelURL>
  <ReturnNotifyURL>http://www.MyWebsite.com/Cart/tabid/56/stg/4/Default.aspx</ReturnNotifyURL>
  <MerchantLanguage>fr</MerchantLanguage>
</root>

Make sure you IPN in Paypal matches the "<ReturnNotifyURL>" node, it's the "stg/4" that tells nb_store to process the ipn. (you don't need the [ORDERID] on the notify url)

 

Thanks for the feedback,

Regards,

Dave.

 

Aug 6, 2009 at 2:45 PM
Edited Aug 7, 2009 at 8:53 AM

here are return parameters using PayPalExit=RETURN from finnish verkkomaksut.com:

http../Default.aspx?PayPalExit=RETURN&ORDER_NUMBER=1340&TIMESTAMP=1249565823&RETURN_AUTHCODE=AB4E22CC46CEACA09A3D0E355C3C95E2&PAID=09EA6A998C

Here is response from PayPal. which of these RETURN parameters are checked for order to be verified
<Responses>
    <Response   payment_id="0"
                txn_id="3PP58082BD3079037"
                payment_date="5/28/2007 1:22:40 PM"
                payment_price="10.99"
                email= my@email.com
                first_name=""
                last_name=""
                street=""
                city=""
                state=""
                zip=""
                country=""
                request_id="0"
                is_success="True"
                reason_fault=""
    />
</Responses>

Regards,

Markku

Aug 7, 2009 at 8:32 AM
Edited Aug 7, 2009 at 8:33 AM

Again!? culture problem. Maybe all the same, but when you send validated email for instance cancelled.
email language doesn't change to customer represented. so email is sent to customer with wrong language.
You have fixed this problem. All should be based on what language had been used aganst order.
All print,ed, orders ,validated or shipped order emails are all right language when it is country based  and saved to order.
but there is no countrycode in nb_store_orders table to use. In Checkout it is preferred language based and it is working.

Am i right?

Regards,

Markku

Coordinator
Aug 7, 2009 at 8:52 AM

HI Markku,

The paypal return is just the return to stg 5, which displays the order, if the order has not been processed by "stg/4" the you will get an unverified email.  You need to implement the IPN in paypal and amke sure the IPN is sent to stage 4.

With the country issue, I've been running multiple language websites without problems, so it seems there may be something in the beta or an issue with the setup.  I'll make sure I test the langauge of email before I make the next release and hopefully be able to discover what's happening or if we can come up with a another method.

Regards,

Dave.

Aug 8, 2009 at 6:05 AM
Edited Aug 9, 2009 at 5:20 AM

Also i found out that as administrator when i send validated or shipped emails they are merchant culture based, not
customer culture based.. when customer preferred language was swedish shipped email language is based on merchant
preferred language. when you change merhant. culture (default) to swedish, everyhting works fine.
but if you use all the time merhant  culture english, all email are sent english. this means that you can't use orderhistory
to email customers with their own language, because preferred language is based current preferred language which is
merhant language. i made merchant.culture to all five languages but that doesn't help. So something should be done with
merchant.culture change as administrator and reference to preferred language (which goes first) concerning orderhistory and emails.
As customer you see orderhistory with your own language and also checkout. is OK.

Here is a sentence from GatewayCheque.vb
SendEmailToClient(PortalID, GetClientEmail(PortalID, objOInfo), objOInfo.OrderNumber, objOInfo, "chqpayment.email", GetClientLang(PortalID, objOInfo))
SendEmailToManager(PortalID, objOInfo.OrderNumber, objOInfo, "chqpayment.email")

First sentence should be customer preferred language based on customer profile and second should be merchant.culture based.
It is also concerning other providers as PayPal etc. too. As non-user customer there is no profile info, so  it must be merchant.culture based
on current  language.

Now i have tested and looks so that every time merchant.culture is changed when customer preferred language changes, email are right language.
That means that merchant.culture Lang (sv-SE,en-GB etc)  content should be placed to preferred language for instance all instances to the same language merchant.culture (default) or merchant.culture based on preferred language supporting all languages used.
Now it is used only merchant.culture (default). But  logic in function GetClientLang below should be changed concerning merchant.culture preferred language settings.

Could you check out this.

Now this  GetClientLang(PortalID, objOInfo) is not funtioning right. i guess reference to right language based on  customer or in order used is not catched.
How it actually works?

Regards,

Markku

Coordinator
Aug 9, 2009 at 7:54 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.