Rune Grønkjærs Blog
Abonnér på mit feed

Tea Commerce languages, countries and currencies

These three concepts have a very central function in Tea Commerce and it is important to understand how they work. I will list the most important knowledge them below.

How does countries work in Tea Commerce?

  • When a new order is created the country of this order is set to the default country.
  • You can change the country of the order via the JavaScript API or the .NET API at any time you wish.
  • Contries holds a lot default information for the order including currency, shipping method, payment method and VAT group.

How does currencies work in Tea Commerce?

  • When a new order is created the order currency is automatically set to the standard-currency on the orders current country.
  • You can always change the orders currency via JavaScript API or. NET API.
  • To be able to change to a specific currency, the currency must be available in the current country. This is done one each currency in the Tea Commerce section.
  • Whenever you change the country, Tea Commerce will check if the current currency is allowed in the NEW country.
    • If the currency IS allowed in the new country, the currency stays the way it is.
    • If the currency IS NOT allowed in the country, the order’s currency is changed to the default currency of the new country.

What is languages in Tea Commerce?

  1. To get the most out of languages in Tea Commerce, you must use a setup like the one in Tea Commerce Multilanguage Kit
  2. Languages have nothing to do with countries or currencies!
  3. The order’s umbracoLanguage consists of an ID that matches one of the Languages set up in umbraco’s “Settings”
  4. Everytime a product is added to the order the umbracoLanguage of the order is set automatically.
  5. When setting the umbracoLanguage Tea Commerce will start with the product node and look up the content tree to find the first node with a hostname attached.
  6. As there can be more than one hostname on the node, Tea Commerce will first try and find one that matches the hostname currently used.
  7. If it cannot find a match, it will just take the first one available.
  8. The language of the hostname will then be added to the order.
  9. If no language is found whatsoever, the language will be set to 0 and the order will just run without a language.

How does languages work in Tea Commerce?

  1. It’s all about localization. If you have a multilanguageshop, using a setup like the one in our Tea Commerce Multilanguage Kit, there will be products in different language.
  2. Every product have a master product which holds all the basic product information. The products themselves holds all the language specific information.
  3. When a product is added to the order, the products master product is first found.
  4. Then all the products linked to that master product is found
  5. Tea Commerce will then add order line properties, from all the language specific products and, to the order line.
  6. Any product that does not have a language will be will just be added with a language = 0 which mean default information.
  7. When the order is requested by the JavaScript or the xslt Tea Commerce will merge the information into a full list of properties.
  8. Properties with a language will overwrite those without a language
  9. This means that you end up with language specific order line properties
  10. Whenever you change the orders umbracoLanguage, the order line properties will change acordingly

Tea Commerce links

This post was written in Tea Commerce. Ad permalink to favorites. Follow all comments with RSS feed for this posts. Drop a comment or a trackback: Trackback URL. | Læs denne side på dansk dansk version

Drop a comment

Your email is never published nor shared. Required fields are marked *

*
*

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Dansk version