Magento allows you to automatically assign customers to a customer group based on data collected from the registration page using Magento events.
<?xml version="1.0"?> <config> <modules></modules> <global> <models> <Ayasoftware_CustomerGroup> 0.1.0 Ayasoftware_CustomerGroup_Model </Ayasoftware_CustomerGroup> </models> </global> <frontend> <events> <customer_save_before> <observers> <customer_registration_page> <type>singleton</type> <class>Ayasoftware_CustomerGroup/observer</class> <method>setCustomerGroup</method> </customer_registration_page> </observers> </customer_save_before> </events> </frontend> </config>
<?php class Ayasoftware_CustomerGroup_Model_Observer { public $customer_zone; public function setCustomerGroup ($observer) { $customer = $observer->getCustomer(); .... $this->customer_zone = 5; $customer->setData('group_id', $this->customer_zone); .... }