Skip to content

jthn/magento_copy_customer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Copy Magento Customers

This is a script that copies a customer from one magento store to another. The two stores must have the same products.

Contact dan at edenwired dot com with questions/requests, or contact me through github.

Usage

First, copy config_db.php.tmpl to config.php.

Next, configure the source and target databases in config_db.php.

Then, set the id of the customer you want to transfer in magento_alter.php.

Lastly, just run

php ./magento_alter.php

Caveats

This software is distributed with ABSOLUTELY NO WARRANTY! It may screw up your Magento store - that's your responsibility.

BACKUP!

TEST THIS FIRST WITH A TEST INSTALLATION OF THE TARGET DATABASE

I don't know why the sales_flat_order table has two unique keys, but if you look for these lines:

unset( $row['entity_id'] );
unset( $row['increment_id'] );

you'll see what I'm talking about.

For now, I'm grabbing the max(increment_id) + 1 from the target database's sales_flat_order table and using that. I'm guessing magento has a more sophisticated way to do this.

About

Copy customers from one magento store to another

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%