I have some standalone (non virtuemart pages) which I wish to add a "Add to cart" button for a given product.
I know what the id of the product is, along with Qty, Category price etc.
Is there anyway I can create my own button that does the same as the normal "add to cart" buttons. I managed to achieve this in VM 1.1.9 by manually adding my own values to the Session 'cart'. However, this same code does not work any longer as the session structure is much different. I could try and recreate the session but there are lots of values, and I cannot determine what the bare mininium is.
Ideally I would like to be able to call an existing "Add to cart" method from the Virtuemart classes, but am unsure how to do this. Presumably I would need to include a series of Joomla and Virtuemart core files in my standalone code, and then pass a series of values to the add to cart method.
I would be really grateful if anyone could help here - perhaps you have already achieved this and know what code to use.
I look forward to your replies.
Regards
James
In a Joomla article you can use this: http://forum.virtuemart.net/index.php?topic=94539.msg337937#msg337937
or this: http://forum.virtuemart.net/index.php?topic=108108.0
Thank you both!
or this: http://forum.virtuemart.net/index.php?topic=110368.0