Skip to content

Commit 7f0b966

Browse files
docs: update Apps & Extensions, Getting Started (#67)
* docs(payment-methods): add Stripe, Kustom guides and move PayPal to payment-methods/ New pages: - Stripe Payment user guide (embedded/hosted modes, webhooks, saved cards, refunds) - Kustom Payment user guide (KCO/HPP modes, refunds, capture) Moved: - PayPal Payment from payment/ to payment-methods/ (consolidate all payment gateway docs) * docs(developer): add saved payment methods event and update payment profiles New pages: - Saved Payment Methods Event (onJ2CommerceGetSavedPaymentMethods) developer guide Updated pages: - Payment Profiles Table (added unified tab integration section) * docs: remove PayPal from payment/ (moved to payment-methods/) * docs: update Apps & Extensions, Getting Started ## Summary **10 new documentation page(s)** added. ### New Pages - `website/docs-v6/apps-and-extensions/apps/stocknotification.md` - `website/docs-v6/apps-and-extensions/apps/subscriptionexcluderenewalinventory.md` - `website/docs-v6/apps-and-extensions/apps/subscriptionextrafields.md` - `website/docs-v6/apps-and-extensions/apps/subscriptionmultiplequantity.md` - `website/docs-v6/getting-started/getting-started-guide.mdx` - `website/docs-v6/getting-started/installation.mdx` - `website/docs-v6/getting-started/introduction.mdx` - `website/docs-v6/getting-started/onboarding.mdx` - `website/docs-v6/getting-started/technical-requirements.mdx` - `website/docs-v6/getting-started/upgrading.mdx` ## Documentation Areas - Apps and Extensions documentation --- _Auto-generated by J2Commerce documentation sync script._
1 parent b044262 commit 7f0b966

10 files changed

Lines changed: 1716 additions & 0 deletions
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
title: "Inventory Email Notifications"
3+
sidebar_label: "Inventory Email Notifications"
4+
sidebar_position: 30
5+
description: "Automatically notify your store admin by email when products go out of stock or drop below a configured low-stock threshold."
6+
---
7+
8+
# Inventory Email Notifications
9+
10+
The Inventory Email Notifications add-on automatically sends email alerts to your store admin when a product sells out or when its stock drops to a critical level. Instead of discovering inventory problems after orders have already been placed, you get notified in real time so you can restock quickly.
11+
12+
Two separate email types are supported: an out-of-stock alert (sent when quantity reaches zero) and a low-stock alert (sent when quantity drops to or below a per-product notification threshold you configure).
13+
14+
## Prerequisites
15+
16+
- J2Commerce installed and active on your Joomla 6 site
17+
- An admin email address configured in J2Commerce (**J2Commerce** -> **Configuration** -> **Store Profile**)
18+
- Inventory tracking enabled on your products (the **Track Inventory** option must be on)
19+
- Joomla's mail settings configured and working (**System** -> **Global Configuration** -> **Server** -> **Mail Settings**)
20+
21+
## What's New in J2Commerce 6
22+
23+
This version of the plugin is a complete rewrite for the Joomla 6 native extension framework. Key improvements include:
24+
25+
- Built on the Joomla 6 event subscriber system for reliable event delivery
26+
- Optional debug logging writes to a dedicated log file (`app_stocknotification.php`) in your Joomla logs directory — no more guessing why emails aren't arriving
27+
- Multiple admin recipients are supported — separate addresses with commas in the **Admin Email** field
28+
- Unprocessed template tags are automatically removed from emails so recipients never see raw `[PRODUCT_NAME]` text if data is missing
29+
30+
## Installation
31+
32+
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.
33+
34+
1. Purchase and download the `app_stocknotification.zip` package from the J2Commerce website.
35+
2. Go to **System** -> **Install** -> **Extensions**.
36+
3. Upload the `app_stocknotification.zip` package file.
37+
4. The plugin installs and enables automatically.
38+
39+
<!-- SCREENSHOT: System > Install > Extensions showing the upload interface with app_stocknotification.zip selected -->
40+
41+
## Step 1: Enable the Plugin
42+
43+
After installation, verify the plugin is enabled:
44+
45+
1. Go to **System** -> **Manage** -> **Extensions**.
46+
2. Search for **Inventory Email Notifications**.
47+
3. If the status icon is grey (disabled), click it to enable the plugin.
48+
49+
<!-- SCREENSHOT: Extensions manager showing Inventory Email Notifications with a green enabled status -->
50+
51+
## Step 2: Configure the Admin Email Address
52+
53+
The plugin reads your admin email address from the J2Commerce store configuration. If you have not set this yet:
54+
55+
1. Go to **J2Commerce** -> **Configuration**.
56+
2. Find the **Admin Email** field in the **Store Profile** section.
57+
3. Enter the email address where stock alerts should be sent.
58+
4. To notify multiple people, enter addresses separated by commas — for example: `owner@example.com, warehouse@example.com`.
59+
5. Click **Save**.
60+
61+
<!-- SCREENSHOT: J2Commerce Configuration > Store Profile section showing the Admin Email field -->
62+
63+
## Step 3: Configure Per-Product Notification Quantities
64+
65+
The low-stock alert fires when a variant's quantity drops to or below its **Notification Quantity** threshold. You set this threshold at the product level:
66+
67+
1. Go to **J2Commerce** -> **Catalog** -> **Products**.
68+
2. Open a product you want to monitor.
69+
3. Click the **Inventory** tab on the product edit screen.
70+
4. Locate the **Notification Quantity** field on the variant row.
71+
5. Enter the quantity level at which you want to receive a warning — for example, `5` means an alert fires when stock reaches 5 units or fewer.
72+
6. To use a store-wide default instead, tick the **Use Store Configuration** checkbox next to the field.
73+
7. Click **Save**.
74+
75+
<!-- SCREENSHOT: Product edit screen > Inventory tab showing the Notification Quantity field with a value of 5 -->
76+
77+
To set a store-wide default notification threshold, go to **J2Commerce** -> **Configuration** -> **Inventory** and enter a value in **Store Notification Quantity**.
78+
79+
## Step 4: Configure the Email Templates
80+
81+
Open the plugin settings to customise the emails that get sent:
82+
83+
1. Go to **J2Commerce** -> **Apps**.
84+
2. Find **Inventory Email Notifications** and click its name to open settings.
85+
86+
<!-- SCREENSHOT: J2Commerce Apps screen with Inventory Email Notifications visible -->
87+
88+
### Configuration Fields
89+
90+
| Field | Description | Default |
91+
|-------|-------------|---------|
92+
| **No Stock Email Subject** | Subject line for the out-of-stock email. Supports template tags. | `Product [PRODUCT_NAME] - [PRODUCT_SKU] just dropped below the minimum stock quantity levels.` |
93+
| **No Stock Email Body** | Body content for the out-of-stock email. Supports template tags and HTML. | `Hi Store Admin, This e-mail is to remind you that your [PRODUCT_NAME] - SKU [PRODUCT_SKU] is now out of stock.` |
94+
| **Low Stock Email Subject** | Subject line for the low-stock email. Supports template tags. | `Low stock alert: [PRODUCT_NAME] - [PRODUCT_SKU] is running low.` |
95+
| **Low Stock Email Body** | Body content for the low-stock email. Supports template tags and HTML. | Includes product name, SKU, current quantity, and notification threshold. |
96+
| **Debug Mode** | When enabled, writes detailed activity logs to `logs/app_stocknotification.php` in your Joomla logs directory. Disable this in production. | No |
97+
98+
3. Customise the subjects and bodies to match your store's language and tone.
99+
4. Click **Save & Close**.
100+
101+
<!-- SCREENSHOT: Inventory Email Notifications plugin configuration screen showing all fields -->
102+
103+
## Template Tags
104+
105+
Both the subject and body fields support the following tags. These are replaced with real values when each email is sent.
106+
107+
| Tag | What It Inserts | Example Output |
108+
|-----|-----------------|----------------|
109+
| `[PRODUCT_NAME]` | Product name | `Blue Widget` |
110+
| `[PRODUCT_SKU]` | Product SKU | `BW-001-LG` |
111+
| `[PRODUCT_QUANTITY]` | Current stock quantity at the time of the alert | `3` |
112+
| `[NOTIFY_QUANTITY]` | The notification threshold configured for this product | `5` |
113+
| `[STORE_NAME]` | Your store name from J2Commerce Configuration | `My Online Store` |
114+
115+
**Note:** The `[PRODUCT_QUANTITY]` tag shows the quantity remaining after the triggering order was placed. In a no-stock email, this value is typically zero.
116+
117+
## How the Alerts Work
118+
119+
### Out-of-Stock Alert
120+
121+
An out-of-stock email is sent when a product variant's quantity reaches zero or below after an order is completed. This fires regardless of any notification threshold — it triggers automatically when stock is exhausted.
122+
123+
### Low-Stock Alert
124+
125+
A low-stock email is sent when a variant's quantity drops to or below its **Notification Quantity** value. For example, if the threshold is set to 5 and a customer purchases 3 units leaving 4 in stock, the alert fires immediately after that order.
126+
127+
Both alerts are sent to the email address configured in **J2Commerce** -> **Configuration** -> **Admin Email**. If that field is empty, no emails are sent.
128+
129+
## Tips
130+
131+
- Keep **Debug Mode** off in production — it adds log entries for every notification trigger and can create large log files on busy stores.
132+
- If a product has multiple variants (sizes, colours, etc.), each variant triggers its own notifications independently. You will receive separate emails for each variant that goes out of stock.
133+
- Use `[STORE_NAME]` in the subject line to make it easy to identify which store sent the alert when managing multiple J2Commerce installations.
134+
- The low-stock alert fires once per qualifying inventory drop. If a customer buys 10 units and stock falls from 15 to 5 in a single order, only one low-stock email is sent for that event.
135+
136+
## Troubleshooting
137+
138+
### No emails are being received
139+
140+
**Cause:** The admin email field is empty, or Joomla's mail system is not configured.
141+
142+
**Solution:**
143+
144+
1. Go to **J2Commerce** -> **Configuration** and confirm the **Admin Email** field contains a valid address.
145+
2. Go to **System** -> **Global Configuration** -> **Server** -> **Mail Settings** and click **Send Test Mail** to verify Joomla can send email.
146+
3. Enable **Debug Mode** in the plugin settings, trigger a stock change, then check `logs/app_stocknotification.php` in your Joomla logs directory for error messages.
147+
4. Check your spam folder — stock notification emails may be filtered by your mail provider.
148+
149+
### Low-stock emails are not firing even though stock is low
150+
151+
**Cause:** The **Notification Quantity** field on the product variant is empty or set to zero, or inventory tracking is not enabled for that product.
152+
153+
**Solution:**
154+
155+
1. Open the product in **J2Commerce** -> **Catalog** -> **Products** and switch to the **Inventory** tab.
156+
2. Confirm the **Track Inventory** option is enabled for the variant.
157+
3. Confirm the **Notification Quantity** field has a value greater than zero, or tick **Use Store Configuration** and confirm the store-level threshold is set in **J2Commerce** -> **Configuration** -> **Inventory**.
158+
159+
### Emails arrive but contain raw tag text like `[PRODUCT_NAME]`
160+
161+
**Cause:** This should not happen with the current version — unprocessed tags are automatically removed. If you are seeing raw tags, your site may be running an older version of the plugin.
162+
163+
**Solution:** Update to the latest version from the J2Commerce Extensions Store. After updating, go to **J2Commerce** -> **Apps** -> **Inventory Email Notifications** and save the configuration to reinitialise the plugin.
164+
165+
### Debug log file is growing very large
166+
167+
**Cause:** Debug Mode is enabled on a store with frequent orders.
168+
169+
**Solution:** Go to **J2Commerce** -> **Apps** -> **Inventory Email Notifications** and set **Debug Mode** to **No**. Delete or archive the existing log file at `logs/app_stocknotification.php` in your Joomla logs directory.
170+
171+
## Related Topics
172+
173+
- [J2Commerce Configuration](../../configuration/index.md)
174+
- [Simple Product](../../catalog/products/simple-product.md)
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
title: "Subscription - Exclude Renewal Inventory"
3+
sidebar_label: "Exclude Renewal Inventory"
4+
sidebar_position: 56
5+
description: "Stop stock from being deducted on subscription renewal orders. Designed for rental and lease stores where inventory should only be reduced on the initial sale, not on each renewal."
6+
---
7+
8+
# Subscription - Exclude Renewal Inventory
9+
10+
When a customer renews a subscription, J2Commerce normally reduces your product's stock count — the same way it does for any order. For most subscription stores that is exactly what you want. But for rental and lease businesses, it creates a problem: the item was never returned, so there is nothing new to deduct from stock. Renewing a lease is not the same as selling a new unit.
11+
12+
This add-on solves that problem. Once enabled, it automatically skips stock deduction for any subscription renewal order. Initial subscription purchases still reduce stock as normal — only renewals are excluded.
13+
14+
## Prerequisites
15+
16+
- J2Commerce 6 installed and configured
17+
- The **Subscription Products** add-on installed and enabled (see [Subscription Products](subscriptionproduct.md))
18+
- Inventory tracking enabled on at least one product
19+
20+
## Installation
21+
22+
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.
23+
24+
1. Purchase and download the `app_subscriptionexcluderenewalinventory.zip` package from the J2Commerce website.
25+
2. Go to **System** -> **Install** -> **Extensions**.
26+
3. Upload the `app_subscriptionexcluderenewalinventory.zip` package file.
27+
4. The plugin installs automatically. A success message confirms installation.
28+
29+
<!-- SCREENSHOT: Joomla Extensions install page showing successful installation of Subscription - Exclude Renewal Inventory -->
30+
31+
### Enable the Plugin
32+
33+
1. Go to **System** -> **Manage** -> **Plugins**.
34+
2. Search for **Subscription - Exclude Renewal Inventory**.
35+
3. Click the status toggle to enable it, or open the plugin and set **Status** to **Enabled**, then click **Save & Close**.
36+
37+
<!-- SCREENSHOT: Plugin Manager showing Subscription - Exclude Renewal Inventory in the list with status toggle enabled -->
38+
39+
### Open Plugin Configuration
40+
41+
1. Go to **J2Commerce** -> **Apps**.
42+
2. Find **Subscription - Exclude Renewal Inventory** in the list and click its name to open configuration.
43+
44+
<!-- SCREENSHOT: J2Commerce Apps list with Subscription - Exclude Renewal Inventory highlighted -->
45+
46+
---
47+
48+
## Configuration
49+
50+
This plugin has one configuration option.
51+
52+
| Setting | Description | Default | Options |
53+
|---------|-------------|---------|---------|
54+
| **Debug Mode** | Write a log file recording each order item that is excluded from stock reduction. The log is saved to the Joomla log directory as `app_subscriptionexcluderenewalinventory.php`. Disable this in production. | No | Yes / No |
55+
56+
To save your settings, click **Save** or **Save & Close**.
57+
58+
<!-- SCREENSHOT: Plugin configuration screen showing the Debug Mode toggle -->
59+
60+
---
61+
62+
## How It Works
63+
64+
After enabling the plugin, no further action is required. The exclusion is fully automatic.
65+
66+
When a subscription renewal order is processed, J2Commerce fires an event before reducing stock for each order item. This plugin intercepts that event and checks the item type. If the item is a subscription renewal (`subscription_renewal`) or a subscription order item (`subscription`), the plugin instructs J2Commerce to skip the stock reduction for that item entirely.
67+
68+
Initial subscription purchases are not affected — when a customer subscribes for the first time, stock is reduced as usual.
69+
70+
Here is a summary of what happens depending on order type:
71+
72+
| Order Type | Stock Reduced? |
73+
|------------|----------------|
74+
| First-time subscription purchase | Yes — stock is deducted normally |
75+
| Subscription renewal | No — stock deduction is skipped |
76+
| Regular (non-subscription) order | Yes — not affected by this plugin |
77+
78+
---
79+
80+
## Use Cases
81+
82+
This plugin is most useful for stores that sell physical goods on a subscription basis where the customer holds the item for the duration of the subscription.
83+
84+
**Equipment rental** — A customer rents a power tool for 12 months with monthly billing. The tool is already with the customer when each renewal fires, so stock should not decrease every month.
85+
86+
**Lease agreements** — A furniture store leases dining sets with annual renewals. One unit leaves the warehouse at lease start; renewals should not show additional units leaving stock.
87+
88+
**Uniform or workwear services** — A company leases staff uniforms that are collected and replaced periodically. Only the initial dispatch affects inventory.
89+
90+
**Software or access-based subscriptions with physical fulfillment** — Subscriptions that include a physical item shipped once at sign-up, then renewed digitally, should only record one inventory deduction.
91+
92+
If your subscription model works differently — for example, each renewal involves shipping a new physical item — you should leave this plugin disabled, because deducting stock on each renewal is the correct behaviour in that case.
93+
94+
---
95+
96+
## What's New in J2Commerce
97+
98+
### Version 6.0.0
99+
100+
- Initial release for J2Commerce 6.
101+
- Automatically excludes subscription renewal order items from inventory reduction.
102+
- Debug mode added for logging excluded items to the Joomla log directory.
103+
104+
---
105+
106+
## Troubleshooting
107+
108+
### Stock is still being reduced on renewals
109+
110+
**Cause:** The plugin is installed but not enabled, or it was enabled after renewals were already processed.
111+
112+
**Solution:**
113+
114+
1. Go to **System** -> **Manage** -> **Plugins**.
115+
2. Search for **Subscription - Exclude Renewal Inventory** and confirm the status shows as enabled (green toggle).
116+
3. If it was just enabled, future renewals will be excluded. Past renewals that already reduced stock must be adjusted manually if needed.
117+
118+
### I cannot find the plugin in the Apps list
119+
120+
**Cause:** The plugin is not installed, or it is installed but disabled.
121+
122+
**Solution:**
123+
124+
1. Go to **System** -> **Manage** -> **Extensions** and search for `subscriptionexcluderenewalinventory`.
125+
2. If it does not appear, the package was not installed. Follow the [Installation](#installation) steps above.
126+
3. If it appears but shows as disabled, enable it from **System** -> **Manage** -> **Plugins**.
127+
128+
### Debug mode is enabled but no log file appears
129+
130+
**Cause:** The Joomla logs directory may not be writable, or no subscription renewals have been processed since enabling debug mode.
131+
132+
**Solution:**
133+
134+
1. Confirm **Debug Mode** is set to **Yes** and click **Save**.
135+
2. Process a test renewal order.
136+
3. Check the `administrator/logs/` directory for `app_subscriptionexcluderenewalinventory.php`.
137+
4. If the file is missing, verify that the `administrator/logs/` directory is writable by your web server. Contact your hosting provider if you are unsure how to check directory permissions.
138+
139+
### Initial subscription purchases are not reducing stock
140+
141+
**Cause:** This plugin does not affect initial purchases — something else is controlling stock reduction. Check that inventory tracking is enabled on the product and that stock levels are set correctly.
142+
143+
**Solution:**
144+
145+
1. Open the product in **J2Commerce** -> **Catalog** -> **Products**.
146+
2. Go to the **Inventory** tab and confirm **Manage Stock** is enabled and the stock quantity is greater than zero.
147+
3. Disable this plugin temporarily to confirm it is not the cause. If stock still does not reduce with the plugin disabled, the issue is unrelated to this add-on.
148+
149+
---
150+
151+
## Related Topics
152+
153+
- [Subscription Products](subscriptionproduct.md)
154+
- [Subscription - Extra Fields](subscriptionextrafields.md)
155+
- [Subscription - Multiple Quantity](subscriptionmultiplequantity.md)

0 commit comments

Comments
 (0)