当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Eav_Model_Entity_Setup::updateAttribute方法代码示例

本文整理汇总了PHP中Mage_Eav_Model_Entity_Setup::updateAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Eav_Model_Entity_Setup::updateAttribute方法的具体用法?PHP Mage_Eav_Model_Entity_Setup::updateAttribute怎么用?PHP Mage_Eav_Model_Entity_Setup::updateAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Eav_Model_Entity_Setup的用法示例。


在下文中一共展示了Mage_Eav_Model_Entity_Setup::updateAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?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 
开发者ID:vberzsin,项目名称:shop,代码行数:31,代码来源:mygassi-install.php

示例2:

<?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();
开发者ID:rcclaudrey,项目名称:dev,代码行数:11,代码来源:mysql4-upgrade-3.6.0-3.6.1.php

示例3: array

<?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();
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:19,代码来源:mysql4-upgrade-0.4.0-0.5.0.php

示例4: array

<?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();
开发者ID:Fishead-Communications,项目名称:dutycalculator_charge_import_duty,代码行数:12,代码来源:mysql4-upgrade-0.2.0-0.2.1.php

示例5: array

 * 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 <developers@contus.in>
 * @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();
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:31,代码来源:mysql4-upgrade-1.4.0-1.5.0.php

示例6: array

<?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();
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:8,代码来源:mysql4-install-2.0.0.php

示例7: int

<?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();
开发者ID:rcclaudrey,项目名称:dev,代码行数:9,代码来源:mysql4-install-4.0.1.php

示例8:

<?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();
开发者ID:AnyMarket,项目名称:magento,代码行数:12,代码来源:mysql4-upgrade-1.5.0-1.6.0.php

示例9: decimal

    $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());
    }
}
开发者ID:javik223,项目名称:Evron-Magento,代码行数:31,代码来源:mysql4-upgrade-0.2.2-0.2.3.php

示例10: array

<?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', '>=')) {
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:31,代码来源:mysql4-upgrade-1.2.1.1-1.2.1.2.php

示例11:

<?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);
开发者ID:vberzsin,项目名称:shop,代码行数:16,代码来源:mygassi-remove-require-attributes.php

示例12:

<?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();
开发者ID:AnyMarket,项目名称:magento,代码行数:7,代码来源:mysql4-upgrade-2.11.1-2.11.2.php

示例13: array

<?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');
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:31,代码来源:mysql4-upgrade-0.9.0-1.0.0.php

示例14: updateScoupe

/**
 * 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);
}
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:31,代码来源:mysql4-upgrade-2.1.1-2.1.2.php

示例15: explode

 *
 * @category   O2TI
 * @package    O2TI_Sisfrete
 * @copyright  Copyright (c) 2011 O2TI Soluções Web Ltda. (http://www.o2ti.com)
 * @author     O2TI Soluções Web Ltda. <contato@o2ti.com>
 * @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();
开发者ID:Aerotexextintores,项目名称:novosite,代码行数:31,代码来源:mysql4-upgrade-4.1.0-4.2.0.php


注:本文中的Mage_Eav_Model_Entity_Setup::updateAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。