Cant add orderlines with JS - POST http://...../FormPost.aspx 500 (Internal Server Error)
(tried to delete my first post, dont know if it worked. ignore that one..)
Im new to tea commerce and trying to do very basic stuff. Im trying to add orderlines to an order with JS but it doesnt work.
When I click my Add to cart button I get this error in chrome console "POST http://mydomain/FormPost.aspx 500 (Internal Server Error)". Ive added productName,productNumber,productPrice to "Product property aliases" in Products and they are filled out on every product.
(function () {
/* add product to cart */
$(".productAddToCart").on("click", function (e) {
var nodeId = $(this).attr('id');
/* Add orderline is called using the Tea Commerce javascript API */
TC.addOrUpdateOrderLine({
productIdentifier: nodeId, quantity: 3,storeId:1,
errorfn: function (e) {
console.log(e);
},
successfn: function (e) {
console.log(e);
}
});
e.preventDefault();
});
})();
omg.. after to many hours it just started to work?!? All i did was adding these razor lines (for testing), now everything suddenly works?! the i removed them and it still works
Order order = TC.GetCurrentOrder(1);
TC.AddOrUpdateOrderLine(1, "1157", 1);
Cant add orderlines with JS - POST http://...../FormPost.aspx 500 (Internal Server Error)
(tried to delete my first post, dont know if it worked. ignore that one..)
Im new to tea commerce and trying to do very basic stuff. Im trying to add orderlines to an order with JS but it doesnt work. When I click my Add to cart button I get this error in chrome console "POST http://mydomain/FormPost.aspx 500 (Internal Server Error)". Ive added productName,productNumber,productPrice to "Product property aliases" in Products and they are filled out on every product.
Here's my markup (razor):
and my JS:
Any ideas? im lost :(
omg.. after to many hours it just started to work?!? All i did was adding these razor lines (for testing), now everything suddenly works?! the i removed them and it still works
wtf..
Yeah that is pretty weird! Do you by chance add a store picker that wasen't there before? That can give you an error.
Kind regards
Anders
is working on a reply...