【发布时间】:2021-08-10 15:08:45
【问题描述】:
我想在 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;
}
}
它只为送货地址而不是账单添加任何人可以告诉我如何在付款方式下添加我的账单地址部分
【问题讨论】:
-
你找到解决办法了吗?
-
@RonakChauhan 是的,我会在这里回答
标签: magento2 checkout addressbook billing street-address