Posted on December 3, 2019, 4:48 pm, by admin, under
Magento 1.x.
<pre lang="sql"> — Firstname — SELECT * FROM customer_entity_varchar c2 INNER JOIN customer_entity c1 ON c1.entity_id = c2.entity_id AND c2.entity_type_id = 1 AND c2.attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code=’firstname’ AND entity_type_id=1) INNER JOIN mytable m1 ON m1.magento_id = c2.entity_id AND firstname=’First name’ AND lastname=’Last name’ AND migrated=1 AND c2.VALUE=’First Name’; […]
Posted on December 3, 2019, 4:44 pm, by admin, under
Magento 1.x.
— start default_billing — /** CREATE DEFAULT BILLING INSERTS CHUNK */ CREATE TEMPORARY TABLE my_default_billing_customer_entity_int SELECT 1 AS entity_type_id, (SELECT attribute_id FROM eav_attribute WHERE attribute_code=’default_billing’ AND entity_type_id=1) AS attribute_id, my.magento_id AS entity_id, a1.entity_id AS VALUE FROM mytable my INNER JOIN customer_entity c1 ON my.magento_id = c1.entity_id INNER JOIN customer_address_entity a1 ON c1.entity_id = […]
Posted on December 3, 2019, 2:56 pm, by admin, under
Magento 1.x.
/* STEP 1 :: UPDATE ONLY ADDRESSES WHICH HAVE TURKEY AS A COUNTRY IN MAGENTO DB */ UPDATE mytable my INNER JOIN customer_address_entity c1 ON my.magento_id = c1.parent_id INNER JOIN customer_address_entity_varchar c3 ON c1.entity_id = c3.entity_id AND c3.entity_type_id = 2 AND c3.attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code=’country_id’ AND entity_type_id=2) INNER JOIN customer_address_entity_int […]