How would I setup an "add to basket" button on something like my homepage outside aMember that adds the desired product to amember's cart or basket?
There is no ready-to-go solution yet, but I can give you a suggestion if you have at least basic Javascript knowledge.
Sorry for delay! We have developed a solution to add "Add to Basket" buttons to any HTML page of your website. 1. Update file in your amember installation from attached ZIP file. 2. Use the following HTML code to add buttons: PHP: <!-- add this code once for each page --><script src="/amember/application/cart/views/public/js/cart.js"></script><!-- add buttons. 56 here is the aMember Product#, 1 is the qty - right now only 1 handled --><a href="#" onclick="cart.add(56, 1)">add item</a><a href="#" onclick="cart.addAndCheckout(56, 1)">add item</a>
For anyone else that uses this, I had a little trouble with the code: PHP: <a href="#" onclick="cart.add(56, 1)">add item</a> The href="#" was a problem because of the way my website is setup (The add to cart button is essentially on a forum, and the "add to cart" button was redirecting to the forum home page, which made no sense). To resolve the issue, I set the href to redirect to my amember cart page, so my link looks like this: PHP: <a href="/amember_cart.php" onclick="cart.add(56, 1)">add item</a> Thanks Alex and team, you guys are second to none!
Does this also apply to the latest version of Amember? I need to add an Add to Cart button to my wordpress pages.
Sorry for the dumb question, but I upload it to my hosting right, and where EXACTLY? Thanks. I'm close to having everything all finished. Just have some small details to do.
Does this still work? I can't get it to work. My main website sections are in SBI and the amember sections are in Bluehost. I want my pages in SBI to have buttons to add to basket and such, then view the basket in amember and see the products already added. But it is not working with the code given above or the code provided in amember pro shopping cart section. Any ideas, help?
Unfortunately all shopping cart javascript code(basket, add products, checkout etc...) will work only if you place buttons on the same domain where you have aMember installed. We will fix this restriction in future versions.
In case someone find this thread and want to add shopping cart button on domain other than domain where aMember is installed here is some guide http://www.amember.com/docs/How_to_..._other_than_domain_where_aMember_is_installed