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


PHP Mage_Eav_Model_Entity_Setup::setConfigData方法代码示例

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


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

示例1: 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


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