Forked from herveguetin/customer_group_massupdate_magento.php
Created
January 13, 2017 06:08
-
-
Save manojchowrasiya/6e8917a0b745e112b3877a99639926f9 to your computer and use it in GitHub Desktop.
Affect all Magento customers to a group
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