Created
February 18, 2018 20:35
-
-
Save ajankuv/87f1983cb69d6016a5f19a580994cf60 to your computer and use it in GitHub Desktop.
Prestashop 1.6 to magento 2 format customer export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select DISTINCT ps_customer.email, 'base' AS _website, ps_customer.firstname, | |
ps_customer.lastname, ps_customer.passwd AS password_hash, ps_customer.company, | |
ps_customer.birthday AS dob, ps_customer.date_add AS created_at, '1' AS group_id, | |
ps_address.address1 AS _address_street, ps_address.postcode AS _address_postcode, IFNULL(NULLIF(ps_address.phone, ''), 5555555555) AS telephone, | |
ps_address.city AS _address_city, IFNULL(NULLIF(ps_address.phone, ''), 5555555555) AS _address_telephone, 'US' AS country_id, | |
'1' AS website_id, ps_customer.firstname AS _address_firstname, ps_customer.lastname AS _address_lastname | |
from ps_customer | |
INNER JOIN ps_address ON ps_customer.id_customer=ps_address.id_customer | |
WHERE ps_customer.active=1 | |
GROUP BY ps_customer.id_customer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment