1

I've added a custom attribute to checkout:

  1. added column in 'quote' and 'sales_oreder' tables
  2. plugin for Magento\Checkout\Block\Checkout\LayoutProcessor
  3. plugin for Magento\Checkout\Model\ShippingInformationManagement
  4. RequireJS + Magento_Checkout/js/model/shipping-save-processor/default override js file
  5. observer on 'sales_model_service_quote_submit_before' event

All works fine. The field value is stored in the two tables correctly.

Then, I've added the same custom attribute to customer_address entity:

  1. $this->eavSetup->addAttribute( AddressMetadataInterface::ENTITY_TYPE_ADDRESS, self::CUSTOM_ATTRIBUTE_CODE, []) .. etc
  2. plugin for Magento\Sales\Model\Order\CustomerManagement
  3. observer (adminhtml) on 'core_layout_render_element' event

All works fine. The field value is stored linked to 'customer_address_entity' in EAV mode.

Now, what I'm trying to do is to save the field into customer_address entity during Checkout Onepage Success Page, when the customer want to create his/her account.

How can I do this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.