You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs-v6/apps-and-extensions/j2commerce_advancedcart.md
+34-4Lines changed: 34 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,21 @@ The plugin works in tandem with the companion **Advanced Cart Toggle** module, w
28
28
29
29
You can install this **Advanced Cart** App using the Joomla installer. The following steps help you with a successful installation.
30
30
31
+
:::info
32
+
33
+
**IMPORTANT**: You will also have to install the **Advanced Cart Toggle** module that came with the package. Once installed, the **Advanced Cart Toggle** will enable itself automatically
34
+
35
+
:::
36
+
31
37
In the Joomla admin, go to **System -> Install -> Extensions**
32
38
33
39
Upload the plugin file or use the Install from URL option.
Once you have installed the App, you will need to enable it. There are **two** ways you can access the extension. 
45
+
Once you have installed the plugin, you will need to enable it. There are **two** ways you can access the extension. 
40
46
41
47
**Option A:** Go to the **J2Commerce** icon at the top right corner **-> Apps**
42
48
@@ -60,7 +66,7 @@ Select **Advanced Cart Toggle** from the module type list.
60
66
61
67

62
68
63
-
Give it a title and assign it to a **module position** in your template (such as a header or navigation position). The most common position is in the upper right corner but every template is different
69
+
Give it a **Title** and assign it to a **module position** in your template (such as a header or navigation position). The most common position is in the upper right corner but every template is different
64
70
65
71

66
72
@@ -222,10 +228,24 @@ Go to **Content** -> **Site Modules**, find the **Advanced Cart Toggle** module
222
228
223
229
**Display Mode:** Whether to show a font icon or a custom image.
224
230
225
-
**Icon Class:** Font Awesome or custom CSS class for the cart icon. Only visible when Display Mode is set to **Icon**.
231
+
**Icon Class:** Font Awesome or custom CSS class for the cart icon. Only visible when Display Mode is set to **Icon**. The **Icon Class** field accepts any CSS class string your site's template already loads. Common choices: Below are the **Icon Library** and the **Example Class**
If your template does not load an icon library automatically, you may need to add one or use **Image** mode instead.
226
244
227
245
**Cart Image:** Image to display when Display Mode is set to **Image**. Selected using the Joomla media picker.
228
246
247
+

248
+
229
249
**Count Type:** Controls what number appears in the badge. **Sum Quantities** adds up the total quantity of all items (e.g., 3 units of one product + 2 of another = 5). **Line Items** counts the number of distinct product lines in the cart. Sum all item quantities, or count the number of distinct line items.
230
250
231
251
**Hide Badge When Empty:** Hides the count badge entirely when the cart is empty instead of showing a zero.
@@ -244,6 +264,10 @@ Go to **Content** -> **Site Modules**, find the **Advanced Cart Toggle** module
244
264
245
265
## How It Works
246
266
267
+
When the page loads, the module queries the current visitor's cart on the server and renders the badge with the live item count. After the page loads, the Advanced Cart Drawer plugin takes over: any time the cart changes (add, remove, quantity update), the plugin dispatches a browser event that updates all elements with the class `j2commerce-cart-badge` — including the badge from this module — instantly, with no page reload.
268
+
269
+
Clicking the button calls `AdvancedCart.open()`, which slides the cart drawer into view.
270
+
247
271
### Drawer Lifecycle
248
272
249
273
**When a page loads:**
@@ -278,6 +302,12 @@ All quantity changes made inside the drawer are debounced by 300ms and sent to t
278
302
279
303
The coupon and voucher fields are collapsed behind toggle links by default. Once a customer clicks "Have a coupon?" or "Have a voucher?", the form expands inline. Applied discounts are shown immediately after the item list and reflected in the totals.
280
304
305
+
## Placing the Button in a Navbar
306
+
307
+
Most templates expose a module position inside the navbar — commonly named `nav-right`, `header-right`, `navbar-search`, or similar. Assign the module to that position with **Show Title** set to **Hide** for a clean icon-only button.
308
+
309
+
If your template does not have a suitable built-in position, you can load the module inline using the `{loadmodule}` content plugin syntax in a Custom HTML module, or ask your template developer to expose an appropriate position.
0 commit comments