News:

Support the VirtueMart project and become a member

Main Menu

add product to cart without the button

Started by hades87, May 01, 2012, 13:39:51 PM

Previous topic - Next topic

hades87

Hello everyone,

im working on my own project and wanted to add a product but not with the standard button.
there are multiple actions that need to occur and i didn't think it very user friendly if the customer has to press 2 different buttons for it to work.
so when the user presses a button  it needs to save information to a db and it needs to set a product in the cart.
but im lost in the code of virtuemart. which function do i need to use and what does it need to properly add the product to the cart?

i hope someone can help me
thanks in advance

jenkinhill

You don't want the modal "Added to cart" popup? Then try selecting "Display modal popup upon 'Add to cart' " in VM configuration/Checkout.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

hades87

yes, i know about the popup, that isn't what i was talking about. but thanks for your reply  :D

i want with my own button in my own module to add a product to the cart.
which function in virtuemart code should i use, or do i need to put certain things in sessions.
i just can't figure it out.

thank you


jenkinhill

For an add to cart in an article see http://forum.virtuemart.net/index.php?topic=94539.msg337937#msg337937

For a product module with add to cart see how the provided VM modules work.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

hades87

Thank you very much, i think this is exactly what i need.