我创建了三个自定义订单属性 sales_person_name、sales_type、refer
我正在尝试在不同的模块中访问它们。
谁能告诉我如何在不同的模块中访问这些订单属性
我必须打电话给一些模特吗
我试过了
$order = Mage::getModel('sales/order')->load($order);
我得到了低于输出但无法在其中获取数据。
Mage_Sales_Model_Order Object
(
[_eventPrefix:protected] => sales_order
[_eventObject:protected] => order
[_addresses:protected] =>
[_items:protected] =>
[_payments:protected] =>
[_statusHistory:protected] =>
[_invoices:protected] =>
[_tracks:protected] =>
[_shipments:protected] =>
[_creditmemos:protected] =>
[_relatedObjects:protected] => Array
(
)
[_orderCurrency:protected] =>
[_baseCurrency:protected] =>
[_actionFlag:protected] => Array
(
)
[_canSendNewEmailFlag:protected] => 1
[_historyEntityName:protected] => order
[_resourceName:protected] => sales/order
[_resource:protected] =>
[_resourceCollectionName:protected] => sales/order_collection
[_cacheTag:protected] =>
[_dataSaveAllowed:protected] => 1
[_isObjectNew:protected] =>
[_data:protected] => Array
(
)
[_hasDataChanges:protected] =>
[_origData:protected] => Array
(
)
[_idFieldName:protected] =>
[_isDeleted:protected] =>
[_oldFieldsMap:protected] => Array
(
[payment_authorization_expiration] => payment_auth_expiration
[forced_do_shipment_with_invoice] => forced_shipment_with_invoice
[base_shipping_hidden_tax_amount] => base_shipping_hidden_tax_amnt
)
[_syncFieldsMap:protected] => Array
(
[payment_authorization_expiration] => payment_auth_expiration
[forced_do_shipment_with_invoice] => forced_shipment_with_invoice
[base_shipping_hidden_tax_amount] => base_shipping_hidden_tax_amnt
[payment_auth_expiration] => payment_authorization_expiration
[forced_shipment_with_invoice] => forced_do_shipment_with_invoice
[base_shipping_hidden_tax_amnt] => base_shipping_hidden_tax_amount
)
)
我创建的订单属性如下
<?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute("order", "sales_person_name", array("type"=>"varchar"));
$installer->addAttribute("order", "sales_type", array("type"=>"varchar"));
$installer->addAttribute("order", "referral", array("type"=>"varchar"));
$installer->addAttribute("quote", "sales_person_name", array("type"=>"varchar"));
$installer->addAttribute("quote", "sales_type", array("type"=>"varchar"));
$installer->addAttribute("quote", "referral", array("type"=>"varchar"));
$installer->endSetup();
我正在尝试访问以下文件中的订单属性
C:\xampp\htdocs\practice1\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php