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
I'm having an error when I try to add a product to the basket.
Master HTML:<%--including uCommerce libraries--%> <script src="/../scripts/uCommerce.ServiceStack.js"></script> <script src="/../scripts/uCommerce.jQuery.js"></script>
Page HTML:<a href="#" id="add-to-basket" class="btn">Add to basket</a>@*Hidden Inputs*@<input type="hidden" id="selectedcatalogid" value="24"> <input type="hidden" id="selectedsku" value="jobook"> <input type="hidden" id="selectedvariantsku" value="">
Javascript:$("#add-to-basket").click(function () { $.uCommerce.addToBasket( { catalogId: $('#selectedcatalogid').val(), sku: $('#selectedsku').val(), variantSku: $('#selectedvariantsku'), quantity: 1 }); return false; });
The error message is the follow:
The inputs seem to be right, what am I doing wrong?
Sorry, just noticed I was missing .val() in $('#selectedvariantsku')
I get this error now:
/ucommerceapi/Json/SyncReply/AddToBasket
Am I missing any instalation step from ucommerce?
I've been trying this solution but with no luck. My version of Umbraco is 4.7 and it does not even have a global.asax.
I also noticed that the UCommerce.RazorStore.dll does not exist in this installation. uCommerce version 3.5.0.1.13098
Hi guys, got the solution from Søren, I was missing the installation of the razor store. Basically I was missing the JSON layer that only the razor store brings.
Søren, could you guys add this to the basic package?
Anyway, thank you again for your help.
Regards, João Ferreira
Hi João,
Thanks for being awesome and posting the follow-up in the forum!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Javascript add to basket
I'm having an error when I try to add a product to the basket.
The error message is the follow:
The inputs seem to be right, what am I doing wrong?
Sorry, just noticed I was missing .val() in $('#selectedvariantsku')
I get this error now:
/ucommerceapi/Json/SyncReply/AddToBasket
Am I missing any instalation step from ucommerce?
I've been trying this solution but with no luck. My version of Umbraco is 4.7 and it does not even have a global.asax.
I also noticed that the UCommerce.RazorStore.dll does not exist in this installation. uCommerce version 3.5.0.1.13098
Hi guys, got the solution from Søren, I was missing the installation of the razor store. Basically I was missing the JSON layer that only the razor store brings.
Søren, could you guys add this to the basic package?
Anyway, thank you again for your help.
Regards, João Ferreira
Hi João,
Thanks for being awesome and posting the follow-up in the forum!
is working on a reply...