def name(self, name): CCAPI.set_product_name(product_ids=[p.id for p in self.products], name=name) CCAPI.update_range_settings( self.id, current_name=self.name, current_sku=self.sku, current_end_of_line=self.end_of_line, current_pre_order=self.pre_order, current_group_items=self.grouped, new_name=name, new_sku=self.sku, new_end_of_line=self.end_of_line, new_pre_order=self.pre_order, new_group_items=self.grouped, channels=self._get_sales_channel_ids(), )
def name(self, name): """Set the product's name.""" CCAPI.set_product_name(name=name, product_ids=[self.id]) self._name = name self.full_name = None