mebjas Posted July 20, 2013 Share Posted July 20, 2013 I have added an option to delete complete cart at once, which is working fine when user is not logged in. i'm using this function in cartcontroller.php protected function processDeleteProductInCart() { $c = new Cart($this->context->cart->id); $c->delete(); unset($c); } but , when any client is logged in this feature is not working please help Link to comment Share on other sites More sharing options...
mebjas Posted July 20, 2013 Author Share Posted July 20, 2013 Ok I have found the reason, the functions are called only when user is not logged in public function postProcess() { // Update the cart ONLY if $this->cookies are available, in order to avoid ghost carts created by bots if ($this->context->cookie->exists() && !$this->errors && !($this->context->customer->isLogged() && !$this->isTokenValid())) can anybody tell me which controller/function is run when user is logged in Link to comment Share on other sites More sharing options...
vekia Posted July 20, 2013 Share Posted July 20, 2013 many thanks for your solution, im convinced that it will be really helpfull for other merchants with the same problems i marked this thread as [solved] regards Link to comment Share on other sites More sharing options...
mebjas Posted July 21, 2013 Author Share Posted July 21, 2013 Apologies for posting similar king of questions in different threads. But the problem is not solved, Can you tell me which controller is used for generation of cart, or updating cart or deleting it in case a user is logged in Link to comment Share on other sites More sharing options...
Recommended Posts