Find and reference standard attribute types in Akeneo code

All standard attribute types available in Akeneo are listed in “\Akeneo\Pim\Structure\Component\AttributeTypes” (File: src/Akeneo/Pim/Structure/Component/AttributeTypes.php). <?php namespace Akeneo\Pim\Structure\Component; /** * Attribute types dictionary * * @author Willy Mesnage <willy.mesnage@akeneo.com> * @copyright 2015 Akeneo SAS (http://www.akeneo.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ final class AttributeTypes { const BOOLEAN = ‘pim_catalog_boolean’; const DATE = ‘pim_catalog_date’; const […]

Magento change attribute scope in setup script

This code snippet shows how to change attribute scope in a setup script: <?php /* @var $oInstaller Mage_Catalog_Model_Resource_Setup */ $oInstaller = $this; $oInstaller->startSetup(); $oInstaller->updateAttribute( ‘catalog_product’, ‘abc_attribute’, ‘is_global’, Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE ); $oInstaller->updateAttribute( ‘catalog_product’, ‘xyz_attribute’, ‘is_global’, Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE ); $oInstaller->endSetup(); // mark index as “reindex required” $aIndexerCodes = [ ‘catalog_product_attribute’, ‘catalog_product_flat’, ‘catalogsearch_fulltext’ ]; $oIndexer = Mage::getModel(‘index/process’); foreach ($aIndexerCodes as $sCode) […]