1

I have done migration from M1 to M2 but the customer addresses not showing properly. There are some magento variables appearing instead.

Please check below screenshot: enter image description here

I got stuck with this issue from past few days. Please suggest the best possible solution.

Thanks in advance.

2 Answers 2

0

Here is a workarround

https://github.com/magento/magento2/issues/5873

its about the primary key on eav_attribute_set

0

I face similar problem recently when I migrated from magetno 1.9.1.0 to 2.3.4, probaply I solved the issue.

The problem is in : ATTRIBUTE_SET_ID_ADDRESS . By default it is 2. Change the ATTRIBUTE_SET_ID_ADDRESS id according to the databse. For me it was ATTRIBUTE_SET_ID_ADDRESS =3, Hope it works for you.

Override this file: vendor\magento\module-customer\Api\AddressMetadataInterface.php

app/code/[YourVendor]/[ModuleName]/Api/AddressMetadataInterface.php

namespace [YourVendor]\[ModuleName]\Api;

/**
 * Interface for retrieval information about customer address attributes metadata.
 * @api
 */
interface AddressMetadataInterface extends \Magento\Customer\Api\AddressMetadataInterface
{
    const ATTRIBUTE_SET_ID_ADDRESS = 2;

    const ENTITY_TYPE_ADDRESS = 'customer_address';

    const DATA_INTERFACE_NAME = 'Magento\Customer\Api\Data\AddressInterface';
}

app/code/[vendorname]/[vendorname]Customer/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
      <preference for="Magento\Customer\Api\AddressMetadataInterface" type="[vendorname]\[vendorname]Customer\Api\AddressMetadataInterface" />
</config>

enter image description here

2
  • Changing the core file of Magento is not a standard practice and never recommended. Commented Jul 26, 2020 at 12:37
  • Yes said true. The file should be override. I have edited the answer Commented Jul 26, 2020 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.