Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ansar 181 posts 291 karma points
    Jan 13, 2019 @ 09:21
    Ansar
    0

    Multi language multi currency webshop setup

    I am trying to setup a multi language multi currency webshop using the latest TeaCommerce starter kit.

    • Created the currencies and countries in the TeaCommerce section.
    • Created the languages in settings section
    • Added text fields for Price with proper alias in the Product Doc Type.
    • Duplicated the starter kit home node and all sub nodes DK, DE and NO and updated the Culture and Hostnames.
    • Added price in the Product nodes for each currencies.

    The product price returned from following function is always zero! Not sure what am doing wrong

    Price price = TC.GetPrice( storeId, product.Id.ToString( CultureInfo.InvariantCulture ) );
    

    No code from the starter kit is changed and the storeId is correct

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 14, 2019 @ 08:36
    Matt Brailsford
    100

    Hi Anz

    Sorry to hear you are having problems. Here are a few things for you to check.

    1) You have the currency specific price fields created but do you have the alias of those fields registered with the TC currency via the "Price property alias" on the currency.

    2) When you switch country site, if you have only one currency per site, are you changing the currency on the current session via TC.SetCurrentCurrency? https://docs.teacommerce.net/3.0.0/api/currency/#setcurrentcurrency

    3) Have you set the currency to be available in the relevant countries via the "Available in these countries" tab on the currency?

    Have a look into these and let me know if you continue to have problems.

    Matt

  • Ansar 181 posts 291 karma points
    Jan 14, 2019 @ 10:31
    Ansar
    0

    Thank you for the help. I got it solved

    Price was zero because of the wrong bindings in Culture and Hostnames

    Thank you for pointing to TC.SetCurrentCurrency. This solved proper switching of currencies

    All good for now :)

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 14, 2019 @ 10:32
    Matt Brailsford
    0

    Awesome!

    Glad you got it resolved.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft