<?php /** * setup of tracking flags */ require_once "mygassi-config.php"; require_once "mygassi-logger.php"; require_once mageroot; Mage::app(); logger("Starting: mygassi-install"); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute("catalog_product", "weight", "is_required", 0); $setup->updateAttribute("catalog_product", "basisartikelnr", "is_required", 0); /* $res = $setup->addAttribute('catalog_product', 'group_id', array( 'group' => 'MyGassi', 'label' => 'Produktgruppen ID', 'type' => 'int', 'input' => 'text', 'frontend' => '', 'visible' => true, 'required' => false, 'user_defined' => true, 'is_user_defined' => true, 'searchable' => true, 'filterable' => true, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'default' => '0', 'unique' => false
<?php /** * @author Amasty Team * @copyright Copyright (c) 2015 Amasty (https://www.amasty.com) * @package Amasty_Conf */ $installer = new Mage_Eav_Model_Entity_Setup($this->_resourceName); $installer->startSetup(); $installer->updateAttribute('catalog_product', 'amconf_simple_price', 'apply_to', 'configurable'); $installer->endSetup();
<?php $installer = new Mage_Eav_Model_Entity_Setup('core_setup'); $installer->startSetup(); $setup = $this; $fieldList = array('is_reservation', 'tax_class_id', 'payperrentals_quantity', 'payperrentals_min_number', 'payperrentals_min_type', 'payperrentals_max_number', 'payperrentals_max_type', 'payperrentals_avail_number', 'payperrentals_avail_type', 'payperrentals_avail_numberb', 'payperrentals_avail_typeb', 'payperrentals_deposit', 'payperrentals_has_shipping', 'payperrentals_has_multiply', 'payperrentals_pricingtype', 'payperrentals_use_serials', 'payperrentals_use_send_return', 'payperrentals_use_times', 'res_excluded_dates', 'res_prices', 'payperrentals_padding_days', 'res_serialnumbers', 'disabled_with_message', 'res_excluded_daysweek', 'allow_overbooking', 'global_min_period', 'global_max_period', 'global_turnover_after', 'global_turnover_before', 'global_excludedays'); foreach ($fieldList as $field) { $applyTo = explode(',', $installer->getAttribute('catalog_product', $field, 'apply_to')); if (!in_array('bundle', $applyTo)) { $applyTo[] = 'bundle'; } $installer->updateAttribute('catalog_product', $field, 'apply_to', implode(',', $applyTo)); } try { $setup->removeAttribute('catalog_product', 'bundle_pricingtype'); } catch (Exception $E) { } $setup->addAttribute('catalog_product', 'bundle_pricingtype', array('backend' => '', 'source' => 'payperrentals/product_bundlepricingtype', 'group' => 'Payperrentals', 'label' => 'Bundle Pricing Type', 'input' => 'select', 'type' => 'int', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, 'visible' => true, 'default' => 0, 'required' => false, 'user_defined' => false, 'apply_to' => 'bundle', 'visible_on_front' => false, 'position' => 10)); $installer->endSetup();
<?php /** * mysql4-upgrade-0.1.0-0.1.1.php created by a.voytik. * Date: 27/04/2012 09:27 */ /* @var $installer Dutycalculator_Charge_Model_Resource_Setup */ $installer = $this; $productAttributesSetup = new Mage_Eav_Model_Entity_Setup('core_setup'); $installer->startSetup(); $productAttributesSetup->updateAttribute('catalog_product', 'dc_product_id', array('backend_model' => 'dccharge/attribute_backend_model_category')); $installer->endSetup();
* Apptha does not guarantee correct work of this extension * on any other Magento edition except Magento COMMUNITY edition. * Apptha does not provide extension support in case of * incorrect edition usage. * ============================================================== * * @category Apptha * @package Apptha_Marketplace * @version 1.7 * @author Apptha Team <*****@*****.**> * @copyright Copyright (c) 2015 Apptha. (http://www.apptha.com) * @license http://www.apptha.com/LICENSE.txt * */ /** * This file is used to create table for "Seller Vacation Mode" */ $installer = $this; /** * @var $installer Mage_Core_Model_Resource_Setup */ $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $applyTo = array('simple', 'configurable'); $setup->updateAttribute('catalog_product', 'seller_shipping_option', 'apply_to', join(',', $applyTo)); $setup->updateAttribute('catalog_product', 'national_shipping_price', 'apply_to', join(',', $applyTo)); $setup->updateAttribute('catalog_product', 'international_shipping_price', 'apply_to', join(',', $applyTo)); $setup->updateAttribute('catalog_product', 'default_country', 'apply_to', join(',', $applyTo)); $setup->addAttribute('catalog_product', 'is_assign_product', array('group' => 'Special Attributes', 'input' => 'text', 'type' => 'text', 'label' => 'Is assign product', 'backend' => '', 'visible' => 1, 'required' => 0, 'user_defined' => 1, 'searchable' => 1, 'filterable' => 0, 'comparable' => 1, 'visible_on_front' => 1, 'visible_in_advanced_search' => 0, 'is_html_allowed_on_front' => 0, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL)); $setup->addAttribute('catalog_product', 'assign_product_id', array('group' => 'Special Attributes', 'input' => 'text', 'type' => 'text', 'label' => 'Assign product id', 'backend' => '', 'visible' => 1, 'required' => 0, 'user_defined' => 1, 'searchable' => 1, 'filterable' => 0, 'comparable' => 1, 'visible_on_front' => 1, 'visible_in_advanced_search' => 0, 'is_html_allowed_on_front' => 0, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL)); $installer->endSetup();
<?php $installer = $this; $installer->startSetup(); $attributeInstaller = new Mage_Eav_Model_Entity_Setup('core_setup'); $attributeInstaller->addAttribute('catalog_product', 'enable_zoom_plugin', array('group' => 'ColorSwatch', 'type' => 'int', 'input' => 'select', 'label' => 'Enable SMDesign SMDZoom', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, 'visible' => 1, 'required' => 0, 'visible_on_front' => 0, 'is_html_allowed_on_front' => 0, 'is_configurable' => 0, 'source' => 'eav/entity_attribute_source_boolean', 'searchable' => 0, 'filterable' => 0, 'comparable' => 0, 'default' => 1, 'unique' => false, 'user_defined' => false, 'is_user_defined' => false, 'used_in_product_listing' => true)); $attributeInstaller->updateAttribute('catalog_product', 'enable_zoom_plugin', 'apply_to', join(',', array('configurable'))); $installer->endSetup();
<?php $installer = $this; $installer->startSetup(); $installer->run("\n\n-- DROP TABLE IF EXISTS {$this->getTable('colorswatch_images')};\nCREATE TABLE {$this->getTable('colorswatch_images')} (\n `entity_id` int(11) unsigned NOT NULL auto_increment,\n `attribute_code` varchar(255) NOT NULL default '',\n `attribute_id` int(11) NOT NULL default '0',\n `option_id` int(11) NOT NULL default '0',\n `swatch_description` varchar(255) NOT NULL default '',\n `image_base` varchar(255) NOT NULL default '',\n `image_active` varchar(255) NOT NULL default '',\n `image_hover` varchar(255) NOT NULL default '',\n `image_disabled` varchar(255) NOT NULL default '',\n `created_time` datetime NULL,\n `update_time` datetime NULL,\n PRIMARY KEY (`entity_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- DROP TABLE IF EXISTS {$this->getTable('colorswatch_attribute_settings')};\nCREATE TABLE {$this->getTable('colorswatch_attribute_settings')} (\n \t`entity_id` int(11) unsigned NOT NULL auto_increment,\n `attribute_id` int(11) NOT NULL default '0',\n `attribute_code` varchar(255) NOT NULL default '',\n `key` varchar(255) NOT NULL default '',\n\t`value` varchar(255) NOT NULL default '',\n PRIMARY KEY (`entity_id`),\n KEY (`attribute_id`, `key`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\n\n"); $attributeInstaller = new Mage_Eav_Model_Entity_Setup('core_setup'); $attributeInstaller->addAttribute('catalog_product', 'use_smd_colorswatch', array('group' => 'ColorSwatch', 'type' => 'int', 'input' => 'select', 'label' => 'Enable SMDesign ColorSwatch', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'visible' => 1, 'required' => 0, 'visible_on_front' => 0, 'is_html_allowed_on_front' => 0, 'is_configurable' => 0, 'source' => 'eav/entity_attribute_source_boolean', 'searchable' => 0, 'filterable' => 0, 'comparable' => 0, 'default' => 1, 'unique' => false, 'user_defined' => false, 'is_user_defined' => false, 'used_in_product_listing' => true)); $attributeInstaller->updateAttribute('catalog_product', 'use_smd_colorswatch', 'apply_to', join(',', array('configurable'))); $installer->endSetup();
<?php $installer = new Mage_Eav_Model_Entity_Setup('core_setup'); $installer->startSetup(); $entityTypeId = $installer->getEntityTypeId('catalog_product'); $idAttributeOldSelect = $installer->getAttribute($entityTypeId, 'categoria_anymarket', 'attribute_id'); $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, 'frontend_input', 'select'); $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, 'backend_type', 'varchar'); $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, 'backend_model', 'eav/entity_attribute_backend_array'); $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, 'source_model', 'db1_anymarket/system_config_source_categories_values'); $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, 'note', 'Selecione uma categoria para enviar ao Anymarket'); $installer->endSetup();
$installer->run("ALTER TABLE {$this->getTable('sales/order')} ADD COLUMN `webpos_base_change` decimal(12,4) NOT NULL default '0'"); } if (!$webposHelper->columnExist($this->getTable('sales/invoice'), 'webpos_change')) { $installer->run("ALTER TABLE {$this->getTable('sales/invoice')} ADD COLUMN `webpos_change` decimal(12,4) NOT NULL default '0'"); } if (!$webposHelper->columnExist($this->getTable('sales/invoice'), 'webpos_base_change')) { $installer->run("ALTER TABLE {$this->getTable('sales/invoice')} ADD COLUMN `webpos_base_change` decimal(12,4) NOT NULL default '0'"); } $webposHelper->addDefaultData(); $installer->endSetup(); $installer = new Mage_Eav_Model_Entity_Setup(); $installer->startSetup(); $fieldList = array('tax_class_id'); foreach ($fieldList as $field) { $applyTo = explode(',', $installer->getAttribute(Mage_Catalog_Model_Product::ENTITY, $field, 'apply_to')); if (!in_array('customsale', $applyTo)) { $applyTo[] = 'customsale'; $installer->updateAttribute(Mage_Catalog_Model_Product::ENTITY, $field, 'apply_to', implode(',', $applyTo)); } } $installer->endSetup(); $product = Mage::getModel('catalog/product'); $product->getIdBySku('webpos-customsale'); if ($product->getId()) { try { $product->setData('tax_class_id', 0); $product->save(); } catch (Exception $e) { Zend_debug::dump($e->getMessage()); } }
<?php /** * @var $installer Mage_Core_Model_Resource_Setup */ $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->removeAttribute('customer', 'membershippackage_day'); $setup->removeAttribute('customer', 'membershippackage_month'); $setup->removeAttribute('customer', 'membershippackage_year'); $setup->removeAttribute('customer', 'membershippackage_payment'); /** fix sort orders */ $setup->updateAttribute('customer', 'membershippackage_name', array('position' => 10)); $setup->updateAttribute('customer', 'membershippackage_enabled', array('position' => 20)); $setup->updateAttribute('customer', 'membershippackage_cc', array('position' => 30)); /** Add membershippackage_ccexpiremonth, membershippackage_ccexpireyear, membershippackage_otherpayment, membershippackage_start, membershippackage_lastbilled, membershippackage_notes */ $setup->addAttribute('customer', 'membershippackage_ccmonth', array('type' => 'text', 'input' => 'select', 'group' => 'Membership', 'label' => 'CC Expires Month', 'global' => 1, 'visible' => 1, 'required' => 0, 'position' => 31, 'user_defined' => 1, 'default' => '0', 'visible_on_front' => 0, 'source' => 'payperrentals/customer_membershippackage_ccmonth')); if (version_compare(Mage::getVersion(), '1.4.2', '>=')) { Mage::getSingleton('eav/config')->getAttribute('customer', 'membershippackage_ccmonth')->setData('used_in_forms', array('adminhtml_customer_membership'))->save(); } $setup->addAttribute('customer', 'membershippackage_ccyear', array('type' => 'text', 'input' => 'select', 'group' => 'Membership', 'label' => 'CC Expires Year', 'global' => 1, 'visible' => 1, 'required' => 0, 'position' => 32, 'user_defined' => 1, 'default' => '0', 'visible_on_front' => 0, 'source' => 'payperrentals/customer_membershippackage_ccyear')); if (version_compare(Mage::getVersion(), '1.4.2', '>=')) { Mage::getSingleton('eav/config')->getAttribute('customer', 'membershippackage_ccyear')->setData('used_in_forms', array('adminhtml_customer_membership'))->save(); } $setup->addAttribute('customer', 'membershippackage_otherpayment', array('type' => 'varchar', 'input' => 'textarea', 'group' => 'Membership', 'label' => 'Other Payment Method Details', 'global' => 1, 'visible' => 1, 'required' => 0, 'position' => 40, 'user_defined' => 1, 'default' => '0', 'visible_on_front' => 0)); if (version_compare(Mage::getVersion(), '1.4.2', '>=')) { Mage::getSingleton('eav/config')->getAttribute('customer', 'membershippackage_otherpayment')->setData('used_in_forms', array('adminhtml_customer_membership'))->save(); } $setup->addAttribute('customer', 'membershippackage_start', array('type' => 'datetime', 'input' => 'datetime', 'group' => 'Membership', 'label' => 'Membership Start Date', 'global' => 1, 'visible' => 1, 'required' => 0, 'position' => 50, 'user_defined' => 1, 'default' => '0', 'visible_on_front' => 0)); if (version_compare(Mage::getVersion(), '1.4.2', '>=')) {
<?php /** * changes annoying :))) req attributes */ require_once "mygassi-config.php"; require_once "mygassi-logger.php"; require_once mageroot; Mage::app(); logger("Starting: mygassi-remove-req-attrs"); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute("catalog_product", "weight", "is_required", 0); $setup->updateAttribute("catalog_product", "basisartikelnr", "is_required", 0); $setup->endSetup(); logger("Done: mygassi-install"); exit(1);
<?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_category', 'categ_integra_anymarket', 'is_required', 0); $installer->endSetup();
<?php $installer = new Mage_Eav_Model_Entity_Setup('core_setup'); $installer->startSetup(); $setup = $this; $fieldList = array('is_reservation'); foreach ($fieldList as $field) { $installer->updateAttribute('catalog_product', $field, 'required', '1'); $installer->updateAttribute('catalog_product', $field, 'default_value', null); $installer->updateAttribute('catalog_product', $field, 'class', 'required-entry select'); } $configValuesMap = array('payperrentals/notificationemails/send_queue_email' => 'payperrentals_notification_send_queue'); foreach ($configValuesMap as $configPath => $configValue) { $installer->setConfigData($configPath, $configValue); } $installer->run("\n\tDROP TABLE IF EXISTS {$this->getTable('payperrentals/mailinglog')};\n\n\tCREATE TABLE {$this->getTable('payperrentals/mailinglog')} (\n\t\t`id` INT( 11 ) NOT NULL auto_increment,\n\t\t`is_cron` int(11) NOT NULL DEFAULT '0',\n\t\t`from_name` varchar(250) NOT NULL,\n\t\t`from_email` varchar(250) NOT NULL,\n\t\t`to_name` varchar(250) NOT NULL,\n\t\t`to_email` varchar(250) NOT NULL,\n\t\t`subject` TEXT,\n\t\t`message` TEXT,\n\t\t`message_error` TEXT,\n\t\t`created_at` DATETIME NOT NULL ,\n\t\tPRIMARY KEY ( `id` )\n\n\t) DEFAULT CHARSET utf8 ENGINE = InnoDB;\n\n\t"); $installer->endSetup(); $installer2 = new Mage_Sales_Model_Mysql4_Setup('sales_setup'); $installer2->startSetup(); $installer2->addAttribute('order', 'start_datetime', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('order', 'end_datetime', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('order', 'send_datetime', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('order', 'return_datetime', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('order', 'estimate_send', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('order', 'estimate_return', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('quote', 'start_datetime', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->addAttribute('quote', 'end_datetime', array('type' => 'datetime', 'grid' => true, 'unsigned' => true)); $installer2->getConnection()->addColumn($installer2->getTable('sales/quote'), 'start_datetime', 'DATETIME'); $installer2->getConnection()->addColumn($installer2->getTable('sales/order'), 'end_datetime', 'DATETIME'); $installer2->getConnection()->addColumn($installer2->getTable('sales/quote'), 'end_datetime', 'DATETIME'); $installer2->getConnection()->addColumn($installer2->getTable('sales/order'), 'start_datetime', 'DATETIME');
<?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_product', 'categoria_anymarket', 'is_required', 0); $installer->endSetup();
/** * aheadWorks Co. * * NOTICE OF LICENSE * * This source file is subject to the EULA * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://ecommerce.aheadworks.com/AW-LICENSE.txt * * ================================================================= * MAGENTO EDITION USAGE NOTICE * ================================================================= * This package designed for Magento enterprise edition * aheadWorks does not guarantee correct work of this extension * on any other Magento edition except Magento enterprise edition. * aheadWorks does not provide extension support in case of * incorrect edition usage. * ================================================================= * * @category AW * @package AW_Onsale * @version 2.4.0 * @copyright Copyright (c) 2010-2012 aheadWorks Co. (http://www.aheadworks.com) * @license http://ecommerce.aheadworks.com/AW-LICENSE.txt */ function updateScoupe(Mage_Eav_Model_Entity_Setup $setup, $entityTypeId, $code, $value) { $id = $setup->getAttribute($entityTypeId, $code, 'attribute_id'); $setup->updateAttribute($entityTypeId, $id, 'is_global', $value); }
* * @category O2TI * @package O2TI_Sisfrete * @copyright Copyright (c) 2011 O2TI Soluções Web Ltda. (http://www.o2ti.com) * @author O2TI Soluções Web Ltda. <*****@*****.**> * @license http://www.o2ti.com/new-bsd-license/ New BSD License */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); $installer->deleteConfigData('carriers/O2TI_Sisfrete/urlmethod'); $sql = "select value from " . $installer->getTable('core/config_data') . " where path='carriers/O2TI_Sisfrete/postmethods'"; $methods = explode(',', $connection->fetchOne($sql)); foreach ($methods as $key => $method) { if ($method == '41025') { unset($methods[$key]); } } if (count($methods) <= 0) { $methods[] = '41106'; } $installer->setConfigData('carriers/O2TI_Sisfrete/postmethods', implode(',', $methods)); $sql = "select value from " . $installer->getTable('core/config_data') . " where path='carriers/O2TI_Sisfrete/free_method'"; if ($connection->fetchOne($sql) == '41025') { $installer->setConfigData('carriers/O2TI_Sisfrete/free_method', '41106'); } $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_product', 'volume_comprimento', 'note', 'Comprimento da embalagem do produto (Para cálculo dos Sisfrete)'); $setup->updateAttribute('catalog_product', 'volume_altura', 'note', 'Altura da embalagem do produto (Para cálculo dos Sisfrete)'); $setup->updateAttribute('catalog_product', 'volume_largura', 'note', 'Largura da embalagem do produto (Para cálculo dos Sisfrete)'); $installer->endSetup();
<?php /** * Mirasvit * * This source file is subject to the Mirasvit Software License, which is available at http://mirasvit.com/license/. * Do not edit or add to this file if you wish to upgrade the to newer versions in the future. * If you wish to customize this module for your needs. * Please refer to http://www.magentocommerce.com for more information. * * @category Mirasvit * @package Advanced SEO Suite * @version 1.3.0 * @build 1072 * @copyright Copyright (C) 2015 Mirasvit (http://mirasvit.com/) */ $installer = $this; $version = Mage::helper('mstcore/version')->getModuleVersionFromDb('seo'); if ($version == '0.1.4') { return; } elseif ($version != '0.1.3') { die("Please, run migration 0.1.3"); } $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_product', 'url_key', 'note', 'Leave blank to use Product URL Key Template'); $installer->endSetup(); Mage::getSingleton('catalog/url')->refreshRewrites();
<?php /* * **************************************************** * Package : Brand * Author : HIEPNH * Copyright : (c) 2015 * ***************************************************** */ $installer = $this; $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $installer->startSetup(); $attributeSetCollection = Mage::getResourceModel('eav/entity_attribute_set_collection')->load(); foreach ($attributeSetCollection as $id => $attributeSet) { $setup->addAttributeGroup('catalog_product', $attributeSet->getAttributeSetName(), 'Product Brand', 1000); } $setup->addAttribute('catalog_product', 'mgs_brand', array('group' => 'Product Brand', 'label' => 'MGS Brand', 'type' => 'int', 'input' => 'select', 'frontend_class' => '', 'source' => '', 'backend' => '', 'frontend' => '', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'unique' => false)); $setup->updateAttribute('catalog_product', 'mgs_brand', 'is_filterable', 0); $setup->updateAttribute('catalog_product', 'mgs_brand', 'is_filterable_in_search', 0); $setup->updateAttribute('catalog_product', 'mgs_brand', 'is_visible_on_front', 0); $setup->updateAttribute('catalog_product', 'mgs_brand', 'used_in_product_listing', 0); $installer->run("\nDROP TABLE IF EXISTS {$this->getTable('mgs_brand')};\nCREATE TABLE IF NOT EXISTS {$this->getTable('mgs_brand')} (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n `title` varchar(255) NOT NULL DEFAULT '',\n `url_key` varchar(255) NOT NULL DEFAULT '',\n `icon` varchar(255) NOT NULL DEFAULT '',\n `image` varchar(255) NOT NULL DEFAULT '',\n `description` text NOT NULL,\n `meta_keywords` text NOT NULL,\n `meta_description` text NOT NULL,\n `status` smallint(6) NOT NULL DEFAULT '1',\n `is_featured` smallint(6) NOT NULL DEFAULT '0',\n `priority` int(11) NOT NULL DEFAULT '0',\n `number_of_products` int(11) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY (`url_key`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nDROP TABLE IF EXISTS {$this->getTable('mgs_brand_products')};\nCREATE TABLE IF NOT EXISTS {$this->getTable('mgs_brand_products')} (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n `brand_id` int(11) unsigned NOT NULL,\n `product_id` int(11) unsigned NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n "); $installer->endSetup();
<?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_product', 'categoria_anymarket', 'note', 'Selecione uma categoria para enviar ao Anymarket'); $setup->updateAttribute('catalog_product', 'categoria_anymarket', 'is_global', 'Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL'); $setup->updateAttribute('catalog_product', 'id_anymarket', 'is_global', 'Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL'); $installer->endSetup();
<?php $installer = $this; $installer->startSetup(); $attributeInstaller = new Mage_Eav_Model_Entity_Setup('core_setup'); $attributeInstaller->addAttribute('catalog_product', 'enable_zoom_plugin', array('group' => 'ColorSwatch', 'type' => 'int', 'input' => 'select', 'label' => 'Enable SMDesign Zoom', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'visible' => 1, 'required' => 0, 'visible_on_front' => 0, 'is_html_allowed_on_front' => 0, 'is_configurable' => 0, 'source' => 'eav/entity_attribute_source_boolean', 'searchable' => 0, 'filterable' => 0, 'comparable' => 0, 'default' => 1, 'unique' => false, 'user_defined' => false, 'is_user_defined' => false, 'used_in_product_listing' => true)); $attributeInstaller->updateAttribute('catalog_product', 'enable_zoom_plugin', 'apply_to', join(',', array('simple', 'grouped', 'configurable', 'virtual', 'bundle', 'downloadable'))); $installer->endSetup();
function updateFrontendModel(Mage_Eav_Model_Entity_Setup $setup, $entityTypeId, $code, $value) { $id = $setup->getAttribute($entityTypeId, $code, 'attribute_id'); $setup->updateAttribute($entityTypeId, $id, 'frontend_model', $value); }
<?php /** * Unirgy LLC * * NOTICE OF LICENSE * * This source file is subject to the EULA * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.unirgy.com/LICENSE-M1.txt * * @category Unirgy * @package Unirgy_Dropship * @copyright Copyright (c) 2008-2009 Unirgy LLC (http://www.unirgy.com) * @license http:///www.unirgy.com/LICENSE-M1.txt */ $this->startSetup(); $conn = $this->_conn; $conn->addKey($this->getTable('udropship_vendor'), 'IDX_STATUS', 'status'); $eav = new Mage_Eav_Model_Entity_Setup('sales_setup'); $eav->updateAttribute('catalog_product', 'udropship_vendor', 'backend_model', 'Unirgy_Dropship_Model_Mysql4_Vendor_Backend'); $eav->updateAttribute('catalog_product', 'udropship_vendor', 'source_model', 'Unirgy_Dropship_Model_Vendor_Source'); if (version_compare(Mage::getVersion(), '1.3.0', '>=')) { $eav->updateAttribute('catalog_product', 'udropship_vendor', 'used_in_product_listing', 1); } $eav->addAttribute('quote', 'udropship_shipping_details', array('type' => 'static')); $conn->addColumn($this->getTable('sales_flat_quote'), 'udropship_shipping_details', 'text'); $eav->addAttribute('order', 'udropship_shipping_details', array('type' => 'text')); $this->endSetup();
/** * aheadWorks Co. * * NOTICE OF LICENSE * * This source file is subject to the EULA * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://ecommerce.aheadworks.com/AW-LICENSE.txt * * ================================================================= * MAGENTO EDITION USAGE NOTICE * ================================================================= * This package designed for Magento enterprise edition * aheadWorks does not guarantee correct work of this extension * on any other Magento edition except Magento enterprise edition. * aheadWorks does not provide extension support in case of * incorrect edition usage. * ================================================================= * * @category AW * @package AW_Onsale * @version 2.4.0 * @copyright Copyright (c) 2010-2012 aheadWorks Co. (http://www.aheadworks.com) * @license http://ecommerce.aheadworks.com/AW-LICENSE.txt */ function setSortOrder(Mage_Eav_Model_Entity_Setup $setup, $entityTypeId, $code, $sortOrder) { $id = $setup->getAttribute($entityTypeId, $code, 'attribute_id'); $setup->updateAttribute($entityTypeId, $id, array(), null, $sortOrder); }
<?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_product', 'categoria_anymarket', 'is_user_defined', 1); $installer->endSetup();
<?php /** * Mirasvit * * This source file is subject to the Mirasvit Software License, which is available at http://mirasvit.com/license/. * Do not edit or add to this file if you wish to upgrade the to newer versions in the future. * If you wish to customize this module for your needs. * Please refer to http://www.magentocommerce.com for more information. * * @category Mirasvit * @package Advanced SEO Suite * @version 1.3.0 * @build 1072 * @copyright Copyright (C) 2015 Mirasvit (http://mirasvit.com/) */ $installer = $this; $version = Mage::helper('mstcore/version')->getModuleVersionFromDb('seo'); if ($version == '0.1.3') { return; } elseif ($version != '0.1.1') { die("Please, run migration 0.1.1"); } $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('catalog_product', 'url_key', 'is_global', Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE); $installer->endSetup(); Mage::getSingleton('catalog/url')->refreshRewrites();
* NOTICE OF LICENSE * * This source file is subject to the EULA * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.unirgy.com/LICENSE-M1.txt * * @category Unirgy * @package Unirgy_Dropship * @copyright Copyright (c) 2008-2009 Unirgy LLC (http://www.unirgy.com) * @license http:///www.unirgy.com/LICENSE-M1.txt */ $this->startSetup(); $this->run("\n\nCREATE TABLE `{$this->getTable('udropship_shipping')}` (\n`shipping_id` int(10) unsigned NOT NULL auto_increment,\n`shipping_code` varchar(30) NOT NULL,\n`shipping_title` varchar(100) NOT NULL,\n`days_in_transit` varchar(20) NOT NULL,\nPRIMARY KEY (`shipping_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `{$this->getTable('udropship_shipping_method')}` (\n`shipping_id` int(10) unsigned NOT NULL,\n`carrier_code` varchar(30) NOT NULL,\n`method_code` varchar(30) NOT NULL,\nKEY `FK_udropship_shipping_method` (`shipping_id`),\nCONSTRAINT `FK_udropship_shipping_method` FOREIGN KEY (`shipping_id`) REFERENCES `{$this->getTable('udropship_shipping')}` (`shipping_id`) ON DELETE CASCADE ON UPDATE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\nCREATE TABLE `{$this->getTable('udropship_shipping_website')}` (\n`shipping_id` int(10) unsigned NOT NULL,\n`website_id` smallint(5) unsigned NOT NULL,\nUNIQUE KEY `website_id` (`website_id`,`shipping_id`),\nKEY `FK_udropship_shipping_website` (`shipping_id`),\nCONSTRAINT `FK_udropship_shipping_website` FOREIGN KEY (`shipping_id`) REFERENCES `{$this->getTable('udropship_shipping')}` (`shipping_id`) ON DELETE CASCADE ON UPDATE CASCADE,\nCONSTRAINT `FK_udropship_shipping_website_pk` FOREIGN KEY (`website_id`) REFERENCES `{$this->getTable('core_website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `{$this->getTable('udropship_vendor')}` (\n`vendor_id` int(11) unsigned NOT NULL auto_increment,\n`vendor_name` varchar(255) NOT NULL,\n`vendor_attn` varchar(255) NOT NULL,\n`email` varchar(127) NOT NULL,\n`street` varchar(255) NOT NULL,\n`city` varchar(50) NOT NULL,\n`zip` varchar(20) default NULL,\n`country_id` char(2) NOT NULL,\n`region_id` mediumint(8) unsigned default NULL,\n`region` varchar(50) default NULL,\n`telephone` varchar(50) default NULL,\n`status` char(1) NOT NULL,\n`password` varchar(50) default NULL,\n`password_hash` varchar(50) default NULL,\n`password_enc` varchar(50) default NULL,\n`carrier_code` varchar(50) default NULL,\n`notify_new_order` tinyint not null default 1,\n`label_type` varchar(10) not null default 'PDF',\n`test_mode` tinyint(1) not null default 0,\n`handling_fee` decimal(12,5) not null,\n`ups_shipper_number` varchar(6),\n`custom_data_combined` text,\n`custom_vars_combined` text,\nPRIMARY KEY (`vendor_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `{$this->getTable('udropship_vendor_product')}` (\n`vendor_product_id` int(11) unsigned NOT NULL auto_increment,\n`vendor_id` int(10) unsigned NOT NULL,\n`product_id` int(10) unsigned NOT NULL,\n`priority` smallint(5) unsigned NOT NULL,\n`carrier_code` varchar(50) default NULL,\nPRIMARY KEY (`vendor_product_id`),\nKEY `FK_udropship_vendor_product` (`vendor_id`),\nKEY `FK_udropship_vendor_product_entity` (`product_id`),\nCONSTRAINT `FK_udropship_vendor_product` FOREIGN KEY (`vendor_id`) REFERENCES `{$this->getTable('udropship_vendor')}` (`vendor_id`) ON DELETE CASCADE ON UPDATE CASCADE,\nCONSTRAINT `FK_udropship_vendor_product_entity` FOREIGN KEY (`product_id`) REFERENCES `{$this->getTable('catalog_product_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `{$this->getTable('udropship_vendor_shipping')}` (\n`vendor_shipping_id` int(11) unsigned NOT NULL auto_increment,\n`vendor_id` int(11) unsigned NOT NULL,\n`shipping_id` int(10) unsigned NOT NULL,\n`account_id` varchar(50) default NULL,\n`price_type` tinyint(4) default NULL,\n`price` decimal(12,4) default NULL,\n`priority` smallint(5) unsigned NOT NULL,\n`handling_fee` decimal(12,4) NOT NULL,\nPRIMARY KEY (`vendor_shipping_id`),\nKEY `FK_udropship_vendor_shipping_vendor` (`vendor_id`),\nKEY `FK_udropship_vendor_shipping` (`shipping_id`),\nCONSTRAINT `FK_udropship_vendor_shipping` FOREIGN KEY (`shipping_id`) REFERENCES `{$this->getTable('udropship_shipping')}` (`shipping_id`) ON DELETE CASCADE ON UPDATE CASCADE,\nCONSTRAINT `FK_udropship_vendor_shipping_vendor` FOREIGN KEY (`vendor_id`) REFERENCES `{$this->getTable('udropship_vendor')}` (`vendor_id`) ON DELETE CASCADE ON UPDATE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\ncreate table {$this->getTable('udropship_label_batch')} (\nbatch_id int unsigned not null auto_increment primary key,\ntitle varchar(255) not null,\nlabel_type varchar(10) not null default 'PDF',\ncreated_at datetime not null,\nvendor_id int unsigned not null,\nusername varchar(50) not null,\nshipment_cnt mediumint unsigned not null,\nkey(vendor_id),\nkey(created_at)\n) engine=innodb default charset=utf8;\n\ncreate table {$this->getTable('udropship_label_shipment')} (\nbatch_id int unsigned not null,\norder_id int unsigned not null,\nshipment_id int unsigned not null,\nunique(batch_id, order_id, shipment_id),\nkey(order_id),\nkey(shipment_id)\n) engine=innodb default charset=utf8;\n"); $eav = new Mage_Eav_Model_Entity_Setup('sales_setup'); $eav->addAttribute('catalog_product', 'udropship_vendor', array('type' => 'int', 'input' => 'select', 'label' => 'Dropship Vendor', 'global' => 2, 'user_defined' => 1, 'required' => 1, 'visible' => 1, 'backend' => 'Unirgy_Dropship_Model_Mysql4_Vendor_Backend', 'source' => 'Unirgy_Dropship_Model_Vendor_Source')); if (version_compare(Mage::getVersion(), '1.3.0', '>=')) { $eav->updateAttribute('catalog_product', 'udropship_vendor', 'used_in_product_listing', 1); } $this->_conn->addColumn($this->getTable('sales_flat_quote_item'), 'udropship_vendor', 'int unsigned'); $eav->addAttribute('quote_item', 'udropship_vendor', array('type' => 'static')); $this->_conn->addColumn($this->getTable('sales_flat_order_item'), 'udropship_vendor', 'int unsigned'); $eav->addAttribute('order_item', 'udropship_vendor', array('type' => 'static')); $eav->addAttribute('shipment', 'udropship_vendor', array('type' => 'int')); $eav->addAttribute('shipment', 'udropship_status', array('type' => 'int')); $eav->addAttribute('shipment_track', 'batch_id', array('type' => 'int')); $eav->addAttribute('shipment_track', 'label_image', array('type' => 'text')); $eav->addAttribute('shipment_track', 'label_format', array('type' => 'varchar')); $eav->addAttribute('shipment_track', 'label_pic', array('type' => 'varchar')); $eav->addAttribute('shipment_track', 'final_price', array('type' => 'decimal')); $this->endSetup();
function updateSourceModel(Mage_Eav_Model_Entity_Setup $setup, $entityTypeId, $code, $key, $value) { $id = $setup->getAttribute($entityTypeId, $code, 'attribute_id'); $setup->updateAttribute($entityTypeId, $id, $key, $value); }
<?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->addAttribute('catalog_product', 'cjm_stocktext', array('group' => 'Custom Stock Status', 'input' => 'text', 'type' => 'varchar', 'label' => 'Custom Stock Message', 'backend' => '', 'frontend' => '', 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'note' => 'Enter custom availability text here if wanted.')); $setup->addAttribute('catalog_product', 'cjm_stockmessage', array('group' => 'Custom Stock Status', 'input' => 'select', 'type' => 'text', 'label' => 'Stock Message', 'backend' => '', 'frontend' => '', 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE)); $setup->addAttribute('catalog_product', 'cjm_ships_in', array('group' => 'Custom Stock Status', 'input' => 'text', 'type' => 'varchar', 'label' => 'Order Processing Time', 'frontend_class' => 'validate-digits', 'backend' => '', 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'note' => 'Days to process order. Leave blank for default. To show in stock status, use variable <b>%days%</b>.')); $setup->addAttribute('catalog_product', 'cjm_expecdate', array('group' => 'Custom Stock Status', 'input' => 'date', 'type' => 'datetime', 'label' => 'Expected In-Stock Date', 'frontend_class' => '', 'backend' => 'eav/entity_attribute_backend_datetime', 'frontend' => 'eav/entity_attribute_frontend_datetime', 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'note' => 'Date the product is expected to be back in-stock. To show in stock status, use variable <b>%expec%</b>.')); $setup->addAttribute('catalog_product', 'cjm_preorderdate', array('group' => 'Custom Stock Status', 'input' => 'date', 'type' => 'datetime', 'label' => 'On Pre-Order Until', 'frontend_class' => '', 'backend' => 'eav/entity_attribute_backend_datetime', 'frontend' => 'eav/entity_attribute_frontend_datetime', 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'note' => 'Date the product will no longer show as a pre-order. To show in pre-order text, use variable <b>%pod%</b>.')); $setup->addAttribute('catalog_product', 'cjm_preordertext', array('group' => 'Custom Stock Status', 'input' => 'text', 'type' => 'varchar', 'label' => 'Pre-Order Text', 'backend' => '', 'frontend' => '', 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'note' => 'Enter pre-order text here if wanted, otherwise pre-order date will be shown.')); $setup->addAttribute('catalog_product', 'cjm_hideshipdate', array('group' => 'Custom Stock Status', 'input' => 'select', 'type' => 'int', 'label' => 'Hide Ship Date?', 'source' => 'eav/entity_attribute_source_boolean', 'frontend_class' => '', 'backend' => '', 'frontend' => '', 'default_value' => 0, 'visible' => true, 'required' => false, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => true, 'visible_in_advanced_search' => false, 'is_html_allowed_on_front' => false, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, 'note' => 'Do you want to hide the ship date info for this product?')); $installer->endSetup(); $setup->updateAttribute('catalog_product', 'cjm_stockmessage', 'note', 'Select a stock message here if wanted. If custom availability text is entered above, it will override this message. Add more messages by going to <b>Catalog->Attributes->Manage Attributes</b> and clicking on the \'cjm_stockmessage\' attribute.'); $setup->updateAttribute('catalog_product', 'cjm_stocktext', 'used_in_product_listing', 1); $setup->updateAttribute('catalog_product', 'cjm_preordertext', 'used_in_product_listing', 1); $setup->updateAttribute('catalog_product', 'cjm_preorderdate', 'used_in_product_listing', 1); $setup->updateAttribute('catalog_product', 'cjm_expecdate', 'used_in_product_listing', 1); $setup->updateAttribute('catalog_product', 'cjm_stockmessage', 'used_in_product_listing', 1);
* This file is part of the Itabs_Debit module. * * PHP version 5 * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * @category Itabs * @package Itabs_Debit * @author ITABS GmbH <*****@*****.**> * @copyright 2008-2014 ITABS GmbH (http://www.itabs.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @version 1.1.6 * @link http://www.magentocommerce.com/magento-connect/debitpayment.html */ /** * Setup script */ /* @var $installer Mage_Core_Model_Resource_Setup */ $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $setup->updateAttribute('customer', 'debit_payment_acount_update', 'frontend_input', 'date'); $installer->endSetup();
} catch (Exception $E) { } $setup->addAttribute('catalog_product', 'autoselect_enddate', array('backend' => '', 'source' => 'eav/entity_attribute_source_boolean', 'group' => 'Payperrentals', 'label' => 'Autoselect End Date', 'input' => 'select', 'type' => 'int', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, 'visible' => true, 'default' => '0', 'required' => false, 'user_defined' => false, 'apply_to' => 'reservation', 'visible_on_front' => false, 'position' => 10)); $entityTypeId = $installer->getEntityTypeId('catalog_product'); /*$idAttributeOldSelect = $this->getAttribute($entityTypeId, 'myold_attribute', 'attribute_id'); $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, array( 'input' => 'multiselect' ));*/ $fieldList = array('is_reservation', 'tax_class_id', 'payperrentals_quantity', 'payperrentals_min_number', 'payperrentals_min_type', 'payperrentals_max_number', 'payperrentals_max_type', 'payperrentals_avail_number', 'payperrentals_avail_type', 'payperrentals_avail_numberb', 'payperrentals_avail_typeb', 'payperrentals_deposit', 'payperrentals_has_shipping', 'payperrentals_has_multiply', 'payperrentals_pricingtype', 'payperrentals_use_serials', 'payperrentals_use_send_return', 'payperrentals_use_times', 'res_excluded_dates', 'res_prices', 'payperrentals_padding_days', 'res_serialnumbers', 'disabled_with_message', 'res_excluded_daysweek', 'allow_overbooking', 'global_min_period', 'global_max_period', 'global_turnover_after', 'global_turnover_before', 'global_excludedays', 'bundle_pricingtype'); $applyTo = array(); foreach ($fieldList as $field) { $applyTo = explode(',', $installer->getAttribute('catalog_product', $field, 'apply_to')); if (!in_array('bundle', $applyTo)) { $applyTo[] = 'bundle'; } $installer->updateAttribute('catalog_product', $field, 'apply_to', implode(',', $applyTo)); } $fieldList = array('is_reservation', 'tax_class_id', 'payperrentals_quantity', 'payperrentals_min_number', 'payperrentals_min_type', 'payperrentals_max_number', 'payperrentals_max_type', 'payperrentals_avail_number', 'payperrentals_avail_type', 'payperrentals_avail_numberb', 'payperrentals_avail_typeb', 'payperrentals_deposit', 'payperrentals_has_shipping', 'payperrentals_has_multiply', 'payperrentals_pricingtype', 'payperrentals_use_serials', 'payperrentals_use_send_return', 'payperrentals_use_times', 'res_excluded_dates', 'res_prices', 'payperrentals_padding_days', 'res_serialnumbers', 'disabled_with_message', 'res_excluded_daysweek', 'allow_overbooking', 'global_min_period', 'global_max_period', 'global_turnover_after', 'global_turnover_before', 'global_excludedays', 'autoselect_enddate'); $applyTo = array(); foreach ($fieldList as $field) { $applyTo = explode(',', $installer->getAttribute('catalog_product', $field, 'apply_to')); if (!in_array('grouped', $applyTo)) { $applyTo[] = 'grouped'; //$installer->updateAttribute('catalog_product', $field, 'apply_to', join(',', $applyTo)); } if (!in_array('configurable', $applyTo)) { $applyTo[] = 'configurable'; //$installer->updateAttribute('catalog_product', $field, 'apply_to', join(',', $applyTo)); } if (!in_array('reservation', $applyTo)) { $applyTo[] = 'reservation';