จากคำถามของคุณฉันอยู่ภายใต้การสันนิษฐานว่าคุณได้ตั้งค่าแอตทริบิวต์ส่วนขยายแล้ว ฉันได้ทำการดัดแปลงที่คล้ายกันและหวังว่าคำตอบของฉันจะช่วยได้
ในโมดูลที่กำหนดเองของคุณสร้างไฟล์ requirejs-config เพื่อขยายตัวประมวลผลการจัดส่ง / ค่าเริ่มต้น
Namespace / CustomModule / view / ส่วนหน้า / requirejs-config.js
var config = {
    "map": {
        "*": {
            'Magento_Checkout / js / model / shipping-save-processor / default': 'Namespace_CustomModule / js / model / shipping-save-processor / default'
        }
    }
};
เพิ่มแอตทริบิวต์ส่วนขยายของคุณไปยังเพย์โหลด
/ * global define, alert * /
กำหนด(
    [
        'jQuery'
        'เกาะ'
        'Magento_Checkout / js / รุ่น / quote'
        'Magento_Checkout / js / รุ่น / ทรัพยากร URL ผู้จัดการ'
        'ผู้วิเศษจัดเก็บ /'
        'Magento_Checkout / js / รุ่น / ชำระเงินบริการ'
        'Magento_Checkout / js / รุ่น / ชำระเงิน / วิธีการแปลง'
        'Magento_Checkout / js / รุ่น / ข้อผิดพลาดของตัวประมวลผล'
        'Magento_Checkout / js / รุ่น / แบบเต็มหน้าจอ-loader'
        'Magento_Checkout / js / การกระทำ / การเลือกการเรียกเก็บเงินที่อยู่'
    ]
    ฟังก์ชั่น (
        $,
        เกาะ
        อ้าง
        resourceUrlManager,
        การจัดเก็บข้อมูล
        paymentService,
        methodConverter,
        errorProcessor,
        fullScreenLoader,
        selectBillingAddressAction
    ) {
        'ใช้อย่างเข้มงวด';
        กลับ {
            saveShippingInformation: function () {
                น้ำหนักบรรทุก var;
                if (! quote.billingAddress ()) {
                    selectBillingAddressAction (quote.shippingAddress ());
                }
                // การเพิ่มแอตทริบิวต์ส่วนขยายไปยังที่อยู่จัดส่งของคุณ
                payload = {
                    ที่อยู่ข้อมูล: {
                        shipping_address: quote.shippingAddress (),
                        billing_address: quote.billingAddress (),
                        shipping_method_code: quote.shippingMethod (). method_code,
                        shipping_carrier_code: quote.shippingMethod (). carrier_code,
                        extension_attributes: {
                            custom_field: $ ('# custom_field'). val (), 
                        }
                    }
                };
                fullScreenLoader.startLoader ();
                การจัดเก็บคืน. เสา (
                    resourceUrlManager.getUrlForSetShippingInformation (อ้าง)
                    JSON.stringify (น้ำหนักบรรทุก)
                ) .done (
                    ฟังก์ชั่น (ตอบสนอง) {
                        quote.setTotals (response.totals);
                        paymentService.setPaymentMethods (methodConverter (response.payment_methods));
                        fullScreenLoader.stopLoader ();
                    }
                ).ล้มเหลว(
                    ฟังก์ชั่น (ตอบสนอง) {
                        errorProcessor.process (การตอบสนอง);
                        fullScreenLoader.stopLoader ();
                    }
                );
            }
        };
    }
);
บันทึกคุณสมบัติในใบเสนอราคาของคุณด้วยปลั๊กอิน (ไม่แน่ใจว่าคุณสามารถใช้ผู้สังเกตการณ์ที่นี่ฉันยังไม่ได้ตรวจสอบ)
di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Model\ShippingInformationManagement">
        <plugin name="Namespace_CustomModule_save_delivery_date_in_quote" type="Namespace\CustomModule\Plugin\Checkout\SaveAddressInformation" />
    </type>
</config>
SaveAddressInformation.php
คลาส SaveAddressInformation
{
    ป้องกัน $ quoteRepository;
    ฟังก์ชั่นสาธารณะ __ โครงสร้าง (
        \ Magento \ Quote \ Model \ QuoteRepository $ quoteRepository
    ) {
        $ this-> quoteRepository = $ quoteRepository;
    }
    / **
     * @param \ Magento \ Checkout \ Model \ Shipping ข้อมูลการจัดการ $ subject
     * @param $ cartId
     * @param \ Magento \ Checkout \ Api \ Data \ Shipping ข้อมูลการป้อนข้อมูล $ addressInformation
     * /
    ฟังก์ชั่นสาธารณะก่อนบันทึก AddressInformation (
        \ Magento \ Checkout \ Model \ Shipping ข้อมูลการจัดการ $ subject
        $ cartid,
        \ Magento \ Checkout \ Api \ Data \ Shipping ข้อมูลการแทรกที่อยู่ $ ข้อมูล
    ) {
        $ extensionAttributes = $ addressInformation-> getExtensionAttributes ();
        $ customField = $ extensionAttributes-> getCustomField ();
        $ quote = $ this-> quoteRepository-> getActive ($ cartId);
        $ quote-> setCustomField ($ customField);
    }
}
บันทึกแอตทริบิวต์ลงในใบสั่งซื้อของคุณด้วย Observer events.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_model_service_quote_submit_before">
        <observer name="unique_observer_name" instance="Namespace\CustomModule\Observer\SaveCustomFieldToOrder"/>
    </event>
</config>
SaveCustomFieldToOrder.php
ระดับ SaveCustomFieldToOrder ใช้ ObserverInterface
{
    / **
     * @var \ Magento \ Framework \ ObjectManagerInterface
     * /
    ป้องกัน $ _objectManager
    / **
     * @param \ Magento \ Framework \ ObjectManagerInterface $ objectmanager
     * /
    ฟังก์ชั่นสาธารณะ __ โครงสร้าง (\ Magento \ Framework \ ObjectManagerInterface $ objectmanager)
    {
        $ this -> _ objectManager = $ objectmanager;
    }
    ฟังก์ชั่นที่สาธารณะดำเนินการ (EventObserver $ observer)
    {
        $ order = $ ผู้สังเกตการณ์ -> getOrder ();
        $ quoteRepository = $ this -> _ objectManager-> create ('Magento \ Quote \ Model \ QuoteRepository');
        / ** @var \ Magento \ Quote \ Model \ Quote $ quote * /
        $ quote = $ quoteRepository-> get ($ order-> getQuoteId ());
        $ order-> setCustomField ($ quote-> getCustomField ());
        ส่งคืน $ this;
    }
}