我们在结帐页面的发货地址下添加了自定义字段。
这是选择字段,我们正在显示数据库中的自定义选项。它工作正常,但是当我们点击下一步并转到付款选项以在该时间点下订单而不是发布。选定的下拉列值未在控制台中显示。
如果我们添加文本字段,则显示在控制台中发布的值。可能是什么问题?
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['custom-field'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'config' => [
'customScope' => 'shippingAddress.custom_attributes',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/select',
'id' => 'custom-field',
'options' => $optionarray
],
'dataScope' => 'shippingAddress.custom_attributes.custom_field',
'label' => 'Custom Field',
'provider' => 'checkoutProvider',
'visible' => true,
'validation' => [],
'sortOrder' => 250,
'id' => 'custom-field'
];
return $jsLayout;
任何帮助都将不胜感激。