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.

  • David MacCrimmon 5 posts 25 karma points
    Jun 24, 2011 @ 13:27
    David MacCrimmon
    0

    Currency Problems

    Hello,

    I am currently using the XSLT from the test shop to handle the add to basket functionality, however I am getting the following error when I press add to basket:

    Error parsing XSLT file: \xslt\AddToBasket[XSLT].xslt

    The follwing error message is in the logs table.

    Items cannot be added with different currency GBP than billing currency EUR of order.
    UCommerce.EntitiesV2.OrderLine AddProduct(UCommerce.EntitiesV2.ProductCatalog, UCommerce.EntitiesV2.Product, Int32, System.Decimal, Boolean)
       at UCommerce.EntitiesV2.PurchaseOrder.AddProduct(ProductCatalog catalog, Product product, Int32 quantity, Decimal unitPrice, Boolean addToExistingLine)
       at UCommerce.Xslt.TransactionLibrary.AddToBasket(String catalogName, Int32 quantity, String sku, String variantSku, Boolean addToExistingLine)
       at UCommerce.Xslt.Library.<>c__DisplayClass7b.<AddToBasket>b__7a()
       at UCommerce.Xslt.Library.HandledCall[T](Func`1 method)

    I have deleted EUR as a currency as we plan to use GBP only. I have checked that the catalog is set to GBP and the prices on all products are GBP also.

    Could you possibly shed any light on this please?

    Thanks,

    Dave.

  • David MacCrimmon 5 posts 25 karma points
    Jun 24, 2011 @ 14:03
    David MacCrimmon
    0

    Hello,

    It would appear that old orders in the PurchaseOrder table were the problem. I changed the CurrencyId on those old orders over to the GBP CurrencyId and I am once again able to add to the cart.

    Thanks,

    Dave

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 27, 2011 @ 09:06
    Søren Spelling Lund
    0

    Hi David,

    You're absolutely right. If a basket is created with one currency and items are added with another uCommerce will throw an error. The reason you're seeing the error is that the basket is persistent and was created for the test site.

    Another way to fix it is to clear your cookies, which will cause uCommerce to assign you a new basket.

  • Craig Cronin 304 posts 503 karma points
    Sep 23, 2012 @ 23:19
    Craig Cronin
    0

    Just restored my site to a previous version due to this problem and now seen the fix.  This worked for me.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 24, 2012 @ 10:36
    Søren Spelling Lund
    0

    Hi Craig,

    It's check that was added to uCommerce 2.6 to avoid added items with different currencies to the basket. The implication being that added a item with a GBP price to basket with USD billing currency will introduce some interested accounting errors.

    The situation can arise thusly:

    1) Baskets are persistent

    2) If you create a basket with one currency and don't complete the purchase by checking

    3) Later you change the currency of the catalog you're working with

    4) Add an item with the new currency

    5) uCommerce will load the existing basket with the old currency

    6) The conflict occurs

    You can fix it easily by clearing your browser cookies which will force uCommerce to assign a new basket to you with the updated currency.

     

Please Sign in or register to post replies

Write your reply to:

Draft