/** * Clean by product ids * * @param array $productIds * @return void */ protected function cleanByIds($productIds) { $query = $this->connection->deleteFromSelect($this->connection->select()->from($this->resource->getTableName('catalogrule_product'), 'product_id')->distinct()->where('product_id IN (?)', $productIds), $this->resource->getTableName('catalogrule_product')); $this->connection->query($query); $query = $this->connection->deleteFromSelect($this->connection->select()->from($this->resource->getTableName('catalogrule_product_price'), 'product_id')->distinct()->where('product_id IN (?)', $productIds), $this->resource->getTableName('catalogrule_product_price')); $this->connection->query($query); }