How to know whether the attribute belongs to one types of productin Magento?
====================================================================
$applyTo = explode(',',$installer->getAttribute('catalog_product', $field,'apply_to'));
if(!in_array('downloadable', $applyTo)) {
$applyTo[] = 'downloadable';
$installer->updateAttribute('catalog_product',$field, 'apply_to', join(',', $applyTo));
}
====================================================================
The two key properties for product type definition:
One is product model which is defined by Type class;The other isprice model which is used to calculate the price.
====================================================================
$applyTo = explode(',',$installer->getAttribute('catalog_product', $field,'apply_to'));
====================================================================
The two key properties for product type definition:
One is product model which is defined by Type class;The other isprice model which is used to calculate the price.