Everything becomes more obvious if you run a similar method in the main kernel under debug. You will see what parameters are passed and, accordingly, do the same when calling the API method. This is what the structure of the passed object of the UpdateCart method looks like for removing an item from the cart.
{ "removefromcart": "{ShoppingCartItemId}" }
Ah ok, thanks for pointing out. I'll see to get a fully-fledged local install of nopcommerce up and running then, to play a bit with things. So far, the Web API is the only point of contact I have with that system. :) Thanks for your support!
Getting back to this: This seems to work, however only if there is exactly one item in the shopping cart. As soon as I have added two or more and try to remove one, I end up with this error message, reproducibly:
{ "message": "The given key 'itemquantity60' was not present in the dictionary.", "inner_exception_message": null, "stack_trace": "" }
My fault? Thanks in advance and all the best, Kristian
That's right, if there are several items in the basket, then for those records that you do not delete, you need to transfer their number in the keys formed according to the template "itemquantity {shoppingCartItem.Id}"
hey im using one page checkout in web api when i use checkout controller and call OpcSavePaymentInfo() and cash on delivery payment method i get this error
session has not been configured forthis type of request or application nopcommerce
the exception is thrown at this line
_paymentService.GenerateOrderGuid(paymentInfo);
when i go to implemntation of this method i find that exception thrown in this line
var previousPaymentRequest = _httpContextAccessor.HttpContext.Session.Get<ProcessPaymentRequest>("OrderPaymentInfo");