Umbraco 6.1 MVC with uCommerce Razor demo store installed. I have my shop located in website/shop and have changed the rewrite a bit to make that work.
I get this error when trying to put something in my basket:
Failed to load resource: the server responded with a status of 500 (InvalidOperationException)
Also i just tried using POSTMAN plugin for chrome to do a POST to the javascript API. It seems to be working. Remember to send the correct values. You need to send at least these values:
Sku,
VariantSku,
Quantity
You can allways take a look at the meta data for the servies:
Well it looks like the request is corrupt - not sending the correct values. And this is again because i can call the API from a tool and get a 200 back (and see that the basket has updated),.
I would take a look at the javascriptfile uCommerce.Jquery. Try to make a console.log(extendedOptions); in the addtobasket method and see what it says.
doing so on demo.ucommerce.net got me this when i added something to the basket:
Basket won't work - json error
Hi,
Umbraco 6.1 MVC with uCommerce Razor demo store installed. I have my shop located in website/shop and have changed the rewrite a bit to make that work.
I get this error when trying to put something in my basket:
Failed to load resource: the server responded with a status of 500 (InvalidOperationException)
http://living.shol.dk/ucommerceapi/Json/SyncReply/AddToBasket
Best regards
Kim
Did you get it working now ?
I just added a few bits to the cart. Looks like it is using JS ?
Also i just tried using POSTMAN plugin for chrome to do a POST to the javascript API. It seems to be working. Remember to send the correct values. You need to send at least these values:
Sku,
VariantSku,
Quantity
You can allways take a look at the meta data for the servies:
http://living.shol.dk/ucommerceapi/
http://living.shol.dk/ucommerceapi/xml/metadata?op=AddToBasket
Hope that helps.
Hi Morten,
No, I did not get it to work :(
I have not made any changes to the product template from the demo shop ...
Any ideas?
Well it looks like the request is corrupt - not sending the correct values. And this is again because i can call the API from a tool and get a 200 back (and see that the basket has updated),.
I would take a look at the javascriptfile uCommerce.Jquery. Try to make a console.log(extendedOptions); in the addtobasket method and see what it says.
doing so on demo.ucommerce.net got me this when i added something to the basket:
Object {quantity: "1", sku: "GHXG-4044-7604-1", variantSku: "GHXG-4044-7604-1-SML-White/Red", addToExistingLine: true, catalogId: "24"}
You can edit the scripting file directly from umbraco under settings/scripts/uCommerce.Jquery
Hope that helps.
Doing a console.log is giving me:
When i call AddToBasket with those exact parameters it works. I even refresh the page and see that the products are in the basket.
Okay, that is strange - it works in FF, IE and my colleagues Chrome browser, but in my own Chrome it doesn't! I will try with a reinstall.
Sorry for the inconvenience!
Best regards
Kim
There might be a caching problem. Try using a Incognito window.
is working on a reply...