Skip to content

Commit

Permalink
Merge pull request #58 from akretion/7.0_add_categ_backend_adapter
Browse files Browse the repository at this point in the history
[IMP] add additionnal backend adaptater for category
  • Loading branch information
pedrobaeza committed Nov 18, 2014
2 parents 7a2be43 + 6428a20 commit f01fd7d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions magentoerpconnect/product_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,26 @@ def filter_ids(tree):
[parent_id, storeview_id])
return filter_ids(tree)

def move(self, categ_id, parent_id, after_categ_id=None):
return self._call('%s.move' % self._magento_model,
[categ_id, parent_id, after_categ_id])

def get_assigned_product(self, categ_id):
return self._call('%s.assignedProducts' % self._magento_model,
[categ_id])

def assign_product(self, categ_id, product_id, position=0):
return self._call('%s.assignProduct' % self._magento_model,
[categ_id, product_id, position, 'id'])

def update_product(self, categ_id, product_id, position=0):
return self._call('%s.updateProduct' % self._magento_model,
[categ_id, product_id, position, 'id'])

def remove_product(self, categ_id, product_id):
return self._call('%s.removeProduct' % self._magento_model,
[categ_id, product_id, 'id'])


@magento
class ProductCategoryBatchImport(DelayedBatchImport):
Expand Down

0 comments on commit f01fd7d

Please # to comment.