Web API (official plugin)

2 года назад
DmitriyKulagin wrote:

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!
2 года назад
z428 wrote:

{
  "removefromcart": "{ShoppingCartItemId}"  
}



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
2 года назад
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}"
2 года назад
Is simple add new custom method ( frontend or backend ) for a new custom table ( entity ) in DB ? There are some examples code to do that ?
2 года назад
Elicat1 wrote:
Is simple add new custom method ( frontend or backend ) for a new custom table ( entity ) in DB ? There are some examples code to do that ?

Is your question related to the topic "Web API"?  if it's not, please post a new topic (and explain there what you mean by "new custom method").
2 года назад
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 for this 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");

any idea about this exception
2 года назад
This is a known bug that has been fixed in version 1.04 of the plugin. Please update the plugin to the latest version 1.06.
2 года назад
My shopping cart is in a subdomain. Do i license the plugin using the subdomain or the main domain name?
2 года назад
[email protected] wrote:
My shopping cart is in a subdomain. Do i license the plugin using the subdomain or the main domain name?

Subdomain
2 года назад
/api-backend/Category/GetAll

I would like to get the complete list of categories, but the CategoryName parameter is required.

http://localhost:65285/api-backend/Category/GetAll?categoryName=xx&storeId=0&pageIndex=0&pageSize=2147483647&showHidden=false

In "others GetAll methods" no parameter is required (ex. Customer/GetAll or Product/GetAll)

How can I get the complete list of categories (without the CategoryName parameter)?