0

3 つのカスタム注文属性 sales_person_name、sales_type、referral を作成しました

別のモジュールでそれらにアクセスしようとしています。

別のモジュールでこれらの注文属性にアクセスする方法を教えてもらえますか

モデルを呼び出す必要がありますか

私は試した

$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

4

0 に答える 0