MostlyConfused Posted May 16, 2021 Share Posted May 16, 2021 Hi, one of my gateways is "Bank Transfer" (latest version 1.2.0) https://www.cubecart.com/extensions/payment-gateways/bank-transfer If a purchase is made using Bank Transfer, the products are still in the cart afterwards. If purchased with either PayPal or "Print Order Form", the cart is empty afterwards as it should be. How can i change this, so it works with Bank Transfer as well? Thanks! Link to comment Share on other sites More sharing options...
bsmither Posted May 18, 2021 Share Posted May 18, 2021 Please verify the path to the Bank_Transfer module: /modules/gateway/Bank_Transfer/ The file 'gateway.class.php' has a public function call(). Try adding to that function: public function call() { $GLOBALS['cart']->clear(); } (I haven't tested this as yet.) Link to comment Share on other sites More sharing options...
MostlyConfused Posted May 19, 2021 Author Share Posted May 19, 2021 12 hours ago, bsmither said: Please verify the path to the Bank_Transfer module: /modules/gateway/Bank_Transfer/ The file 'gateway.class.php' has a public function call(). Try adding to that function: public function call() { $GLOBALS['cart']->clear(); } (I haven't tested this as yet.) nope, sorry, products are still left in cart after changing this Link to comment Share on other sites More sharing options...
MostlyConfused Posted May 19, 2021 Author Share Posted May 19, 2021 Update: since I know now that $GLOBALS['cart']->clear(); is the command to clear the cart, I tried moving it elsewhere in gateway.class.php. And just like that, it works! Thanks again mate. Link to comment Share on other sites More sharing options...
havenswift-hosting Posted May 19, 2021 Share Posted May 19, 2021 @Al Brookbanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.