Magento2 如何在magento 2结帐时添加通知,用于计费和发货的街道地址字段

Magento2 如何在magento 2结帐时添加通知,用于计费和发货的街道地址字段,magento2,checkout,addressbook,billing,street-address,Magento2,Checkout,Addressbook,Billing,Street Address,我想在magento 2结账页面的“街道地址”字段中添加通知。我试着添加它:使用布局过程 <?php namespace Pawan\Notice\Model\Checkout; class LayoutProcessorPlugin { /** * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject * @param array $jsLayout * @return a

我想在magento 2结账页面的“街道地址”字段中添加通知。我试着添加它:使用布局过程

<?php
namespace Pawan\Notice\Model\Checkout;

class LayoutProcessorPlugin
{
    /**
     * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject
     * @param array $jsLayout
     * @return array
     */

    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array  $jsLayout
    ) {
       $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
            ['shippingAddress']['children']['shipping-address-fieldset']['children']['street']['children'][1]
            ['notice'] = __('This is my custom notice.');
       $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
            ['billingAddress']['children']['billing-address-fieldset']['children']['street']['children'][1]
            ['notice'] = __('This is my custom notice.');
        
       
        return $jsLayout;
    }
}