Migrated 1 store but got customer from multi-store

Hi,
Our old setup was a multi-store and our new setup is a single store. We migrated the 1 store we needed, but customers from both stores carried over. We can see the customers in the data base. Now when we view customers we are locked in a spinning wheel and error message, see screenshot. It is stuck in a search for a customer in the wrong site. You have our credentials, but will email again so they are accessible.
http://prntscr.com/by703q
 
Thanks
Anthony

2 answers

Profile photo of Mall Staff 184060.00 $tone July 28, 2016
Public

Hi amarkus,

We migrated the 1 store we needed, but customers from both stores carried over. We can see the customers in the data base.

You have two options to solve that issues:
Option 1: You can direct delete the not needed customers entity in the table `customer_entity` by the SQL command:

DELETE FROM `customer_entity WHERE `store_id` IN (id1, id2...);

Pls: you have to change the id2, id2… to your store ids which you don’t used.
And make re-index your data after you run the sql successfully.
Option 2:
Let’s open the php file at path: pub/ub-tool/protected/controllers/MigrateController.php
and find to the code lines:

//get all current customer groups

and replace it by code lines:

//get migrated website ids from session if has
$migrated_website_ids = isset(Yii::app()->session['migrated_website_ids']) ? Yii::app()->session['migrated_website_ids'] : array();
$str_migrated_website_ids = implode(',', $migrated_website_ids);
//get migrated store_ids from session
$migrated_store_ids = isset(Yii::app()->session['migrated_store_ids']) ? Yii::app()->session['migrated_store_ids'] : array();
$str_migrated_store_ids = implode(',', $migrated_store_ids);

//get all current customer groups

and find to the code lines:

$customers = Mage1CustomerEntity::model()->findAll("group_id = {$group_id}");

and replace it by code lines:

$condition = "group_id = {$group_id} AND (website_id IN ({$str_migrated_website_ids}) OR website_id IS NULL) AND store_id IN ({$str_migrated_store_ids})";
$customers = Mage1CustomerEntity::model()->findAll($condition);

and reset the step 6 and restart data migration on this step.
and make re-index your data after everything done.
and tell me know how it goes.
Regards,
Mall.
 
 
 

#2

Please login or Register to Submit Answer

Written By

Comments