AJAX side cart drawer, floating cart button, free shipping bar, trust badges, scarcity messages & more. Zero jQuery. 8 conversion modules.
● Version 1.0.0● WooCommerce 7.0+● WordPress 6.3+● Zero jQuery● GPL-2.0 Free
01 — Overview
What is Cartexa?
Cartexa is a lightweight WooCommerce cart plugin that replaces the default cart redirect with a smooth AJAX side drawer — and bundles 8 independent conversion modules you can toggle on or off without touching a line of code.
Every module loads zero overhead when disabled. The entire frontend weighs under 40 KB minified. No jQuery dependency.
🛒
AJAX Side Cart Drawer
Slide-in cart that opens on add-to-cart or icon click. Qty update and item remove happen in-place — no page reload.
🚀
Floating Cart Button
Persistent FAB in the corner of the page. Shows a live item count badge. Fully configurable icon, position, and offset.
📦
Free Shipping Bar
Progress bar inside the drawer that motivates customers toward your free shipping threshold. Auto-reads WooCommerce free shipping rules.
🔒
Trust Badges
Four built-in badges (Secure Checkout, Easy Returns, Fast Shipping, 24/7 Support) plus two custom badge slots.
⚠️
Scarcity Messages
Pulls real WooCommerce stock counts and shows a configurable low-stock alert per cart line item to drive urgency.
🍞
Toast Notifications
A lightweight add-to-cart confirmation popup with product name and thumbnail. Auto-dismisses after a configurable delay.
↩️
Undo Remove
After removing an item, a temporary undo banner lets shoppers restore it within a configurable timeout window.
🔗
Nav Menu Cart Icon
Shortcode and widget to place a live cart icon anywhere — in menus, headers, or sidebars — with real-time count badge.
✅
All 8 modules are free. Toggle any combination on or off from the admin panel — disabled modules load no assets and add zero database queries.
02 — Requirements
Requirements
Requirement
Minimum
Recommended
WordPress
6.3
7.1+
WooCommerce
7.0
9.0+
PHP
7.4
8.2+
MySQL
5.6
8.0+
Browser
Any modern browser — no IE11 support
⚠️
WooCommerce must be installed and activated before activating Cartexa. The plugin declares Requires Plugins: woocommerce in its header — WordPress will warn you if WooCommerce is missing.
03 — Getting Started
Installation
1
Upload the plugin
Go to WordPress Admin → Plugins → Add New → Upload Plugin. Select the cartexa-smart-cart-for-woocommerce.zip file and click Install Now.
2
Activate
Click Activate Plugin. Cartexa saves its default settings on first activation — no database tables are created.
3
Open the settings page
Navigate to WooCommerce → Cartexa in your admin menu.
WooCommerce → Cartexa
4
Enable the Side Cart & save
On the Side Cart tab, toggle Enable module on and click Save Settings. The drawer is live instantly.
5
Enable optional modules
Visit the Floating Cart, Shipping Bar, Trust Badges, and other tabs to activate the modules you need. Each module is fully independent.
The core module. When enabled, the Side Cart intercepts all add-to-cart events and cart icon clicks, then opens an AJAX-powered slide-in drawer instead of redirecting to /cart.
right or left — which side the drawer slides in from
drawer_trigger
string
both
both · add_to_cart · icon_click
animation_style
string
slide
slide · fade · none
drawer_width
int
420
Drawer width in pixels (280–680)
overlay_close
bool
yes
Close drawer when clicking the backdrop overlay
accent_color
string
#7c3aed
Primary brand color for buttons and progress fill
cart_icon_size
int
22
Cart icon size in pixels (16–40)
06 — Admin UI
Floating Cart Button
A persistent floating action button (FAB) that stays visible as the visitor scrolls. Shows a live item count badge that updates on every cart change — no page reload needed.
💡
The FAB is independent of the Side Cart module. You can enable one, both, or neither. When both are active, clicking the FAB opens the Side Cart drawer.
Key
Type
Default
Description
enable_floating_cart
bool
no
Enable the floating cart button
floating_cart_position
string
bottom-right
bottom-right or bottom-left
floating_cart_icon
string
bag
bag · basket · trolley
floating_cart_label
string
""
Optional text label next to the icon. Leave blank for icon only.
floating_cart_offset_x
int
24
Horizontal edge offset in pixels (8–120)
floating_cart_offset_y
int
24
Vertical bottom offset in pixels (8–120)
07 — Admin UI
Free Shipping Bar
Displays a progress bar at the top of the cart drawer showing how close the visitor is to earning free shipping. The bar reads your WooCommerce free shipping method automatically — no manual threshold required unless you prefer to override it.
Use {amount} in your message templates as a placeholder for the remaining amount, formatted in the store's active currency.
✅
Leave Manual threshold at 0 to auto-detect from your active WooCommerce Free Shipping method. The plugin reads the minimum order amount directly from WooCommerce settings.
Key
Type
Default
Description
enable_shipping_bar
bool
yes
Enable the free shipping progress bar
shipping_threshold
int
0
Manual threshold override. 0 = auto-detect from WooCommerce
shipping_bar_msg_progress
string
Spend {amount} more for free shipping!
Message shown while below the threshold. Use {amount} for remaining amount.
shipping_bar_msg_reached
string
🎉 You've unlocked free shipping!
Message shown when the threshold is met or exceeded
shipping_bar_color
string
#10b981
Fill color of the progress bar (hex)
08 — Admin UI
Trust Badges
Displays a row of trust signals inside the cart drawer. Four pre-built badge types are available as toggles, plus two free-text custom badge slots for your own messaging.
Reads the actual WooCommerce stock quantity for each cart line item and displays a configurable low-stock warning when the count falls at or below your threshold. The warning appears directly below the quantity controls for that item.
ℹ️
Only products with stock management enabled in WooCommerce show scarcity messages. Products set to "In stock" without a quantity are silently skipped.
Key
Type
Default
Description
enable_scarcity
bool
yes
Enable stock scarcity messages
scarcity_threshold
int
5
Show message when stock is at or below this number (1–50)
scarcity_message
string
Only {qty} left in stock!
Message template. Use {qty} for the actual stock count.
scarcity_color
string
#ef4444
Text color of the scarcity message (hex)
10 — Admin UI
Display & Labels
Controls what elements appear in the drawer footer — buttons, subtotal, tax note — and lets you customise the button labels and the empty cart state.
Drawer Footer
Key
Type
Default
Description
show_subtotal
bool
yes
Show cart subtotal above the checkout button
show_tax_note
bool
yes
Show "Taxes & shipping calculated at checkout" note
show_checkout_btn
bool
yes
Show the primary Checkout button
show_view_cart_btn
bool
yes
Show the secondary View Cart button
show_continue_btn
bool
no
Show a "Continue Shopping" link that closes the drawer
show_item_count_badge
bool
yes
Show the item count badge in the drawer header
Button Labels
Key
Type
Default
Description
checkout_btn_text
string
Checkout
Checkout button label. Leave blank for WooCommerce default.
view_cart_btn_text
string
View Cart
View Cart button label. Leave blank for WooCommerce default.
Empty Cart State
Key
Type
Default
Description
empty_cart_message
string
Your cart is empty.
Heading shown when the cart has no items
empty_cart_btn_text
string
Start Shopping
CTA button label on the empty state
empty_cart_btn_url
string
/shop
URL the empty state CTA links to (defaults to WooCommerce shop page)
11 — Admin UI
Cart Icon
Configures the cart icon style and accent color used across the whole plugin — in the floating cart button, nav menu widget, and the drawer header trigger icon.
Key
Type
Default
Description
enable_mini_cart
bool
yes
Required to use the [cartexa_cart_icon] shortcode and widget
cart_icon_style
string
bag
bag · basket · trolley — SVG icon set
accent_color
string
#7c3aed
Global accent color (CSS custom property --cartexa-accent)
12 — Developer
Shortcode & Widget
Cartexa provides one shortcode and one WordPress widget for placing a cart icon anywhere on your storefront.
Shortcode
// Basic usage — uses settings from admin panel
[cartexa_cart_icon]
// With all attributes
[cartexa_cart_iconshow_label="yes"label="Cart"icon="bag"]
Attribute
Default
Description
show_label
no
Set to yes to show a text label alongside the icon
label
""
Custom label text. Defaults to the value in the Cart Icon settings tab.
icon
(from settings)
Override the icon style: bag · basket · trolley
Widget
A WP_Widget is registered as Cartexa Cart Icon. Add it to any sidebar or widget area from Appearance → Widgets. It renders the same cart icon shortcode with a live badge count.
PHP function
// Output the cart icon anywhere in your theme<?phpechodo_shortcode( '[cartexa_cart_icon]' ); ?>
13 — Developer
AJAX Endpoints
All cart mutations use WordPress AJAX with nonce verification. The nonce is passed in the JS config object (window.cartexaConfig.nonce) and verified on every request.
Action
Method
Parameters
Description
cartexa_get_fragments
POST
nonce
Returns updated cart HTML fragments and item count. Called after any cart change.
cartexa_update_qty
POST
nonce, cart_item_key, qty
Updates the quantity of a cart line item. Returns fragments on success.
cartexa_remove_item
POST
nonce, cart_item_key
Removes a line item from the cart. Returns fragments and the removed item data for Undo.
cartexa_refresh_nonce
POST
—
Returns a fresh nonce. Called automatically when a nonce expires (e.g. after user login/logout).
cartexa_export_settings
POST
nonce
Admin only. Returns all plugin settings as a downloadable JSON object.
cartexa_import_settings
POST
nonce, settings
Admin only. Imports and validates a JSON settings object. Overwrites current settings.
⚠️
All AJAX endpoints are available to both logged-in and guest users except cartexa_export_settings and cartexa_import_settings which require manage_options capability.
14 — Reference
All Settings
All settings are stored in a single WordPress option: cartexa_settings (serialised array). You can read any setting programmatically:
<?php// Read a single setting$drawer_width = Cartexa\Settings::fetch( 'drawer_width', 420 );
// Read a boolean setting$is_enabled = Cartexa\Settings::fetch_bool( 'enable_drawer' );
Key
Type
Default
Description
enable_drawer
bool
yes
Enable AJAX side cart drawer
drawer_position
string
right
right · left
drawer_trigger
string
both
both · add_to_cart · icon_click
animation_style
string
slide
slide · fade · none
drawer_width
int
420
Drawer width in px (280–680)
overlay_close
bool
yes
Close on backdrop click
accent_color
string
#7c3aed
Global CSS accent color
cart_icon_size
int
22
Icon size in px (16–40)
cart_icon_style
string
bag
bag · basket · trolley
enable_mini_cart
bool
yes
Enable shortcode & widget
enable_floating_cart
bool
no
Enable floating cart FAB
floating_cart_position
string
bottom-right
bottom-right · bottom-left
floating_cart_icon
string
bag
bag · basket · trolley
floating_cart_label
string
""
Optional FAB text label
floating_cart_offset_x
int
24
Horizontal offset px
floating_cart_offset_y
int
24
Vertical offset px
enable_shipping_bar
bool
yes
Enable free shipping progress bar
shipping_threshold
int
0
Manual threshold (0 = auto)
shipping_bar_msg_progress
string
Spend {amount} more…
Progress message — use {amount}
shipping_bar_msg_reached
string
🎉 You've unlocked…
Threshold reached message
shipping_bar_color
string
#10b981
Progress bar fill color
enable_trust_badges
bool
yes
Enable trust badges row
trust_badges_position
string
after_actions
after_actions · drawer_bottom
trust_badge_secure
bool
yes
🔒 Secure Checkout badge
trust_badge_returns
bool
yes
🔄 Easy Returns badge
trust_badge_shipping
bool
yes
🚚 Fast Shipping badge
trust_badge_support
bool
no
💬 24/7 Support badge
trust_custom_text_1
string
""
Custom badge slot 1
trust_custom_text_2
string
""
Custom badge slot 2
enable_scarcity
bool
yes
Enable stock scarcity messages
scarcity_threshold
int
5
Show message when stock ≤ this
scarcity_message
string
Only {qty} left!
Template — use {qty}
scarcity_color
string
#ef4444
Scarcity text color
enable_toast
bool
yes
Enable add-to-cart toast notification
enable_undo_remove
bool
yes
Enable undo banner after item remove
enable_nav_menu
bool
yes
Enable nav menu cart icon integration
show_subtotal
bool
yes
Show subtotal in drawer footer
show_checkout_btn
bool
yes
Show Checkout button
show_view_cart_btn
bool
yes
Show View Cart button
checkout_btn_text
string
Checkout
Checkout button label
view_cart_btn_text
string
View Cart
View Cart button label
empty_cart_message
string
Your cart is empty.
Empty state heading
empty_cart_btn_text
string
Start Shopping
Empty state CTA label
empty_cart_btn_url
string
/shop
Empty state CTA URL
15 — Developer
Hooks & Filters
Filters
Hook
Arguments
Description
cartexa_load_assets
$load (bool)
Force assets to load on a specific page. Return true to enqueue on any page.
cartexa_js_config
$config (array)
Modify the JavaScript config object passed to window.cartexaConfig. Useful for injecting custom data for extensions.
cartexa_drawer_classes
$classes (array)
Add or remove CSS classes from the drawer wrapper element.
cartexa_sanitize_settings
$clean (array), $input (array)
Runs after the built-in settings sanitization. Return the final clean array.
Actions
Hook
Description
cartexa_loaded
Fires after the plugin core finishes bootstrapping. Receives the core instance as the first argument.
cartexa_activated
Fires on plugin activation, after default settings are saved.
cartexa_deactivated
Fires on plugin deactivation.
cartexa_before_drawer
Fires immediately before the drawer template is output to the page. Use to inject HTML before the drawer.
cartexa_after_drawer
Fires immediately after the drawer template. Use to inject HTML after the drawer.
cartexa_modules_loaded
Fires after all active modules have been registered and hooked.
Usage example
// Force assets to load on your homepageadd_filter( 'cartexa_load_assets', function( $load ) {
if ( is_front_page() ) {
returntrue;
}
return$load;
} );
// Add a custom class to the draweradd_filter( 'cartexa_drawer_classes', function( $classes ) {
$classes[] = 'my-custom-theme';
return$classes;
} );
// Run code after the drawer is outputadd_action( 'cartexa_after_drawer', function() {
echo'<div class="my-extra-element"></div>';
} );
16 — FAQ
Frequently Asked Questions
Does this work with my theme?
Yes. Cartexa hooks into WooCommerce's standard cart actions and does not override any theme templates. It renders its drawer as a separate layer appended to <body> — completely independent of your theme's layout. It has been tested with Storefront, Astra, Flatsome, Divi, and block themes including the default Twenty-series.
Will it work with variable products?
Yes. Cartexa intercepts the standard WooCommerce add-to-cart flow after WooCommerce itself has resolved the variation. The cart drawer shows the selected variation attributes (size, color, etc.) below each item name. Quantity updates and removals work identically for simple and variable products.
Does it conflict with other cart plugins?
Cartexa is built on standard WooCommerce hooks and does not monkey-patch core classes. Conflict is most likely with other side-cart or mini-cart plugins that hook into the same events. We recommend running only one cart replacement plugin at a time. Use the cartexa_load_assets filter to conditionally disable loading on specific pages if needed.
Will it slow down my site?
No. Assets are only enqueued on shop, product, cart, and checkout pages (plus any page where the shortcode is used). Disabled modules load zero assets. The frontend JS is under 40 KB minified with no jQuery dependency. No external scripts or fonts are loaded.
How do I translate the plugin?
Cartexa is fully translation-ready. A .pot file is included in the languages/ folder. All strings use the text domain cartexa-smart-cart-for-woocommerce. You can translate using Loco Translate, PoEdit, or the WordPress.org GlotPress translation system. On WordPress 4.6+, translation files are auto-loaded from wp-content/languages/plugins/.
Can I customise the drawer templates?
Template override is not yet built in, but you can use the cartexa_before_drawer and cartexa_after_drawer action hooks to inject HTML around the drawer, and the cartexa_drawer_classes filter to add your own CSS classes. Full template override support is planned for a future version.
Does it support HPOS (High-Performance Order Storage)?
Yes. Cartexa does not read order data directly — it only reads the WooCommerce cart session. HPOS compatibility is therefore unconditional. The plugin declares WooCommerce\Blocks\Compatibility headers for Block themes as well.
How do I export and import my settings?
Go to Cartexa → Tools tab in the admin. Click Export Settings to download a JSON file of all your settings. On another site, go to the same tab and upload the JSON file with Import Settings. The import validates the JSON before applying it — invalid files are rejected with an error message.
17 — Changelog
Changelog
v1.0.0
September 2026
Initial Release
AJAX Side Cart Drawer — slide in from right or left, with slide/fade/none animation
Floating Cart Button (FAB) — persistent corner button with live item count badge
Free Shipping Progress Bar — auto-reads WooCommerce free shipping rules, custom messages with {amount} placeholder
Trust Badges — 4 built-in badges + 2 custom text slots, configurable position
Stock Scarcity Messages — reads live WooCommerce stock, configurable threshold and {qty} template
Toast Notifications — add-to-cart confirmation with product thumbnail
Undo Remove — restore removed items from a temporary undo banner
Nav Menu Cart Icon — [cartexa_cart_icon] shortcode and WP_Widget
Settings Export / Import — JSON export/import from the Tools tab
Zero jQuery — vanilla ES6 throughout, under 40 KB minified
HPOS compatible — no direct order table reads
WPCS clean — 0 errors, 0 warnings under WordPress Coding Standard
Translation ready — .pot file included, text domain cartexa-smart-cart-for-woocommerce