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