Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Everyone,
I have a question about Commerce. I'm creating a composed "product" as a bundle for my cart. For example:
Printmethod: Digital print etc.
public IActionResult AddToCart(AddToCartDto postModel) { _umbracoCommerceApi.Uow.Execute(uow => { var store = CurrentPage.GetStore(); var order = _cartService.GetOrCreateCurrentOrder(store.Id).AsWritable(uow); order.SetProperty("shopCustomerId", postModel.ShopCustomerId); var bundleId = DateTime.Now.Ticks.ToString(); Dictionary<string, string> props = new Dictionary<string, string> { { "color", color }, <<snip>> { "expectedDeliveryDate", Convert.ToString(postModel.expectedDeliveryDate) } }; order.AddProduct(postModel.ProductReference, 1, props, bundleId); <<snip>> _umbracoCommerceApi.SaveOrder(order); uow.Complete(); }); }
But I keep getting the following error on the AddToCart line: "Can't add a Product to an Order where there is no price for the Order currency"
What am I doing wrong here? Can anyone help me out here?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Error in Commerce when adding product
Hi Everyone,
I have a question about Commerce. I'm creating a composed "product" as a bundle for my cart. For example:
Printmethod: Digital print etc.
But I keep getting the following error on the AddToCart line: "Can't add a Product to an Order where there is no price for the Order currency"
What am I doing wrong here? Can anyone help me out here?
is working on a reply...