On this page
Switch it on
- In WordPress, make a REST API key: WooCommerce › Settings › Advanced › REST API › Add key, with Read/Write permission.
- In ExiusCart › Channels › WooCommerce, paste the store address, Consumer key and Consumer secret.
- For bundles & offers: download the plugin from ExiusCart (the product editor links to it), then WordPress › Plugins › Add New › Upload Plugin and activate ExiusCart Bundle & save.
- In ExiusCart, open a product › Bundles & offers, add an offer and keep WooCommerce ticked under “Shows on”.
The plugin has no settings page. Offers are made and changed in ExiusCart only, and show on the store within a few minutes.
What ExiusCart syncs
| What | Direction | Notes |
|---|---|---|
| Products, images, prices, stock | ExiusCart → WooCommerce | Sent when the seller pushes a product (stock is managed by WooCommerce from then on) |
| Orders | WooCommerce → ExiusCart | Imported for fulfilment, invoices and reports; paid orders lower ExiusCart stock |
| Shipping | ExiusCart → WooCommerce | The order is marked Completed and the carrier and tracking number are added as a customer note (WooCommerce has no tracking field of its own) |
| Bundle kits | ExiusCart | Each part’s stock is taken and given back on cancel, on every channel |
The Bundle & save plugin
One PHP file, GPLv2. Version 1.1.0 hooks into these places:
| Hook | What it does |
|---|---|
woocommerce_before_add_to_cart_form | Prints the widget container above the Add to cart form, with the product id, price, currency, locale and cart URLs as data attributes |
wp_enqueue_scripts | Loads offers.js on product pages only, in the footer |
woocommerce_cart_calculate_fees | Asks ExiusCart what the cart saves and adds one negative fee line per offer |
wp_enqueue_scripts | Also loads extras.js on every page, in the footer (cart add-ons, Notify me, thank-you offer) |
woocommerce_widget_shopping_cart_before_buttons | “Complete your order” box in the mini cart, above its buttons |
woocommerce_after_cart_table | “Complete your order” box on the cart page |
woocommerce_single_product_summary | “Notify me when it’s back” on sold-out products (priority 31, under the price and stock) |
woocommerce_thankyou | The After payment offer on the order received page |
Already on 1.0? Download the zip again from ExiusCart and upload it: WordPress replaces the old version and keeps nothing else.
Offer types
| Type | In the cart |
|---|---|
| Quantity breaks (buy 2 save 10%, buy 3 save 15%, buy 4 save 20%) | The best tier reached is taken off. The widget shows a 1 / 2 / 3 / 4 item picker |
| Bundles (this product + others, save a %) | Each whole set in the cart gets the %. A product can have several bundles: the widget shows them as one “Bundle & save” picker and adds every item of the chosen set |
| Buy X get Y | The “get” items are discounted once the “buy” items are in the cart |
| Free gift | Buy X get Y at 100% off |
Variable products work: the widget reads the chosen variation from form.variations_form and asks the shopper to pick options first when none is chosen.
How the cart is priced
WooCommerce has no automatic discounts of its own, only coupons the shopper types. So on every cart calculation the plugin sends the cart lines (product id, quantity, price) to ExiusCart and adds the saving as a discount line, in the cart, the mini-cart and checkout.
| Detail | Behaviour |
|---|---|
| Endpoint | POST /public/channel-offers/quote, rate-limited (120 calls a minute) |
| What is sent | Cart line ids, product ids, quantities and prices. No customer details, no email, no address |
| Caching | The same cart is answered from a 5-minute WordPress transient, so checkout stays fast |
| ExiusCart unreachable | Full price is charged. A wrong discount is never applied |
| Coupons | The shopper’s own coupons keep working next to the offer line |
| Taxes | The fee is added without tax, like a store-wide discount |
Cart add-ons, Notify me, thank-you offer
These are set in ExiusCart, not WordPress: open a product › Bundles & offers › In the cart or After payment (or Growth › Upsells), and keep WooCommerce ticked under “Shows on”.
| Feature | Where it shows | What happens |
|---|---|---|
| Complete your order | Mini cart and cart page | Shows the add-ons for what is in the cart. + Add puts it in the cart over WooCommerce’s own AJAX, the mini cart refreshes, and the cart page redraws its table |
| Notify me when it’s back | Sold-out product pages | The shopper leaves an email. When stock comes back (sent from ExiusCart or changed in WooCommerce and synced), ExiusCart’s Back in stock email goes out once, linking back to the same WooCommerce product page |
| After payment offer | Order received page | Shows one add-on for what was just bought. Add puts it in the cart and goes straight to checkout, so the shopper pays for it with their details already filled |
<!-- Anywhere in a page builder layout: the script is already on every page -->
<div data-exiuscart-cart-upsell data-max-offers="2"></div>
<div data-exiuscart-notify data-product-id="123" data-available="false"
data-title="Back soon" data-button="Email me"></div>JavaScript events
All events fire on document as CustomEvents and bubble. Read the data from event.detail.
| Event | When | detail |
|---|---|---|
exiuscart:offers:ready | The widget has drawn | count |
exiuscart:offer:selected | The shopper picks an option | offer, option |
exiuscart:offer:added | The items are in the cart | offer, items, cart |
exiuscart:offer:error | The add failed (sold out, no option chosen) | offer, error |
exiuscart:upsell:opened | A cart or thank-you add-on is shown | offer_id, placement, products |
exiuscart:upsell:added | The add-on is in the cart | offer_id, placement, product_id, cart |
exiuscart:upsell:error | The add-on could not be added | offer_id, placement, message |
exiuscart:notify:subscribed | A shopper asked to be told when it’s back | product_id |
After adding, the widget also triggers WooCommerce’s own added_to_cart jQuery event with the cart fragments, so side carts and cart counts refresh by themselves, then goes to the cart page.
document.addEventListener('exiuscart:offer:added', function (e) {
// e.detail = { offer, items, cart, added } (cart = the Store API cart after the add)
window.dataLayer && dataLayer.push({ event: 'bundle_added', offer: e.detail.offer });
});
// WooCommerce's own event fires too, so mini-carts refresh as usual
jQuery(document.body).on('added_to_cart', function () { /* open your side cart */ });
// A cart add-on was added from the mini cart or cart page
document.addEventListener('exiuscart:upsell:added', function (e) {
// e.detail = { offer_id, placement, product_id, cart }
});After an AJAX quick view draws a product, call window.ExiusCartOffers.refresh(). After your own side cart redraws, call window.ExiusCartExtras.refresh().
Styling and hooks
The widget inherits your theme’s font and text color. One CSS variable, --ec-accent, colors the selected option, the badges and the Add button. The default is #111827.
/* Every offer box carries data-exiuscart-offer="<id>" */
[data-exiuscart-offers] [data-exiuscart-offer] { font-family: var(--wp--preset--font-family--body); }
/* The options are buttons; the chosen one has aria-pressed="true" */
[data-exiuscart-offers] button[aria-pressed="true"] { box-shadow: 0 0 0 3px rgb(15 118 110 / .15); }
/* --ec-accent drives the selected border, badges and the Add button */
[data-exiuscart-offers] { --ec-accent: #0f766e; }Cart add-ons use the classes .exc-cart-upsell, .exc-cart-upsell__item and .exc-cart-upsell__add; the Notify me box is .exc-notify. The same accent filter colors them.
PHP filter
| Filter | Default | What it does |
|---|---|---|
exiuscart_offers_accent | #111827 | Accent color for the widget |
// functions.php (or a small plugin): match the widget to your brand color
add_filter('exiuscart_offers_accent', function () {
return '#0f766e';
});<div data-exiuscart-offers data-platform="woocommerce" data-store="<home url>" data-product-id="<id>" data-price="<price>" data-currency="<code>"></div>Speed and safety
offers.jsloads on product pages only,extras.json every page; both in the footer, minified and gzipped with an ETag.- The cart box only asks ExiusCart about product ids in the cart. Notify me sends only the email the shopper typed and the page address.
- Products with no offer show nothing and make no further calls.
- The plugin stores no keys. The REST API key lives only in ExiusCart, encrypted, and is never sent to the browser.
- Prices in the quote come from the cart itself, and the saving is worked out on ExiusCart’s server, so a shopper cannot change it.
Uninstall and your data
| What | On uninstall |
|---|---|
| Bundle & save plugin | Deactivate or delete it: the widget, cart saving, cart add-ons, Notify me and the thank-you offer stop at once. It saves no options, so nothing is left in the database |
| Notify me requests | Kept in ExiusCart until the Back in stock email goes out |
| Cached quotes | WordPress transients that expire by themselves within 5 minutes |
| Products sent by ExiusCart | Stay in WooCommerce. Delete them there if you like |
| REST API key | Disconnect in ExiusCart › Channels › WooCommerce, then revoke the key in WooCommerce › Settings › Advanced › REST API |
| Orders in ExiusCart | Kept for the seller’s records and invoices |