Magento: Setting a custom attribute on the sales/order_shipment model
问题 I'm trying to add an EAV attribute called "vendorping" to the sales/order_shipment model. To accomplish this, I created the following file in my module: // app\code\local\Jb\Vendorping\sql\vendorping_setup\mysql4-install-0.1.0.php $this->startSetup(); $sql = 'SELECT entity_type_id FROM `'.$this->getTable('eav_entity_type').'` WHERE entity_type_code = \'shipment\''; $row = Mage::getSingleton('core/resource') ->getConnection('core_read') ->fetchRow($sql); $entityTypeId = $row['entity_type_id'];