0

I want to create a customer from frontend with customer group should be "NOT LOGGED IN". I checked that it and no answer available for this.

Please help me in sort out this.

1
  • have you checked my update answer? Jun 7, 2017 at 11:41

2 Answers 2

0

You need to override Model function Or put it file to local folder:

app/code/core/Mage/Customer/Model/Resource/Group/Collection.php

public function setRealGroupsFilter()
{
    return $this->addFieldToFilter('customer_group_id', array('gt' => 0));
}

Replace To:

public function setRealGroupsFilter()
{
    return $this->addFieldToFilter('customer_group_id', array('gteq' => 0));
}

Select default group: admin > configuration > Costomer configuration > Create new account option > Default Group "NOT LOGGED IN"

Enjoy :)

4
  • I don't want to add any observer. I just want to create a customer from frontend whose customer group should be "NOT LOGGED IN". is it possble ?
    – BornCoder
    Jun 7, 2017 at 11:09
  • Yes possible check my updated answer Jun 7, 2017 at 11:32
  • There is no option to set default group as "NOT LOGGED IN" and i don't want to edit code. Just as a regular user, i want to create a customer on website
    – BornCoder
    Jun 7, 2017 at 11:48
  • Not possible without edit code Jun 7, 2017 at 11:54
-1

Change the group from here from admin area:- System > configuration > Customer configuration > create new account option > Default Group

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.