Page 1 of 1

Get rid of Customer Group selection during Registration

Posted: Sat Sep 10, 2016 10:07 am
by adabob
I converted from 1.0 to 2.0 and am getting used to 2.0.

My question is how to remove "Customer Group selection" because this is not something people registering should know about or be able to change.

I'm using version 2.2.0.0 Opencart

Thank you

Re: Get rid of Customer Group selection during Registration

Posted: Sat Sep 10, 2016 10:21 am
by fido-x
In catalog/view/theme/default/template/account/register.tpl at lines 25 to 44, you will find the following:

Code: Select all

<div class="form-group required" style="display: <?php echo (count($customer_groups) > 1 ? 'block' : 'none'); ?>;">
  <label class="col-sm-2 control-label"><?php echo $entry_customer_group; ?></label>
  <div class="col-sm-10">
    <?php foreach ($customer_groups as $customer_group) { ?>
    <?php if ($customer_group['customer_group_id'] == $customer_group_id) { ?>
    <div class="radio">
      <label>
        <input type="radio" name="customer_group_id" value="<?php echo $customer_group['customer_group_id']; ?>" checked="checked" />
        <?php echo $customer_group['name']; ?></label>
    </div>
    <?php } else { ?>
    <div class="radio">
      <label>
        <input type="radio" name="customer_group_id" value="<?php echo $customer_group['customer_group_id']; ?>" />
        <?php echo $customer_group['name']; ?></label>
    </div>
    <?php } ?>
    <?php } ?>
  </div>
</div>
and replace with:

Code: Select all

<input type="hidden" name="customer_group_id" value="<?php echo $customer_group_id; ?>" />

Re: Get rid of Customer Group selection during Registration

Posted: Sat Sep 10, 2016 12:25 pm
by adabob
Thank you
I did find another way to do this

1. Go to Admin
2. System
3. Settings
4. Edit the store
5. Option
6. Under Account deselect
"Customer Groups" by removing the check marks

This stops them from showing up to customers.

Thanks loving 2.0