VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Kuubs on March 02, 2018, 14:53:57 PM

Title: $cart->emptyCart() is not working properly?
Post by: Kuubs on March 02, 2018, 14:53:57 PM
Hello,

I am using a payment plugin which works great only if I refresh the "Thank you for your order" page the email confirmations gets sent again and the order gets back to the C one (Confirmed)

Now the reason it does this is because at the end of the pluginResponseHTMLRecevied, there is a line of code:

$cart->emptyCart();

This makes the cart empty but does not disable the refresh page to change the order status again. Does osmeone know how to fix this?
Title: Re: $cart->emptyCart() is not working properly?
Post by: aix on March 02, 2018, 15:52:56 PM
I have usually used method function plgVmConfirmedOrder($cart, $order) to empty cart with $cart->emptyCart(); and have not got any issues like this so far.
Ofcourse it would be easier to say anything for sure if would knoe more about what plugin you use and see how its set up.