|
| 1 | +# Catalog Category |
| 2 | + |
| 3 | +## [assignedProducts](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.assignedProducts.html) |
| 4 | + |
| 5 | +Retrieve the list of products assigned to a required category. |
| 6 | + |
| 7 | +```js |
| 8 | +magento.catalogCategory.assignedProducts({ |
| 9 | + categoryId: val |
| 10 | +}, callback); |
| 11 | +``` |
| 12 | + |
| 13 | +## [assignProduct](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.assignProduct.html) |
| 14 | + |
| 15 | +Create a new category and return its ID. |
| 16 | + |
| 17 | +```js |
| 18 | +magento.catalogCategory.assignProduct({ |
| 19 | + categoryId: val, |
| 20 | + product: val, |
| 21 | + position: val /* optional */ |
| 22 | +}, callback); |
| 23 | +``` |
| 24 | + |
| 25 | +## [create](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.create.html) |
| 26 | + |
| 27 | +Create a new category and return its ID. |
| 28 | + |
| 29 | +`data` is a catalogCategoryEntityCreate object. |
| 30 | + |
| 31 | +```js |
| 32 | +magento.catalogCategory.create({ |
| 33 | + categoryId: val, |
| 34 | + data: val, |
| 35 | + storeView: val /* optional */ |
| 36 | +}, callback); |
| 37 | +``` |
| 38 | + |
| 39 | +## [currentStore](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.currentStore.html) |
| 40 | + |
| 41 | +Allows you to set/get the current store view. |
| 42 | + |
| 43 | +```js |
| 44 | +magento.catalogCategory.currentStore({ |
| 45 | + storeView: val |
| 46 | +}, callback); |
| 47 | +``` |
| 48 | + |
| 49 | +## [delete](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.delete.html) |
| 50 | + |
| 51 | +Allows you to delete the required category. |
| 52 | + |
| 53 | +```js |
| 54 | +magento.catalogCategory.delete({ |
| 55 | + categoryId: val |
| 56 | +}, callback); |
| 57 | +``` |
| 58 | + |
| 59 | +## [info](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.info.html) |
| 60 | + |
| 61 | +Allows you to retrieve information about the required category. |
| 62 | + |
| 63 | +```js |
| 64 | +magento.catalogCategory.info({ |
| 65 | + categoryId: val, |
| 66 | + storeView: val, /* optional */ |
| 67 | + attributes: val /* optional */ |
| 68 | +}, callback); |
| 69 | +``` |
| 70 | + |
| 71 | +## [level](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.level.html) |
| 72 | + |
| 73 | +Allows you to retrieve one level of categories by a website, a store view, or a parent category. |
| 74 | + |
| 75 | +```js |
| 76 | +magento.catalogCategory.level(callback); |
| 77 | + |
| 78 | +// or |
| 79 | + |
| 80 | +magento.catalogCategory.level({ |
| 81 | + website: val, /* optional */ |
| 82 | + storeView: val, /* optional */ |
| 83 | + parentCategory: val /* optional */ |
| 84 | +}, callback); |
| 85 | +``` |
| 86 | + |
| 87 | +## [move](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.move.html) |
| 88 | + |
| 89 | +Allows you to move the required category in the category tree. |
| 90 | + |
| 91 | +```js |
| 92 | +magento.catalogCategory.move({ |
| 93 | + categoryId: val, |
| 94 | + parentId: val, |
| 95 | + afterId: val /* optional */ |
| 96 | +}, callback); |
| 97 | +``` |
| 98 | + |
| 99 | +## [removeProduct](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.removeProduct.html) |
| 100 | + |
| 101 | +Allows you to remove the product assignment from the category. |
| 102 | + |
| 103 | +```js |
| 104 | +magento.catalogCategory.removeProduct({ |
| 105 | + categoryId: val, |
| 106 | + productId: val |
| 107 | +}, callback); |
| 108 | +``` |
| 109 | + |
| 110 | +## [tree](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.tree.html) |
| 111 | + |
| 112 | +Allows you to retrieve the hierarchical tree of categories. |
| 113 | + |
| 114 | +```js |
| 115 | +magento.catalogCategory.tree(callback); |
| 116 | + |
| 117 | +// or |
| 118 | + |
| 119 | +magento.catalogCategory.tree({ |
| 120 | + parentId: val, /* optional */ |
| 121 | + storeView: val /* optional */ |
| 122 | +}, callback); |
| 123 | +``` |
| 124 | + |
| 125 | +## [update](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.update.html) |
| 126 | + |
| 127 | +Update the required category. Note that you should specify only those parameters which you want to be updated. |
| 128 | + |
| 129 | +```js |
| 130 | +magento.catalogCategory.update({ |
| 131 | + categoryId: val, |
| 132 | + categoryData: val, |
| 133 | + storeView: val /* optional */ |
| 134 | +}, callback); |
| 135 | +``` |
| 136 | + |
| 137 | +## [updateProduct](http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.updateProduct.html) |
| 138 | + |
| 139 | +Allows you to update the product assigned to a category. The product position is updated. |
| 140 | + |
| 141 | +```js |
| 142 | +magento.catalogCategory.updateProduct({ |
| 143 | + categoryId: val, |
| 144 | + productId: val, |
| 145 | + position: val /* optional */ |
| 146 | +}, callback); |
| 147 | +``` |
0 commit comments