What I want is to be able to have the customer click a button or a link to add the item to their cart from there.
However I can't find any documentation on how to do this with just a simple link.
I have looked at posts that talked about previous versions using a link or a form submit, but those do not seem to work with 1.5.4 they just send you to the shopping cart page which is empty.
I took the common.js and put it on the product selection page, and use the addToCart function which works... if they have already been to the store. I tried putting an iframe on the page that was hidden going to the cart page, and that partly works, but fails on iphone/ios devices.
Is there any direct way to do this without jumping through a bunch of hoops, and if not does anyone know why the ios devices would not use the function?
The button code is as follows:
Code: Select all
onclick="addToCart('120',$('#frmfield').val()); document.location='/shop/index.php?route=checkout/cart';"