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:
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.
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.
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.
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.
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.
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
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.
Just restored my site to a previous version due to this problem and now seen the fix. This worked for me.
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.
is working on a reply...