I haven't done add-to-cart via AJAX, but it should be pretty easy to do. Merchello is really a back-end API, so you would have to create an API controller that adds the item to a cart. If you look at the basket controller in the Rosetta Stone site, you can see some sample code on adding to a cart.
That is not an API controller, but I think one could use similar code within an API controller and have it called by client side AJAX code.
My agency is working on our first Merchello project and will hopefully have something launched in a couple weeks. I'll post on the Merchello forums we do... or follow me on twitter :)
Ajax Add To Cart? Production Sites?
Hi just wondering if someone had done an ajax add to cart so you don't have to leave the category/product page after you've added the item to cart?
Also just wondering if anyone is using this in production?
Cheers
I haven't done add-to-cart via AJAX, but it should be pretty easy to do. Merchello is really a back-end API, so you would have to create an API controller that adds the item to a cart. If you look at the basket controller in the Rosetta Stone site, you can see some sample code on adding to a cart.
https://github.com/Merchello/RosettaStone/blob/master/src/website/App_Code/Controllers/BasketController.cs#L101
That is not an API controller, but I think one could use similar code within an API controller and have it called by client side AJAX code.
My agency is working on our first Merchello project and will hopefully have something launched in a couple weeks. I'll post on the Merchello forums we do... or follow me on twitter :)
Alex
Did you create ajax AddToBasket?
is working on a reply...