Giter Club home page Giter Club logo

Comments (3)

sprankhub avatar sprankhub commented on September 24, 2024

Weird! It seems that

is an issue for you. Never heard of that before. Usually, this should work. Did you rename / delete / re-create the General attribute group?

As a quick fix, remove the line and run the setup scripts. Afterwards, add the attribute to each attribute set manually.

from customgento_configurabletierprices.

JanWGK avatar JanWGK commented on September 24, 2024

Thanks for the fix, that worked. I do not know of somebody changing the general attribute group, but the database has a long history and I noticed that there are several duplicates of system attribute groups in the table...

For your info, I just installed another module which is adding an attribute to all attribute sets without any issues like this:

<?php

$installer = new Mage_Eav_Model_Entity_Setup($this->_resourceName);
$installer->startSetup();

$installer->addAttribute('catalog_product', 'simple_price', array(
    'type'              => 'int',
    'backend'           => '',
    'frontend'          => '',
    'label'             => 'Use price of simple products',
    'note'              => 'If set to "Yes", full price of associated products of configurables is used for calculations and front end display instead of price difference.',
    'input'             => 'select',
    'class'             => '',
    'source'            => 'eav/entity_attribute_source_boolean',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => false,
    'default'           => '',
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'visible_on_front'  => false,
    'unique'            => false,
    'apply_to'          => 'configurable',
    'is_configurable'   => false,
//    'group'             => 'General',
));
$attributeId = $installer->getAttributeId('catalog_product', 'simple_price');

foreach ($installer->getAllAttributeSetIds('catalog_product') as $attributeSetId) 
{
    try {
        $attributeGroupId = $installer->getAttributeGroupId('catalog_product', $attributeSetId, 'General');
    } catch (Exception $e) {
        $attributeGroupId = $installer->getDefaultAttributeGroupId('catalog_product', $attributeSetId);
    }
    $installer->addAttributeToSet('catalog_product', $attributeSetId, $attributeGroupId, $attributeId);
}

$installer->endSetup();

from customgento_configurabletierprices.

sprankhub avatar sprankhub commented on September 24, 2024

It may be a good idea to add the attribute like this. I will reopen this, so that I can check this in more detail at some time. Thanks for the report!

from customgento_configurabletierprices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.