motabik Posted August 18, 2020 Share Posted August 18, 2020 (edited) I Have litle problem with combinations, when I using this method with webservice. Everything working ok, but after update product attribute, all customers who doing shopping in shop lost this product from their carts. After updating product via combinations, method combinations from webserwice delete this product from carts customer who now doing shopping. How I can disable this option or how I can update product combination price via webservice, and clients not lost this product from theirs carts. Edited August 27, 2020 by motabik (see edit history) Link to comment Share on other sites More sharing options...
motabik Posted August 27, 2020 Author Share Posted August 27, 2020 problem solved I changed one function in the combinations class. I replaced it with a file in the overrides directory class Combination extends CombinationCore { public function deleteAssociations() { $result = Db::getInstance()->delete('product_attribute_combination', '`id_product_attribute` = '.(int) $this->id); // $result &= Db::getInstance()->delete('cart_product', '`id_product_attribute` = '.(int) $this->id); $result &= Db::getInstance()->delete('product_attribute_image', '`id_product_attribute` = '.(int) $this->id); if ($result) { Hook::exec('actionAttributeCombinationDelete', array('id_product_attribute' => (int)$this->id)); } return $result; } } Link to comment Share on other sites More sharing options...
jjtony Posted January 13, 2021 Share Posted January 13, 2021 You've saved my life with this solution 🥰👏🙌 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