Guest Posted June 24, 2008 Share Posted June 24, 2008 I want to be able to add items to my shopping cart outside of cubecart actually on my website using AJAX. I've tried posting to the cart page using jQuery $.post() like so: $j.post("/cubecart/index.php?act=viewProd", { add: productID, quan: 1}); It appears to post and it gets the resulting page, but doesn't actually add it to the cart. Are there other variables I must pass to the page in order to get a product successfully added to the cart, or do I need to create a new posting page entirely? Cheers :pirate: Quote Link to comment Share on other sites More sharing options...
Chargin Posted June 25, 2008 Share Posted June 25, 2008 I too want to know how to do this, just by using straight html though? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 25, 2008 Share Posted June 25, 2008 There is a remote buy mod at cubecartforums.org that should do this for you. Not sure thru ajax (I have no idea what ajax is truthfully), but the mod should do the trick. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 25, 2008 Share Posted June 25, 2008 I've done this simply by adding a FORM to my outside pages which add a product to the cart. You can see an example at http://www.KeysToPower.com. View Source, and scroll to the bottom. Or just search for "<form", which will take you straight there. As you'll see, I even include options. Although I'm currently using CC4, the only thing different from the CC3 version is the URL. Also, in CC3, I installed a mod which took the customer directly to the View Cart page after placing an item in the cart, and that worked perfectly with the outside HTML FORM. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.