VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: gavner25 on July 27, 2020, 03:15:26 AM

Title: Add to cart button
Post by: gavner25 on July 27, 2020, 03:15:26 AM
Hi, when i click on the add to cart button on my page i want it to be an ajax button so it dosent navigate to another page. Also, the item is not getting added to the cart on the top right. Click on the blue 'Be youthful c.v' image to see add to cart button.

http://thewhitehawk.co.uk/be_employable/index.php/be-youthful-products
Title: Re: Add to cart button
Post by: jenkinhill on July 27, 2020, 11:07:59 AM
Wierd template!  Loading 35 css and33 js files is a bit OTT for such a simple looking layout.  I'd see if the site works using a standard template, Protostar or Beez.

Failing to stay on the product details page is usually caused by having "Display modal popup upon 'Add to cart'" deselected in VM Configuration/Checkout.

Title: Re: Add to cart button
Post by: gavner25 on July 30, 2020, 00:21:44 AM
Thanks for replay. I tried it on beez templte and the same things happens. I have cart popup option selected in configuration.
Title: Re: Add to cart button
Post by: GJC Web Design on July 30, 2020, 08:43:36 AM
your "add to carts" are links .. not a form that is submitted like a conventional product details page which is needed to fire the JS that creates the popup

http://thewhitehawk.co.uk/be_employable/index.php/shop1/cart/add?quantity[0]=1&virtuemart_product_id[0]=29&virtuemart_category_id[0]=10