QUALITY PATCH

ACSD-56635: Imported customers are duplicated with the same email address…

Imported customers are duplicated with the same email address when account sharing is set to Global. Quality patch ACSD-56635 for magento/module-customer-import-export applies to Magento Open Source and Adobe Commerce 2.4.6 to 2.4.6-p15.

Categories
Import/Export, Customer
Components
magento/module-customer-import-export, magento/module-customer-balance, magento/module-customer-finance
Origin
adobe-commerce-support
Since QPT
1.1.48

Issue

Imported customers are duplicated with the same email address when account sharing is set to Global.

Steps to reproduce

1. Under the Adobe Commerce (2.4-develop b2b) Admin, access Stores > Settings > Configuration > Customers > Customer Configuration > Account Sharing Options. 1. Set the Share Customer Accounts setting to Global. 1. Create multiple websites and stores: * ws1 > s11, s12 > sw111, sw122 * ws2 > s21, s22 > sw211, sw212 1. Create a new customer under the main website from admin with email address used as <adb@yormail.com>. 1. Under Admin, navigate to System > Import. 1. Select Customer Entity Type as Customers Main File. 1. Use the same email address as <adb@yormail.com> on a different website, for example, ws1. Refer to the sample CSV file customer.csv given below. 1. Complete the import to see the new user created under the ws1 website with the same email address. customer.csv content: email,_website,_store,confirmation,created_at,created_in,disable_auto_group_change,dob,firstname,gender,group_id,lastname,middlename,password_hash,prefix,rp_token,rp_token_created_at,store_id,suffix,taxvat,updated_at,website_id,password adb@yopmail.com,ws1,sv111,,09/01/24 12:49,Default Store View,0,,newjon,,1,newDoe,,d708be3fe0fe0120840e8b13c8faae97424252c6374227ff59c05814f1aecd79:mgLqkqgTwLPLlCljzvF8hp67fNOOvOZb:1,,07e71459c137f4da15292134ff459cba,30/10/15 12:49,1,,,09/01/24 12:49,1,

Adobe's page lists 2.4.6 - 2.4.6-p3 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.7.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-56635. On Cloud, add ACSD-56635 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-56635/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-customer-import-export
Packages across compatible versions (3): magento/module-customer-import-export, magento/module-customer-balance, magento/module-customer-finance

magento/magento2-base >=2.4.6 <2.4.7

Magento Open Source
2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
Adobe Commerce
2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
Patch file
patches/os/ACSD-56635_2.4.6-p3.patch
  • vendor/magento/module-customer-import-export/Model/Import/AbstractCustomer.php
  • vendor/magento/module-customer-import-export/Model/Import/Address.php
  • vendor/magento/module-customer-import-export/Model/ResourceModel/Import/Customer/Storage.php

magento/magento2-ee-base >=2.4.6 <2.4.7

Magento Open Source
—
Adobe Commerce
2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
Patch file
patches/commerce/ACSD-56635_2.4.6-p3.patch
  • vendor/magento/module-customer-balance/Model/Adminhtml/Balance/History.php
  • vendor/magento/module-customer-balance/etc/webapi_rest/di.xml
  • vendor/magento/module-customer-balance/etc/webapi_soap/di.xml
  • vendor/magento/module-customer-finance/Model/Import/Eav/Customer/Finance.php

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.