Created
August 4, 2017 11:59
-
-
Save vikramacharya/8785daafa052446a037f7a0c76a00039 to your computer and use it in GitHub Desktop.
Bulk update customer group in Magento ver1
This file contains hidden or 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
| <?php | |
| $customerGroupId = SOME_CUSTOMER_GROUP_ID; | |
| $table = Mage::getModel('customer/customer')->getResource() | |
| ->getWriteConnection() | |
| ->getTable('customer/entity'); | |
| $query = "UPDATE {$table} SET group_id = {$customerGroupId} WHERE group_id != {$customerGroupId}"; | |
| $conn->query($query); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment