Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Trying to Add a new Attribute to Customer, which affects store view
Jr. Member
Total Posts:  2
Joined:  2008-10-20

I’ve been trying unsuccessfully to add a new customer attribute called “group_code” which I can have a new user enter at registration, and will assign the user to a specific store.

I’ve gotten as far as adding the attribute to the eav_attribute table:

5 1 groupcode NULL NULL varchar text Special Access Code validate-accesscode

I’ve also added the following code to /app/design/frontend/MYTEMPLATE/default/template/customer/form/register.phtml:

<div class="input-box">
label for="coupon_code">Special Access Code (if applicable) </label><br/>
input type="text" name="groupcode" id="groupcode" value="" title="Access Code" class="validate-accesscode required-entry input-text" />

I’m not sure what to do next, or if there is an easier way to assign a user to a store automatically based on the entry of a specific code?

Thanks in advance for any help you might be able to give.

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top