From 07979774f69630a42e5058f11044097755cc6fd4 Mon Sep 17 00:00:00 2001 From: Arnaud Lemercier Date: Tue, 2 Apr 2013 18:44:12 +0200 Subject: [PATCH] Delete products tags entries without delete tags for webservice usage --- classes/Product.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/classes/Product.php b/classes/Product.php index b1669b31a..c027d691d 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -4674,7 +4674,7 @@ class ProductCore extends ObjectModel $ids = array(); foreach ($tag_ids as $value) $ids[] = $value['id']; - if ($this->deleteTags()) + if ($this->deleteWsTags()) { if ($ids) { @@ -4690,7 +4690,17 @@ class ProductCore extends ObjectModel } } return true; - } + } + + /** + * Delete products tags entries without delete tags for webservice usage + * + * @return array Deletion result + */ + public function deleteWsTags() + { + return Db::getInstance()->delete('product_tag', 'id_product = '.(int)$this->id); + } public function getWsManufacturerName()