Alvaro Tarela Posted December 9, 2020 Share Posted December 9, 2020 I need to do additional actions when the cart is changed. I need to read the content of the cart and then check a set of conditions. So, I need to know how to put my set of conditions (a function). I want to print an error in the cart summary so I need my function to be executed when a product is changed (add or remove) in that screen. Can I use a module and put my function on it? This not work for me: public function hookActionCartSave(){ return $this->checkMyCart(); } protected function checkMyCart(){ // My code gos here.. $this->errors[] = $this->trans( $my_error_msg, array(), 'Shop.Notifications.Error' ); } Link to comment Share on other sites More sharing options...
Alvaro Tarela Posted December 10, 2020 Author Share Posted December 10, 2020 It doesn't work... I generate an "alert()" and nothing occurs... Only when I load the page, but nothing when I change a product quantity in the cart. 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