Skip to content

Latest commit

 

History

History
111 lines (76 loc) · 2.89 KB

catalog_product_attribute.md

File metadata and controls

111 lines (76 loc) · 2.89 KB

Catalog Product Attribute

Allows you to add a new option for attributes with selectable fields.

data is a catalogProductAttributeOptionEntityToAdd object.

magento.catalogProductAttribute.addOption({
  attribute:  val,
  data:       val
}, callback);

Allows you to create a new product attribute.

data is a catalogProductAttributeEntityToCreate object.

magento.catalogProductAttribute.create({
  data: val
}, callback);

Allows you to set/get the current store view.

magento.catalogProductAttribute.currentStore(callback);

// or

magento.catalogProductAttribute.currentStore({
  storeView: val
}, callback);

Allows you to get full information about a required attribute with the list of options.

magento.catalogProductAttribute.info({
  attribute: val
}, callback);

Allows you to retrieve the list of product attributes.

magento.catalogProductAttribute.list({
  setId: val
}, callback);

Allows you to retrieve the product attribute options.

magento.catalogProductAttribute.options({
  attributeId:  val,
  storeView:    val   /* optional */
}, callback);

Allows you to remove the required attribute from a product.

magento.catalogProductAttribute.remove({
  attribute: val
}, callback);

Allows you to remove the option for an attribute.

magento.catalogProductAttribute.removeOption({
  attribute:  val,
  optionId:   val
}, callback);

Allows you to retrieve the list of possible attribute types.

magento.catalogProductAttribute.types(callback);

Allows you to update the required attribute.

data is a catalogProductAttributeEntityToUpdate object.

magento.catalogProductAttribute.update({
  attribute:  val,
  data:       val
}, callback);