Different User Groups

09.01.2026 19:13
#1
thomas_hamburg
Joomshopping forum user no avatar
Name: Thomas
26.05.2024
Posts: 11
Quote
Different User Groups

I've configured Joomla so that registered users are automatically added to the "Author" group. Can I configure Joomshopping customers to automatically be added to a different group, e.g. "Registered" or a custom group?

Thanks Thomas


tomtom
 
10.01.2026 05:39
#2
denben777
Joomshopping forum user no avatar
Name: denben777
20.08.2011
Posts: 54
Quote
Aw: Different User Groups

To do this, you need to create a special plugin. Let's call it "User Group Selector".

INSTRUCTIONS
You'll need to create two regular text files in Notepad, but save them with different extensions. Then, pack them into an archive "plg_jshopping_usergroupselector_1.0.zip" and install it through the Joomla extension manager. Next, select the desired user group or groups, publish the plugin, and enjoy!

File "usergroupselector.xml":
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="plugin" group="jshopping" method="upgrade" version="4.0">
<name>User Group Selector</name>
<author>denben777</author>
<creationDate>January 10, 2026</creationDate>
<authorEmail>denben777@outlook.com</authorEmail>
<license>GPLv3</license>
<version>1.0.0</version>
<description>Allows selecting Joomla user group during JoomShopping customer registration.</description>
<files>
<filename plugin="usergroupselector">usergroupselector.php</filename>
</files>
<config>
<fields name="params">
<fieldset name="basic">
<field name="usergroup" type="usergrouplist" label="Joomla User Group for new customers"
multiple="true" default="2" size="9" />
</fieldset>
</fields>
</config>
</extension>


File "usergroupselector.php":
<?php
/**
* @package Joomla.Plugin
* @subpackage JoomShopping.Usergroupselector
*/
defined('_JEXEC') or die();
use Joomla\CMS\Plugin\CMSPlugin;
class plgJshoppingUsergroupselector extends CMSPlugin
{
public function onJoomlaComponentJshoppingSiteModelUserregisterModelUserJoomlaSaveBeforeBind($object, &$vars)
{
$data = &$vars['data'];
$selectedGroups = (array) $this->params->get('usergroup', [2]);
$data['groups'] = $selectedGroups;

return $vars;
}
}


Screenshot
Aw: Different User Groups

Download
plg_jshopping_usergroupselector_1.1.zip


Last change: 21.02.2026 20:35

Why do programmers prefer dark mode? Because light attracts bugs 🐛 🐞
 
10.01.2026 21:07
#3
thomas_hamburg
Joomshopping forum user no avatar
Name: Thomas
26.05.2024
Posts: 11
Quote
Aw: Different User Groups

I am thrilled! It works!

Thanks a lot for your solution and best regards,
Thomas


tomtom
 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.