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


PHP Mage_Eav_Model_Entity_Setup::addAttributeToGroup方法代码示例

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


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

示例1: array

<?php

/* @var $installer Mage_Customer_Model_Entity_Setup */
$installer = $this;
$installer->startSetup();
// Attributes
$attributeSetup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $attributeSetup->getEntityTypeId('customer');
$attributeSetId = $attributeSetup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $attributeSetup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "customer_number", array("type" => "varchar", "label" => "Customer Number", "input" => "text", "visible" => true, "required" => false, "default" => "", "frontend" => "", "unique" => false, "note" => ""));
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "customer_number");
$attributeSetup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'customer_number', '400');
$used_in_forms = array();
$used_in_forms[] = "adminhtml_customer";
$attribute->setData("used_in_forms", $used_in_forms)->setData("is_used_for_customer_segment", false)->setData("is_system", 0)->setData("is_user_defined", 1)->setData("is_visible", 0)->setData("sort_order", 400);
$attribute->save();
$installer->endSetup();
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:18,代码来源:install-0.1.0.php

示例2: array

<?php

$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('catalog_product');
$select = $this->_conn->select()->from($this->getTable('eav/attribute_set'))->where('entity_type_id = :entity_type_id');
$sets = $this->_conn->fetchAll($select, array('entity_type_id' => $entityTypeId));
foreach ($sets as $set) {
    $setup->updateAttributeGroup($entityTypeId, $set['attribute_set_id'], 'Payperrentals', 'attribute_group_name', 'Rental Bookings');
    $setup->addAttributeToGroup($entityTypeId, $set['attribute_set_id'], 'Prices', 'payperrentals_pricingtype');
    $setup->addAttributeToGroup($entityTypeId, $set['attribute_set_id'], 'Prices', 'payperrentals_deposit');
    $setup->addAttributeToGroup($entityTypeId, $set['attribute_set_id'], 'Inventory', 'allow_overbooking');
}
$installer->endSetup();
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:15,代码来源:mysql4-upgrade-1.1.7-1.1.8.php

示例3: array

<?php

/**
 * Created by PhpStorm.
 * User: pavel
 * Date: 18.11.2015
 * Time: 16:50
 */
$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "points", array("type" => "decimal", "backend" => "", "label" => "Points for Order", "input" => "text", "source" => "", "visible" => true, "required" => false, "default" => "", "frontend" => "", "unique" => false, "note" => "Points for Order"));
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "points");
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'points', '999');
$used_in_forms = array();
$used_in_forms[] = "adminhtml_customer";
$used_in_forms[] = "checkout_register";
$used_in_forms[] = "customer_account_create";
$used_in_forms[] = "customer_account_edit";
$used_in_forms[] = "adminhtml_checkout";
$attribute->setData("used_in_forms", $used_in_forms)->setData("is_used_for_customer_segment", true)->setData("is_system", 0)->setData("is_user_defined", 1)->setData("is_visible", 1)->setData("sort_order", 100);
$attribute->save();
$installer->endSetup();
开发者ID:juliasagayda,项目名称:magento,代码行数:26,代码来源:install-1.0.0.php

示例4: array

<?php

$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "complete_sf_form", array("type" => "int", "backend" => "", "label" => "Completed SalesForce Form", "input" => "select", "source" => "eav/entity_attribute_source_boolean", "visible" => 1, "required" => 0, "default" => "0", "user_defined" => 1));
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "complete_sf_form");
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'complete_sf_form', '999');
$used_in_forms = array();
$used_in_forms[] = "adminhtml_customer";
$attribute->setData("used_in_forms", $used_in_forms)->setData("is_used_for_customer_segment", true)->setData("is_system", 0)->setData("is_user_defined", 1)->setData("is_visible", 1)->setData("sort_order", 100);
$attribute->save();
$installer->endSetup();
开发者ID:greghoole,项目名称:magento_extensions,代码行数:16,代码来源:install-0.0.1.php

示例5: array

<?php

/**
 * install-0.1.0.php created by a.voytik.
 * Date: 12/03/2012 06:28
 */
/* @var $installer Dutycalculator_Charge_Model_Resource_Setup */
$installer = $this;
$productAttributesSetup = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$productAttributesSetup->addAttribute('catalog_product', 'dc_product_id', array('backend' => '', 'type' => 'int', 'frontend' => '', 'input' => 'text', 'label' => 'DutyCalculator Category', 'frontend_class' => '', 'source' => '', 'required' => false, 'user_defined' => true, 'default' => 0, 'unique' => 0, 'note' => '', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE));
$productAttributesSetup->addAttributeToGroup('catalog_product', 'Default', 'Prices', 'dc_product_id', 100);
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'dc_order_id', 'int(11) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/invoice'), 'dc_order_id', 'int(11) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/quote'), 'dc_order_id', 'int(11) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/shipment'), 'commercial_invoice_url', 'varchar(255) NULL DEFAULT NULL');
$installer->getConnection()->addColumn($this->getTable('sales/shipment'), 'packing_list_url', 'varchar(255) NULL DEFAULT NULL');
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'delivery_duty_type', "varchar(25) NOT NULL DEFAULT '" . Dutycalculator_Charge_Helper_Data::DC_DELIVERY_TYPE_DDU . "'");
$installer->getConnection()->addColumn($this->getTable('sales/quote'), 'delivery_duty_type', "varchar(25) NOT NULL DEFAULT '" . Dutycalculator_Charge_Helper_Data::DC_DELIVERY_TYPE_DDU . "'");
$installer->getConnection()->addColumn($this->getTable('sales/quote_address'), 'delivery_duty_type', "varchar(25) NOT NULL DEFAULT '" . Dutycalculator_Charge_Helper_Data::DC_DELIVERY_TYPE_DDU . "'");
$installer->getConnection()->addColumn($this->getTable('sales/invoice'), 'delivery_duty_type', "varchar(25) NOT NULL DEFAULT '" . Dutycalculator_Charge_Helper_Data::DC_DELIVERY_TYPE_DDU . "'");
$installer->getConnection()->addColumn($this->getTable('sales/creditmemo'), 'delivery_duty_type', "varchar(25) NOT NULL DEFAULT '" . Dutycalculator_Charge_Helper_Data::DC_DELIVERY_TYPE_DDU . "'");
$installer->getConnection()->addColumn($this->getTable('sales/shipment'), 'delivery_duty_type', "varchar(25) NOT NULL DEFAULT '" . Dutycalculator_Charge_Helper_Data::DC_DELIVERY_TYPE_DDU . "'");
$installer->getConnection()->addColumn($this->getTable('sales/quote'), 'import_duty_tax', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/quote'), 'base_import_duty_tax', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/quote_item'), 'import_duty_tax', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/quote_item'), 'base_import_duty_tax', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'import_duty_tax', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'base_import_duty_tax', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'import_duty_tax_invoiced', 'decimal(10, 2) NOT NULL DEFAULT 0');
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'base_import_duty_tax_invoiced', 'decimal(10, 2) NOT NULL DEFAULT 0');
开发者ID:Fishead-Communications,项目名称:dutycalculator_charge_import_duty,代码行数:31,代码来源:mysql4-install-0.1.0.php

示例6: array

<?php

$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "couponsSent", array("type" => "varchar", "backend" => "", "label" => "Coupons Sent", "input" => "text", "source" => "", "visible" => true, "required" => false, "default" => "", "frontend" => "", "unique" => false, "note" => "Coupons Sent"));
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "couponsSent");
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'couponsSent', '999');
开发者ID:karpspace,项目名称:MagentoCode,代码行数:11,代码来源:install-0.1.0.php

示例7: VARCHAR

$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD COLUMN `rewardpoints_status` VARCHAR( 255 ) NULL;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD COLUMN `rewardpoints_state` VARCHAR( 255 ) NULL AFTER `rewardpoints_status`;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD COLUMN `date_order` DATETIME NULL AFTER `rewardpoints_state`;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD COLUMN `date_insertion` DATETIME NULL AFTER `date_order`;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD COLUMN `period` DATE NULL AFTER `date_insertion`;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD COLUMN `object_name` VARCHAR( 255 ) NULL AFTER `period`;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD INDEX `rewardpoints_status` (`rewardpoints_status`);");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD INDEX `rewardpoints_state` (`rewardpoints_state`);");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_account')} ADD INDEX `object_name` (`object_name`);");
if (version_compare(Mage::getVersion(), '1.4.0', '>=')) {
    $installer->run("UPDATE {$this->getTable('rewardpoints_account')} SET   `rewardpoints_status` = (SELECT `status` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id), \n                                                                            `rewardpoints_state` = (SELECT `state` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id),\n                                                                            `date_order` = (SELECT {$this->getTable('sales/order')}.`created_at` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id),\n                                                                            `date_insertion` = (SELECT {$this->getTable('sales/order')}.`created_at` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id),\n                                                                            `period` = (SELECT {$this->getTable('sales/order')}.`created_at` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id);");
} else {
    $table_sales_order = $this->getTable('sales/order') . '_varchar';
    $states = array(Mage_Sales_Model_Order::STATE_NEW, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_COMPLETE, Mage_Sales_Model_Order::STATE_CLOSED, Mage_Sales_Model_Order::STATE_CANCELED, Mage_Sales_Model_Order::STATE_HOLDED);
    $installer->run("UPDATE {$this->getTable('rewardpoints_account')} SET   `rewardpoints_state` = (   SELECT order_state.value \n                                                                                                        FROM {$table_sales_order} as order_state \n                                                                                                        WHERE order_state.entity_id IN ( \n                                                                                                            SELECT orders.entity_id FROM {$this->getTable('sales/order')} as orders \n                                                                                                            WHERE orders.increment_id = {$this->getTable('rewardpoints_account')}.order_id\n                                                                                                        )\n                                                                                                        WHERE order_state.value in ('" . implode("','", $states) . "') ORDER BY value_id DESC\n                                                                                                        LIMIT 1\n                                                                                                     ),\n                                                                            `date_order` = (SELECT {$this->getTable('sales/order')}.`created_at` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id),\n                                                                            `date_insertion` = (SELECT {$this->getTable('sales/order')}.`created_at` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id),\n                                                                            `period` = (SELECT {$this->getTable('sales/order')}.`created_at` FROM {$this->getTable('sales/order')} WHERE {$this->getTable('sales/order')}.increment_id = {$this->getTable('rewardpoints_account')}.order_id);");
}
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_flat_account')} ADD COLUMN `notification_date` DATETIME NULL AFTER `points_lost`;");
$installer->run("ALTER TABLE {$this->getTable('rewardpoints_flat_account')} ADD COLUMN `notification_qty` integer(10) unsigned NOT NULL default '0' AFTER `points_lost`;");
// /end get all invoices and update rewardpoints & rewardpoints_gathered (from rewardpoints_account table)
//Mage_Customer_Model_Entity_Setup
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$setup->addAttribute('customer', 'rewardpoints_referrer', array('label' => 'Reward Points Referrer ID', 'input' => 'text', 'type' => 'int', 'visible' => 1, 'required' => 0, 'user_defined' => 1));
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'rewardpoints_referrer', '999');
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'rewardpoints_referrer');
$oAttribute->setData('used_in_forms', array('adminhtml_customer'));
$oAttribute->save();
//$setup->endSetup();
$installer->endSetup();
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:31,代码来源:mysql4-upgrade-1.6.21-1.7.0.php

示例8: customer

<?php

/* @var $installer Mage_Customer_Model_Entity_Setup */
$installer = $this;
$installer->startSetup();
// Attributes
$attributeSetup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $attributeSetup->getEntityTypeId('customer');
$attributeSetId = $attributeSetup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $attributeSetup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "display_price_type", ["type" => "varchar", "label" => "Display Price Type", "input" => "text", "visible" => true, "required" => false, "default" => "0", "frontend" => "", "unique" => false, "note" => "This value indicates which price type is displayed to the customer (B2B-Store only). (0=both, 1=purchase price, 2=retail price)"]);
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "display_price_type");
$attributeSetup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'display_price_type', '600');
$attribute->setData("used_in_forms", ["adminhtml_customer"])->setData("is_used_for_customer_segment", false)->setData("is_system", 0)->setData("is_user_defined", 1)->setData("is_visible", 0)->setData("sort_order", 600);
$attribute->save();
$installer->endSetup();
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:16,代码来源:upgrade-0.1.2-0.1.3.php

示例9: array

<?php

/**
 * Dc_BrandManager
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * @category   Dc
 * @package    Dc_BrandManager
 * @copyright  Copyright (c) 2012-2015 Damián Culotta. (http://www.damianculotta.com.ar/)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->addAttributeGroup(Mage_Catalog_Model_Category::ENTITY, 'Default', 'Extra Options', 10);
$_attribute_set_id = $setup->getDefaultAttributeSetId(Mage_Catalog_Model_Category::ENTITY);
$_attribute_group_id = $setup->getAttributeGroupId(Mage_Catalog_Model_Category::ENTITY, $_attribute_set_id, 'Extra Options');
$setup->addAttribute('catalog_category', 'brand_icon', array('type' => 'varchar', 'backend' => 'catalog/category_attribute_backend_image', 'frontend' => '', 'label' => 'Brand Icon', 'input' => 'image', 'class' => '', 'source' => '', 'global' => 0, 'visible' => 1, 'required' => 0, 'user_defined' => 1, 'default' => 0, 'searchable' => 0, 'filterable' => 0, 'comparable' => 0, 'visible_on_front' => 1, 'unique' => 0, 'position' => 1));
$setup->addAttributeToGroup(Mage_Catalog_Model_Category::ENTITY, $_attribute_set_id, $_attribute_group_id, 'brand_icon', '10');
$installer->endSetup();
开发者ID:perichus,项目名称:magento-dc-brandmanager,代码行数:25,代码来源:upgrade-0.1.0-0.2.0.php

示例10: array

<?php

$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$setup->addAttribute('customer', 'master_customer', array('input' => 'select', 'type' => 'text', 'label' => 'DEALER', 'source' => 'brandattr/product_attribute_source_unit', 'backend' => '', 'visible' => 1, 'required' => 0, 'user_defined' => 1));
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'master_customer', '999');
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'master_customer');
$oAttribute->setData('used_in_forms', array('adminhtml_customer'));
$oAttribute->save();
$installer->endSetup();
开发者ID:sivaanil,项目名称:paytech,代码行数:14,代码来源:install-1.0.0.php

示例11:

<?php

/* @var $installer Mage_Customer_Model_Entity_Setup */
$installer = $this;
$installer->startSetup();
// Attributes
$attributeSetup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $attributeSetup->getEntityTypeId('customer');
$attributeSetId = $attributeSetup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $attributeSetup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "purchase_price_list", ["type" => "varchar", "label" => "Purchase Price List", "input" => "text", "visible" => true, "required" => false, "default" => "", "frontend" => "", "unique" => false, "note" => ""]);
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "purchase_price_list");
$attributeSetup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'purchase_price_list', '500');
$attribute->setData("used_in_forms", ["adminhtml_customer"])->setData("is_used_for_customer_segment", false)->setData("is_system", 0)->setData("is_user_defined", 1)->setData("is_visible", 0)->setData("sort_order", 500);
$attribute->save();
$installer->endSetup();
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:16,代码来源:upgrade-0.1.0-0.1.1.php

示例12: array

<?php

/* @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$attributeCode = 'complete_profile_sent';
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$setup->addAttribute('customer', $attributeCode, array('label' => 'Complete Profile Mail Sent', 'input' => 'select', 'type' => 'int', 'visible' => 1, 'required' => 0, 'user_defined' => 0, 'sort_order' => 999, 'source' => 'eav/entity_attribute_source_boolean'));
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, $attributeCode, '999');
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', $attributeCode);
$oAttribute->setData('used_in_forms', array('adminhtml_customer', 'adminhtml_checkout'));
$oAttribute->setData('sort_order', 999);
$oAttribute->save();
$setup->endSetup();
开发者ID:hsq,项目名称:Ho_Customer,代码行数:17,代码来源:install-0.1.0.php

示例13: array

<?php

/**
 * Author : Nguyen Trung Hieu
 * Email : hieunt@smartosc.com
 * Date: 8/29/12
 * Time: 1:18 PM
 */
$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$setup->addAttribute('customer', 'fullname', array('input' => 'text', 'type' => 'text', 'label' => 'Full Name', 'visible' => 1, 'required' => 1, 'user_defined' => 1));
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'fullname', '999');
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'fullname');
$oAttribute->setData('used_in_forms', array('adminhtml_customer'));
$oAttribute->save();
$installer->endSetup();
开发者ID:shashankkanungo,项目名称:magento,代码行数:20,代码来源:mysql4-upgrade-1.1.4-1.1.5.php

示例14: array

<?php

$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('catalog_product');
$select = $this->_conn->select()->from($this->getTable('eav/attribute_set'))->where('entity_type_id = :entity_type_id');
$sets = $this->_conn->fetchAll($select, array('entity_type_id' => $entityTypeId));
foreach ($sets as $set) {
    $setup->addAttributeToGroup('catalog_product', $set['attribute_set_id'], 'Prices', 'payperrentals_buyoutprice');
    $setup->addAttributeToGroup('catalog_product', $set['attribute_set_id'], 'Prices', 'payperrentals_enable_extend');
    $setup->addAttributeToGroup('catalog_product', $set['attribute_set_id'], 'Prices', 'payperrentals_enable_buyout');
    $setup->addAttributeToGroup('catalog_product', $set['attribute_set_id'], 'Prices', 'payperrentals_buyout_onproduct');
    $setup->addAttributeToGroup('catalog_product', $set['attribute_set_id'], 'Prices', 'bundle_pricingtype');
}
$installer->endSetup();
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:16,代码来源:mysql4-upgrade-1.1.8-1.1.9.php

示例15: array

<?php

$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$setup->addAttribute('customer', 'crossfitid', array('input' => 'text', 'type' => 'text', 'label' => 'CrossFit ID', 'visible' => 1, 'required' => 0, 'user_defined' => 1));
$setup->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'crossfitid', '999');
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'crossfitid');
$oAttribute->setData('used_in_forms', array('adminhtml_customer'));
$oAttribute->save();
$installer->endSetup();
开发者ID:greghoole,项目名称:magento_extensions,代码行数:14,代码来源:mysql4-install-0.1.0.php


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