close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How does Universal Email handle multi-lingual websites?

Thread began 10/25/2009 1:08 pm by Roxana | Last modified 11/13/2009 4:23 pm by Eric Mittman | 5506 views | 21 replies |

Roxana

How does Universal Email handle multi-lingual websites?

Hi,

I have a multi-lingual website. When a visitor chooses a language and places an order, I would like the visitor to receive the confirmation email in the chosen language.

Is there a solution how to do that with Universal Email?

If not, here is what I thought might work, but I need some help with it.

I have set up the table orders with a field "language_id" which returns 1 for German, 2 for English and so forth.

My idea was to create one Universal Email behavior for each language on the checkout-success page, and set a trigger that checks for the chosen language in the table orders. So, a German visitor would trigger only the German Universal Email behavior. If that works, how would I have to set the trigger?

The other idea was to use validation toolkit to validate the value in the field language_id and redirect to one of four (four languages) checkout-success pages, each with its own Universal Email behavior. Would that work, and how?

Is there maybe a filter that can be applied to the Universal Email behavior?

I would very much appreciate any help to work this out.

Sign in to reply to this post

Eric Mittman

There is not a guide for this type of setup. Both of the ideas that you have proposed would work well though. Another variation on these would be to have a single page with single UE server behavior but have the switch statement or other logic directly in the body of the message. This would give you the smallest number of files and least amount of code. If you goal is to make it easy to update the messaging then having the success page in multiple languages each with their own UE on them would be best.

Sign in to reply to this post

Roxana

Hi Eric,

Thank you for helping me out. I like the idea of having a success page in each language. I can redirect to each page, because the confirm page is set up with include files for each language.

I am having problems though setting the page to go to a certain success page. Right now the form action is set to: <?php echo $_SERVER["PHP_SELF"]; ?>

I am not really familiar with php. Can I just set action to checkout_success.php? And then for the other languages checkout_success_e.php, checkout_success_f.php and checkout_success_s.php?

Best regards
Roxana

Sign in to reply to this post

Eric Mittman

It is not in the form action that you would update this value, but instead it is listed as the redirect page in the checkout server behaviors on the page. On your confirm page you can edit the local checkout server behaviors from the server behaviors tab of the application panel.

You just need to specify the redirect page for the language here.

Sign in to reply to this post

Roxana

Hi Eric,

I couldn't find the behavior, that redirects to the checkout_success page.

But anyway, I would run into a problem. The different languages are handled with include files. If I change the server behavior, I change it the same for all languages. So I can't send customers to their respective checkout_success page.

That means I would have to go with three email behaviors, that are triggered on page load and by the session language. How do I have to set the trigger to accomplish that?

Or do you have another idea?

Sign in to reply to this post

Eric Mittman

Depending on what gateway you are working with the checkout_success should either be listed in the local checkout server behavior or if it is a remote checkout it will be listed as the value of an element in the form on your confirm page.

One thing that you could do is to set a session variable to hold the value of the checkout success page. When you set the language session variable you should also set another variable to store the checkout success page that the user will need to go to. Then on your confirm page you can just reference this checkout success session variable rather than the page name directly. This way it should always go to the correct success page based on the language the user selected.

Sign in to reply to this post

Roxana

Hi Eric,

I removed the local checkout behavior, because we don't use a gateway. Customers just place the order, and depending on their status make an advance payment or are invoiced.

It looks like the redirect is set in the Universal Email behavior. I will be getting rid of the Email behavior on the confirm page though, so I need to find another way to redirect to the success page. Jason said in another thread to use the store order details behavior to set the redirect unless I use Universal Email.

Would you be able to walk me through the setting of the variables? I don't really know how to do that. The language session is stored throughout the site up to the moment the success page is loaded.

Sign in to reply to this post

Roxana

Eric, I have a little update. I need to cover an additional scenario.

Customers that place an order in English, Spanish or French would get a confirmation mail in their language. Customers that place an order in German receive a different confirmation email depending on whether they are located in Germany or another country.

I looked at what validation toolkit could to, but all I know it can do is send me to one chosen page on failed validation. I don't really want to send the customers on failed validation to another page, but send them to a page depending on the entries in the database in the fields language_id and country. In all there would have to be five pages to be directed to.

To be more specific:
- (language_id=1) and (country=Germany) - redirect to checkout_success_1.php
- (language_id=2) - redirect to checkout_success_2.php
- (language_id=3) - redirect to checkout_success_3.php
- (language_id=4) - redirect to checkout_success_4.php
- (language_id=1) and (country‡Germany) - redirect to checkout_success_5.php

Is that possible?

Or how else can I solve the problem?

Sign in to reply to this post

Eric Mittman

I think a good way to do this would be to set a new session variable that will hold this checkout success page value. If your language id is held in a session variable called language id then the code to set this session variable for the checkout success page should look something like this:

php:
$_SESSION['checkout_success'] = "checkout_success_" . $_SESSION['language_id'] . ".php";



You would then also need to have an if statement after the checkout page that will check the country if the language id is 1 and set the variable accordingly. In order for this to work you must have a session variable set to hold the selected country.

php:
if($_SESSION['language_id'] == '1' && $_SESSION['country'] == 'Germany'){

   $_SESSION['checkout_success'] = "checkout_success_5.php";
}



When you configure the Store Order Summary or another server behavior that is the last to occur on the confirm page then you should specify this session variable as the redirect page like this:

php:
<?php echo $_SESSION['checkout_success'?>



I think this should get you the result you are looking for. Remember that you will still need to set the session variable to hold the selected country, you can use the standard eCart set session value server behavior for that.

Sign in to reply to this post

Roxana

Hi Eric,

Thank you for your help. I have another update:

I solved the problem how to send the confirmation mail in the chosen language by placing all phrases in the database, filtering the recordset by language_id and inserting the records in UE in the Dreamweaver edit mode.

I need two different confirmation mails though, one for orders sent from Germany (which are order confirmations), and one for orders sent from countries other than Germany confirming the receipt of the order which will later be followed by a proforma invoice (no tax and higher shipping). This I cannot filter.

Therefore I think I need two UE behaviors. I looked at your suggestion with the session variables, but I don't know where to put the code. I adjusted the if statement to match my database:
if($_SESSION['languageID'] == '1' && $_SESSION['OrderShipCountryID'] == 'Deutschland'){
$_SESSION['checkout_success'] = "checkout_success_germany.php";
}

To look into this, would it make sense to open a support ticket?

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...