Automatically assign registered users to a user group

I read a previous thread dated 2010 asking whether or not it was possible to automatically assign a customer who registers to a user group. This was in regard to V2.



Now that CS3 exists, I'm wondering was that feature added. If so, does anyone know how to do that?



The reason I need this is because I am using Reward Points that only for those who have a registered account.



I am hoping that I don't have to activate each user manually as they register.



We cleared the user database as of 1/1/13 so that we can start fresh. We already had several customers register and purchase products but I see that their reward points were not added to their account. I now have to go in manually and add them.



I am really hoping that I don't have to do this for every customer who registers. I am about to send out a newsletter announcing this new rewards points feature.



Thanks in advance for your assistance.



~ Lake

May or may not help but CS gave me this for v 2.1.4 ages back



John





[color=#555555][font=Arial, Helvetica, sans-serif][size=3]1) Open the “auth.php” file located in the “controllers/common” directory of your CS-Cart installation.[/size][/font][/color]

[color=#555555][font=Arial, Helvetica, sans-serif][size=3]2) Replace the following part of the code:[/size][/font][/color]


if (defined('AJAX_REQUEST') && Registry::get('settings.General.one_page_checkout') == 'Y') {
$redirect_url = "checkout.checkout";
} elseif (!empty($_REQUEST['return_url'])) {
$redirect_url = $_REQUEST['return_url'];
}


[color=#555555][font=Arial, Helvetica, sans-serif][size=3]with this one:[/size][/font][/color]


if (in_array(USERGROUP_ID, $_SESSION['auth']['usergroup_ids'])) {
$redirect_url = "categories.view&category_id=CATEGORY_ID";
} elseif (defined('AJAX_REQUEST') && Registry::get('settings.General.one_page_checkout') == 'Y') {
$redirect_url = "checkout.checkout";
} elseif (!empty($_REQUEST['return_url'])) {
$redirect_url = $_REQUEST['return_url'];
}




[color=#555555][font=Arial, Helvetica, sans-serif][size=3]where [/size][/font][/color]USERGROUP_ID[color=#555555][font=Arial, Helvetica, sans-serif][size=3] is an ID of a created user group and [/size][/font][/color]CATEGORY_ID[color=#555555][font=Arial, Helvetica, sans-serif][size=3] is an ID of a necessary category. In order to get to know a desired user group ID, you should open its editing page (click on the “edit” link of the user group on the “User groups” page of your CS-Cart admin panel) in the new window, the link in your browser address bar will be similar to the following:[/size][/font][/color]

http://www.yourdomai…&usergroup_id=3[color=#555555][font=Arial, Helvetica, sans-serif][size=3], where [/size][/font][/color]3[color=#555555][font=Arial, Helvetica, sans-serif][size=3] is the user group ID. In order to get to know a desired category ID, you should open its editing page (click on its name on the “Categories” page of your CS-Cart admin panel). The link in your browser address bar will be similar to the following: [/size][/font][/color]http://www.yourdomai…&category_id=93[color=#555555][font=Arial, Helvetica, sans-serif][size=3], where [/size][/font][/color]93[color=#555555][font=Arial, Helvetica, sans-serif][size=3] is the ID of the category. It should look as follows (e.g):[/size][/font][/color]


if (in_array(3, $_SESSION['auth']['usergroup_ids'])) {
$redirect_url = "categories.view&category_id=93";
} elseif (defined('AJAX_REQUEST') && Registry::get('settings.General.one_page_checkout') == 'Y') {
$redirect_url = "checkout.checkout";
} elseif (!empty($_REQUEST['return_url'])) {
$redirect_url = $_REQUEST['return_url'];
}




and if you dont want it crawled you can do this



[color=#555555][font=Arial, Helvetica, sans-serif][size=3]Create the “meta.post.tpl” file in the “skins/default_orange/customer/addons/my_changes/hooks/index” directory[/size][/font][/color]


{if ($controller == "categories" && $mode == "view" && $category_data.category_id == CATEGORY_ID) || ($controller == "products" && $mode == "view" && $product.main_category == CATEGORY_ID)}

{/if}


[color=#555555][font=Arial, Helvetica, sans-serif][size=3]where [/size][/font][/color]CATEGORY_ID[color=#555555][font=Arial, Helvetica, sans-serif][size=3] is an ID of the necessary category. It should look as follows (e.g):[/size][/font][/color]



{if ($controller == “categories” && $mode == “view” && $category_data.category_id == 93) || ($controller == “products” && $mode == “view” && $product.main_category == 93)}



{/if}

Thanks John,



Yes, your post from 2010 was the one that I was referring to. :-) I appreciate you reposting the code modification, but I was hoping that there would be a update in v3.



But maybe there is another way… Is it possible that when a customer registers and then click the user group that it is automatically approved instead of saying pending?



That would at least be helpful in eliminating having to manually approve each one.



Thank you!

This should help

http://forum.cs-cart.com/topic/25927-ready-to-switch-but-one-big-thing-auto-user-group-membership/

Thanks! That was helpful, but it looks like that was for V2. Also sounded like tech support would be able to do the fix for free if I had enough credits… but I am still holding out to find out if V3 included this capability.



Thanks so much for your help John.