Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Amigo 243 posts 568 karma points
    Jul 02, 2013 @ 14:14
    Amigo
    0

    diffrent languages

    I have a umbraco site that is 2 webs, one in danish and a copy in englist (not exact same content)
    I wish to have a common shop for theese 2 sites where user can choose language.

    But how do i get the content of my shop to change language / currency?

  • Martin 181 posts 740 karma points
    Jul 03, 2013 @ 20:15
    Martin
    0

    How is your websites structured? (Urls for instance?)

    And shall the webshop being integrated into the two sites or should it be a shared one?

    It can depend on how you want your shop to be integrated into your existing sites (or if it should be a new one).

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jul 05, 2013 @ 09:24
    Søren Spelling Lund
    100

    Hi Amigo,

    The simplest will probably be to copy the store to the different language sites and have Umbraco handle the language.

    For currency you can either set up a catalog for each currency and assign the price group you want or override the price group programmatically by setting

    SiteContext.Current.CatalogContext.CurrentCatalog.PriceGroup
  • Amigo 243 posts 568 karma points
    Jul 05, 2013 @ 09:26
    Amigo
    0

    Thanks Søren ;-)

  • Medjeti 75 posts 126 karma points
    Jul 09, 2013 @ 18:44
    Medjeti
    0

    Sorry for butting in, but I've been battling with this for a few days, hopefully someone can help me out.

    I have a Catalog set up with the pricegroup "DKK 25 pct". Now, depending on the language, I may want to change the pricegroup as per Søren's suggestion:

    SiteContext.Current.CatalogContext.CurrentCatalog.PriceGroup = PriceGroup.All().First(x => x.Name == "EUR 25 pct");

     

    However, this produces the following error:

    Items cannot be added with different currency DKK from billing currency EUR of order.

    Line 69: var price = CatalogLibrary.CalculatePrice(product);
     [InvalidOperationException: Items cannot be added with different currency DKK from billing currency EUR of order.]
       UCommerce.EntitiesV2.PurchaseOrder.CreateOrderLine(PriceGroup priceGroup, Product product, Int32 quantity, Decimal unitPrice, Decimal unitTax) +534
       UCommerce.EntitiesV2.PurchaseOrder.AddProduct(PriceGroup priceGroup, Product product, Int32 quantity, Decimal unitPrice, Decimal unitTax, Boolean addToExistingLine) +190
       UCommerce.EntitiesV2.PurchaseOrder.AddProduct(PriceGroup priceGroup, Product product, Int32 quantity, Boolean addToExistingLine) +218
       UCommerce.EntitiesV2.PurchaseOrder.AddProduct(PriceGroup priceGroup, Product product, Int32 quantity) +18
       UCommerce.Api.PriceCalculation.GetDiscount(IDiscountService discountService, ProductCatalog catalog, Product product) +321
       UCommerce.Api.PriceCalculation..ctor(IDiscountService discountService, IPricingService pricingService, ITaxService taxService, Product product, ProductCatalog catalog) +409
       UCommerce.Api.PriceCalculation..ctor(Product product, ProductCatalog catalog) +84
       UCommerce.Api.CatalogLibrary.CalculatePrice(Product product, ProductCatalog catalog) +29

     

    I have tried to override PriceService and TaxService as described elsewhere, but that ultimately produced the same error.

    Am I missing something obvious here? Thanks in advance for any suggestions.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jul 29, 2013 @ 15:04
    Søren Spelling Lund
    0

    This is due to the fact that the cart was created with a different currency than the one you're trying to add the new item with. uCommerce doesn't know how to handle that scenario so it throw an exception.

    Clearing your cookies will give a new cart with the proper currency.

    BTW you'll get a faster reply in the future if you do a new thread. I'm only seeing your question because I previously answered the other question on this thread.

    Hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft