2
我試圖在Magento刪除自定義屬性從銷售/報價屬性,下面的代碼添加我只需要相當於使用Magento的安裝腳本刪除屬性:刪除自定義在Magento
<?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute("customer", "is_school", array(
"type" => "int",
"backend" => "",
"label" => "is_school?",
"input" => "int",
"source" => "",
"visible" => false,
"required" => false,
"default" => "",
"frontend" => "",
"unique" => false,
"note" => ""
));
$installer->getConnection()->addColumn($installer->getTable('sales/quote'), 'is_school', 'int(11)');
$installer->getConnection()->addColumn($installer->getTable('sales/order'), 'is_school', 'int(11)');
// need code to remove these two column above
$installer->endSetup();
[通過安裝程序腳本刪除Magento中的自定義屬性](http://stackoverflow.com/questions/23775867/removing-a-custom-attribute-in-magento-via-an-installer-script ) – Slimshadddyyy