Magento2 Magento 2如何使用beforeSaveAddressInformation插件

Magento2 Magento 2如何使用beforeSaveAddressInformation插件,magento2,checkout,shipping,Magento2,Checkout,Shipping,我在看这个网址- 我也试过同样的方法,但我不确定这部分是怎么来的 $customField = $shippingAddressExtensionAttributes->getFiscalCode(); $shippingAddress->setFiscalCode($customField); 此getFiscalCode在哪里?它是一个自定义属性代码。getFiscalCode()方法是一个访问器方法,用于标识字段,例如使用示例中提到的扩展属性fiscal\u code创建的字

我在看这个网址-

我也试过同样的方法,但我不确定这部分是怎么来的

$customField = $shippingAddressExtensionAttributes->getFiscalCode();
$shippingAddress->setFiscalCode($customField);
此getFiscalCode在哪里?它是一个自定义属性代码。
getFiscalCode()
方法是一个访问器方法,用于标识字段,例如使用示例中提到的扩展属性
fiscal\u code
创建的字段

它不仅是扩展属性,而且magento中的所有集合模型都使用以下驼峰式大小写结构,例如数据库表中的列
实体id
,可以通过
$modelCollection->getEntityId()
$modelCollection->setEntityId($valueOfEntityId)

这是一个很好的阅读理解的想法