serafimsorovsky Posted April 6, 2017 Share Posted April 6, 2017 (edited) My goal is not to clear the cart after placing the order. I discover the code of PaymentModuleCore::validateOrder I noticed that after following call $result = $order->add(); the Cart becomes empty. It happens when the order is being placed into DB and if $order->id_cart is set. If I clear $order->id_cart then Cart doesn't become empty. But I can't find the code that clears the Cart. Edited April 6, 2017 by serafimsorovsky (see edit history) Link to comment Share on other sites More sharing options...
hakeryk2 Posted April 10, 2017 Share Posted April 10, 2017 Well, maybe just recreate cart after order is submitted using $recreated_cart = $order->getCartProducts() if $order object is still valid. If not use $order = new Order((int)$id_order). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now