News:

Looking for documentation? Take a look on our wiki

Main Menu

Empty cart before adding any other item.

Started by allgreenphosphor, July 11, 2013, 19:16:10 PM

Previous topic - Next topic

allgreenphosphor

Hello people,

The shop I'm working on is a single product shop (only 1 product forever). The cart page is skipped and for customer there's no way of modifying previously added items.
To prevent any unwanted amount of purchase, a simple workaround would be to empty the cart before adding some more.

I just don't know which file is safe to hack and how exactly.

thank you very much

allgreenphosphor

#1
ok. here's what I did for VM 2.0.20b:

I simply added the following line $cart->emptyCart(); immediately after if($cart) in functions add() and addJS() from
components/com_virtuemart/helpers/cart.php


I don't know if it's a safe way of doing it. It just works, just like win95 did. :) )