Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
title: "Change Password"
sidebar_label: "Change Password"
sidebar_position: 20
description: "Allow logged-in customers to change their Joomla password directly from the J2Commerce My Profile page."
---

# Change Password

The Change Password app adds a dedicated tab to the J2Commerce My Profile page on the frontend. Logged-in customers can update their Joomla account password without leaving the store — no need to visit the Joomla User Profile or reset their password by email.
Expand Down
181 changes: 107 additions & 74 deletions website/docs-v6/apps-and-extensions/apps/usergroup.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
---
title: "Add to User Group"
sidebar_label: "Add to User Group"
sidebar_position: 10
description: "Automatically add customers to Joomla user groups when they purchase products — useful for membership sites, wholesale access, and ACL-controlled content."
---

# Add to User Group

The Add to User Group app plugin automatically adds a customer to one or more Joomla user groups as soon as their order reaches a status you choose. You can set groups at the individual product level, at the Joomla content category level, or both. Category settings always take priority over product settings.

Common uses include granting access to a members-only content area after purchase, upgrading a customer to a wholesale or dealer group, and controlling what ACL-restricted pages a buyer can see based on what they have bought.

## Installation

This plugin is a separate add-on available from the [J2Commerce Extensions Store](https://www.j2commerce.com). It is not included with the core J2Commerce 6 component.

1. Purchase and download the `app_usergroup.zip` package from the J2Commerce website.
2. Go to **System** -> **Install** -> **Extensions**.
3. Upload the `app_usergroup.zip` package file.
4. The plugin installs and enables automatically.
## Requirements

After installation, go to **J2Commerce** -> **Apps** to configure it.
- with PHP 8.3.0 +
- Joomla! 6.x
- J2Commerce 6.x

## Prerequisites

- J2Commerce 6 installed and configured.
- J2Commerce 6 is installed and configured.
- At least one product created.
- The Joomla user groups you want to assign must already exist. Create them under **System** -> **User Groups** before proceeding.
- The Joomla user groups you want to assign must already exist. Create them under **Users ->** **Groups** before proceeding.

![](/img/user-create.webp)

## Purchase and Download

**Step 1:** Go to our [**J2Commerce** website](https://www.j2commerce.com/) **->** **Apps**

**Step 2:** Locate the `app_usergroup.zip` App **->** click **View Details** **->** **Add to cart -> Checkout**. 

**Step 3:** Go to your **My Downloads** under your profile button at the top right corner and search for the app. Click **Available Versions -> View Files -> Download Now**

## Install the App

You can install the App using the Joomla installer. The following steps help you with a successful installation.

In the Joomla admin, go to **System -> Install -> Extensions**

Upload the `app_usergroup.zip` file or use the Install from URL option.

![Install extensions](<../../../assets/app install1 (1) (1).webp>)

## Quick Setup Overview

Expand All @@ -35,65 +43,97 @@ After installation, go to **J2Commerce** -> **Apps** to configure it.
3. Assign user groups to each product, or to a content category.
4. Test by placing an order and confirming the customer lands in the right group.

---
***

## Enable the App

Once you have installed the App, you will need to enable it. There are **three** ways you can access the extension.&#x20;

**Option A:** Go to the **J2Commerce** icon at the top right corner **-> Apps**

**Option B:** Go to **Components** on the left sidebar **-> J2Commerce -> Apps**

**Option C:** Go to **System** **-> Manage -> Plugins**.

![](/img/user-enable1.webp)

Search for **Add to User Group**.

## Step 1: Enable and Configure the Plugin
Look for **Custom Accordions**, click the **X,** and it will turn into a green checkmark. It is now enabled and ready for setup.

1. Go to **System** -> **Manage** -> **Plugins**.
2. Search for **Add to User Group**.
3. Click the plugin name to open its settings.
![](/img/user-enable.webp)

<!-- SCREENSHOT: Plugin Manager search results showing "Add to User Group" plugin with status toggle -->
## Configure the App

### Plugin Settings

| Setting | Description | Default |
|---------|-------------|---------|
| **Order Status** | The order statuses that trigger user group assignment. When an order reaches any of the selected statuses, the customer is added to the configured groups. Select one or more statuses. | Confirmed (status ID 1) |
| **Debug Mode** | When enabled, the plugin writes detailed log entries to a file named `app_usergroup.php` in the Joomla logs directory. Turn this on when troubleshooting; disable it in production. | No |
Click the plugin name to open its settings.

<!-- SCREENSHOT: Plugin settings form showing Order Status multi-select and Debug Mode toggle -->
![](/img/user-config.webp)

**Choosing the right order status:**
Most stores use **Confirmed** or **Processing** as the trigger. Using **Pending** may add customers to groups before payment is verified. Using a completed/shipped status means customers wait longer for access. Choose the status that matches your fulfillment workflow.
**Order Status:** The order statuses that trigger user group assignment. When an order reaches any of the selected statuses, the customer is added to the configured groups. Select one or more statuses.

4. Click **Save** when finished.
**Debug Mode:** When enabled, the plugin writes detailed log entries to a file named `app_usergroup.php` in the Joomla logs directory. Turn this on when troubleshooting; disable it in production.

---
:::tip

## Step 2: Assign User Groups to Products
**Tip**: **Choosing the right order status:** Most stores use **Confirmed** or **Processing** as the trigger. Using **Pending** may add customers to groups before payment is verified. Using a completed/shipped status means customers wait longer for access. Choose the status that matches your fulfillment workflow.

:::

## Assign User Groups to Products

For each product that should trigger a group assignment, open the product and set the groups in the plugin's tab.

1. Go to **J2Commerce** -> **Catalog** -> **Products**.
2. Click the product name to edit it.
3. Scroll down to find the **Add to User Group** tab or panel.
4. In the **User Group List** field, select one or more groups from the dropdown.
There are **three** ways you can access the products.&#x20;

**Option A:** Go to the **J2Commerce** icon at the top right corner **-> Catalog -> Products**

**Option B:** Go to **Components** on the left sidebar **-> J2Commerce -> Products**

**Option C:** Go to **Content -> Categories ->** Find the **category** and then click inside the **published**/article section

![](/img/accordions-products.webp)

- Click on the product name to edit it.

Go to the **J2Commerce** tab **-> Apps** tab

- Scroll down to find the **Add to User Group** app.

![](/img/user-product.webp)

<!-- SCREENSHOT: Product edit form showing the "Add to User Group" panel with the User Group List multi-select dropdown -->
- In the **User Group List** field, select one or more groups from the dropdown.

5. Click **Save** or **Save & Close**.
![](/img/user-product1.webp)

Repeat this for every product that should grant group membership on purchase. Products with no groups selected are simply ignored by this plugin.
:::info

---
**Note**: Repeat this for every product that should grant group membership on purchase. Products with no groups selected are simply ignored by this plugin.

## Step 3: Assign User Groups at the Category Level (Optional)
:::

## Assign User Groups at the Category Level (Optional)

If you have a whole category of products that should all grant the same group, you can set the groups once on the category instead of repeating the setting on each product. When category groups are present, they take over completely — the product-level setting is ignored for that item.

1. Go to **Content** -> **Categories**.
2. Click the category that contains your products.
3. Find the **Add To User Groups** tab in the category editor.
4. In the **User Group List** field, select one or more groups.
Go to **Content -> Categories**

![](/img/user-categories.webp)

Click the category that contains your products.

Find the **Add To User Groups** tab in the category editor.

In the **User Group List** field, select one or more groups.

<!-- SCREENSHOT: Joomla category editor showing the "Add To User Groups" tab with the group selector -->
![](/img/user-categories1.webp)

5. Click **Save & Close**.
:::info

**Priority rule:** If a product belongs to a category that has groups configured, those category groups are used and any product-level groups are ignored. If the category has no groups set, the product-level groups are used as the fallback.

---
:::

## How It Works

Expand All @@ -108,62 +148,55 @@ When an order's status changes to one of the statuses you configured:

The plugin handles duplicate group assignments gracefully — if the customer is already in a group, nothing breaks.

Guest customers (users who checked out without a Joomla account) are skipped because there is no Joomla user ID to assign a group to.
:::info

---
**Note:** Guest customers (users who checked out without a Joomla account) are skipped because there is no Joomla user ID to assign to a group.

:::

## Use Case Examples

### Members-Only Digital Access

You sell a digital subscription product. Your Joomla site has a **Members** group that can access restricted articles.
You sell a digital subscription product. Your Joomla site has a **Members-Only** group that can access restricted articles.

- Create the **Members** user group under **System** -> **User Groups**.
- Create the **Members-Only** user group under **Users->** **Groups**.
- Set appropriate **View Level** restrictions on your members-only articles.
- On the subscription product, select **Members** in the **User Group List**.
- On the subscription product, select **Members-Only** in the **User Group List**.
- Set the plugin's **Order Status** to **Confirmed**.

When a customer's order is confirmed, they are immediately added to the **Members** group and can view the restricted content on their next page load.
When a customer's order is confirmed, they are immediately added to the **Members-Only** group and can view the restricted content on their next page load.

### Wholesale Pricing by Category

You have a **Wholesale Products** category. Any customer who buys from it should be upgraded to your **Wholesale** group.

- Create the **Wholesale** group in Joomla.
- Open the **Wholesale Products** category in **Content** -> **Categories**.
- Open the **Wholesale Products** category in **Content -> Categories**.
- Set **Wholesale** in the **Add To User Groups** tab.

All products in that category will now trigger the group assignment on purchase — no need to configure each product individually.

---

## Troubleshooting

### The customer was not added to the group after purchase

**Check 1 — Order status match.** Open the order and note the current status. Go back to the plugin settings and confirm that status is selected in **Order Status**. If the order is **Pending** but you only have **Confirmed** selected, no assignment will happen until the order is confirmed.

**Check 2 — User group is set on the product or category.** Edit the product and check the **Add to User Group** panel. Make sure at least one group is selected. If the product belongs to a category with groups set, the category groups override the product — verify the category setting too.
- **Check 1 — Order status match.** Open the order and note the current status. Go back to the plugin settings and confirm that status is selected in **Order Status**. If the order is **Pending** but you have only **Confirmed** selected, no assignment will happen until the order is confirmed.

**Check 3Guest checkout.** If the customer placed the order as a guest (no Joomla account), the plugin cannot assign a group. The plugin only works for registered users with a valid Joomla user ID.
- **Check 2User group is set on the product or category.** Edit the product and check the **Add to User Group** panel. Make sure at least one group is selected. If the product belongs to a category with groups set, the category groups override the product — verify the category setting too.

**Check 4Enable debug mode.** In the plugin settings, turn on **Debug Mode** and reproduce the issue by manually changing the order status. Then open the file `[joomla-root]/logs/app_usergroup.php` in a text editor and look for log entries related to that order.
- **Check 3Guest checkout.** If the customer placed the order as a guest (no Joomla account), the plugin cannot assign a group. The plugin only works for registered users with a valid Joomla user ID.

---
- **Check 4 — Enable debug mode.** In the plugin settings, turn on **Debug Mode** and reproduce the issue by manually changing the order status. Then open the file `[joomla-root]/logs/app_usergroup.php` in a text editor and look for log entries related to that order.

### Debug Mode shows "Status X not in configured statuses"

The order status ID does not match any of the statuses you selected in the plugin. Open the plugin settings, expand **Order Status**, and add the status ID shown in the log entry.
**Cause:** The order status ID does not match any of the statuses you selected in the plugin.&#x20;

---
**Solution:** Open the plugin settings, expand **Order Status**, and add the status ID shown in the log entry.

### A product in the category is not triggering the category groups

The category-level setting only applies to products sourced from Joomla content articles (the standard J2Commerce product type linked to `com_content`). Confirm the product was created through the standard J2Commerce workflow and is linked to a content article in the correct category.

---

## Related Topics
**Cause:** The category-level setting only applies to products sourced from Joomla content articles (the standard J2Commerce product type linked to `com_content`).&#x20;

- [Order Statuses](../../configuration/setup/orderstatuses.md)
- [Apps Overview](../index.md)
**Solution:** Confirm the product was created through the standard J2Commerce workflow and is linked to a content article in the correct category.
Loading