NishantVadgama Posted March 16, 2015 Share Posted March 16, 2015 I am using prestashop 1.6.0.14 and In my local store I have overrided paymentModule's validation() method and in that method I have check that if cart having product id = 18 then remove it. code as follows if ($this->context->cart->containsProduct(18)) { $this->context->cart->deleteProduct(18); this->context->cart->update(); } it works fine remove product from ps_cart_product table but order placed with that product why so..? to trace I have printed as follows if ($this->context->cart->containsProduct(18)) { $this->context->cart->deleteProduct(18); this->context->cart->update(); print_r('<br>---------------------------------------------------------<br>'); print_r($this->context->cart->getProducts()); print_r('<br>---------------------------------------------------------<br>'); print_r($this->context->cart->getPackageList());exit; } when print getProducts() does not contain product id 18 but getPackageList() still contains that product why so..? and how can I delete product form that also..? help me please 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