I am creating a module to insert a new attribute and a new type of product in my store. As template, I use the same registration screen of the Virtual Product type and include new options ONLY this type of product. For this, in my config.xml, I used:

                <incomm_virtual translate="label" module="incomm">
                    <label>Incomm Virtual</label>

and to configure the installation with the sql in same config.xml:


The next file was used mymodule / model / product / type.php containing:

class ABC_Incomm_Model_Product_Type
    extends Mage_Catalog_Model_Product_Type_Virtual
    const TYPE_INCOMM          = 'incomm';
    const XML_PATH_AUTHENTICATION = 'catalog/incomm/authentication';

    protected function _prepareProduct(Varien_Object $buyRequest, $product, $processMode)
        if ($this->_isStrictProcessMode($processMode)) {
            return Mage::helper('ABC_Incomm_Helper_Data')->__(
                'Incomm product %s cannot be added to cart. ' .
                ' On the product detail page click the "Go to parent site"'.
                ' button to access the product.',
        return parent::_prepareProduct($buyRequest, $product, $processMode);

In the same folder, the virtual.php:

class ABC_Incomm_Model_Product_Virtual extends Mage_Catalog_Model_Product_Type_Virtual {   

Finally, the SQL installation file in sql folder / abc_incommproduct_setup / mysql-install-4-0.1.0.php:


$this->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'terms_of_use', array(
    'group'         => 'General',
    'input'         => 'textarea',
    'type'          => 'text',
    'sort_order' => 4,
    'label'         => 'Terms of use',
    'backend'       => '',
    'visible'       => true,
    'required'      => true,
    'wysiwyg_enabled' => true,
    'visible_on_front' => true,
    'apply_to'                => 'incomm', //only in this type of product
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,


My problem is this, after disabling the cache in magento, clear the cache and include a new type of product, in the Product Types list appears my NEW type of product, but the options NOT load the new attribute inserted via SQL. Did sqlinstall.php not run?

  • Is there abc_incommproduct_setup in core_resource? If so, does it have the version you specified in config.xml? What happens if you remove that record from core_resource, clear the cache, clear the sessions and give it another go? Commented May 14, 2015 at 13:23
  • Did you update the config.xml file version in the module where the SQL upgrade file is located?
    – eetzen
    Commented May 14, 2015 at 17:16
  • is not core_resource because i have used a model in my folder /model , dont work ... and yes, my config.xml have same version of the sql upgrade, Commented May 14, 2015 at 23:24

1 Answer 1


Try this:


$this->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'terms_of_use', array(
    'group'            => 'General',
    'input'            => 'textarea',
    'type'             => 'text',
    'sort_order'       => 4,
    'label'            => 'Terms of use',
    'backend'          => '',
    'visible'          => true,
    'required'         => true,
    'wysiwyg_enabled'  => true,
    'visible_on_front' => true,
    'global'           => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,

$installer->updateAttribute(Mage_Catalog_Model_Product::ENTITY, 'terms_of_use', 'apply_to', 'incomm');


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.