Sign up ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

My module lives at app/code/local/Mymod/Pinterestimage.

etc/config.xml containts:

<?xml version="1.0"?>
<config>
    <modules>
        <Mymod_Pinterestimage>
            <version>0.2.0</version>
        </Mymod_Pinterestimage>
    </modules>
    <global>
        <!-- Create Pinterest image attribute using resources-->
        <resources>
            <pinterestimage_setup>
                <setup>
                    <module>Mymod_Pinterestimage</module>
                    <!-- <class>Mymod_Pinterestimage_Model_Resource_Eav_Mysql4_Setup</class>-->
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </pinterestimage_setup>
        </resources>
        ...
    </global>
    ...
</config>

In app/code/local/Mymod/Pinterestimage/sql/pinterestimage_setup/install-020.php I have:

<?
echo 'Running This Upgrade: '.get_class($this)."\n <br /> \n";
die("Exit for now");
$installer = $this;

$installer->startSetup();
$this->addAttribute(
    'catalog_product',
    'pinterest_image',
    array (
        'group'             => 'Images',
        'type'              => 'varchar',
        'frontend'          => 'catalog/product_attribute_frontend_image',
        'label'             => 'Default Pinterest Image',
        'input'             => 'media_image',
        'class'             => '',
        'source'            => '',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => false,
        'default'           => '',
        'searchable'        => false,
        'filterable'        => false,
        'comparable'        => false,
        'visible_on_front'  => false,
        'unique'            => false,
    )
);
$installer->endSetup();

In the database table core_resources I do not see a code column with the attribute Mymod_Pinterestimage

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Resolved this by changing:

  1. app/code/local/Mymod/Pinterestimage/sql/pinterestimage_setup/install-020.php

    to...

    app/code/local/Mymod/Pinterestimage/sql/Mymod_pinterestimage_setup/install-020.php

and

  1. <resources><pinterestimage_setup>

    to... <resources><mymod_pinterestimage_setup>

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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