Allows you to create a new product and return ID of the created product.
data
is a catalogProductCreateEntity object.
magento.catalogProduct.create({
type: val,
set: val,
sku: val,
data: val
}, callback);
Allows you to set/get the current store view.
magento.catalogProduct.currentStore(callback);
// or
magento.catalogProduct.currentStore({
view: val /* optional */
}, callback);
Allows you to delete the required product.
magento.catalogProduct.delete({
id: val
}, callback);
Allows you to get the product special price data.
magento.catalogProduct.getSpecialPrice({
id: val
}, callback);
Allows you to retrieve information about the required product.
magento.catalogProduct.info({
id: val,
view: val /* optional */
}, callback);
Allows you to retrieve the list of products.
magento.catalogProduct.list(callback);
//or
magento.catalogProduct.listOfAdditionalAttributes({
filters: val /* optional */
}, callback);
filter examples
{'type': {'in': 'simple'}}
{'created_at': {'from': '2011-07-06 01:01:01'}}
Get the list of additional attributes.
Additional attributes are attributes that are not in the default set of attributes.
magento.catalogProduct.listOfAdditionalAttributes({
prodType: val,
attributeSetId: val
}, callback);
Allows you to set the product special price.
from
and to
should be native JavaScript date objects.
magento.catalogProduct.setSpecialPrice({
id: val,
specialPrice: val,
from: val,
to: val,
storeView: val /* optional */
}, callback);
Allows you to update the required product. Note that you should specify only those parameters which you want to be updated.
data
is a catalogProductCreateEntity object.
magento.catalogProduct.update({
id: val,
data: val,
storeView: val /* optional */
}, callback);