The Mini Cart Widget is a powerful feature introduced in WPDM Premium Packages 6.2.0. It provides customers with quick access to their shopping cart from anywhere on your website, improving the shopping experience and potentially increasing conversions.
Navigate to Downloads → Settings → Premium Package → Mini Cart to access the configuration panel.
Toggle "Enable Mini Cart" to activate the feature. Once enabled, you'll see additional configuration options.
| Option | Description |
|---|---|
| Display Style | Choose between Dropdown (appears below trigger), Slide Panel (slides in from side), or Floating (fixed position button) |
| Position | Where the mini cart appears: Top Right, Top Left, Bottom Right, or Bottom Left |
| Auto-Inject | Automatically add mini cart to your site without using shortcode |
| Auto-Open on Add | Show cart panel when an item is added |
| Auto-Close Delay | Time in milliseconds before cart auto-closes (0 to disable) |
| Option | Description |
|---|---|
| Show Item Count | Display badge with number of items in cart |
| Show Subtotal | Display cart total next to trigger button |
| Show Thumbnails | Display product images in cart panel |
| Icon Style | Choose cart icon: Shopping Cart, Shopping Bag, or Basket |
| Option | Description |
|---|---|
| Mobile Full Screen | Cart panel takes full screen on mobile devices |
| Mobile Breakpoint | Screen width (in pixels) below which mobile mode activates (default: 768px) |
| Option | Description |
|---|---|
| Primary Color | Main button and accent color (default: #6366f1) |
| Text Color | Text color for cart content (default: #1e293b) |
| Custom CSS | Add additional CSS for advanced customization |
The easiest way to add the mini cart. Simply enable "Auto-Inject" in settings, and the cart will automatically appear on your site based on your position settings.
Use the shortcode for precise placement in pages, posts, or widgets:
[*wpdmpp_mini_cart]
Shortcode Attributes:
| Attribute | Values | Description |
|---|---|---|
display_style |
dropdown, slide, floating | Override the global display style |
position |
top-right, top-left, bottom-right, bottom-left | Override position setting |
show_count |
yes, no | Show/hide item count badge |
show_total |
yes, no | Show/hide subtotal |
icon |
cart, bag, basket | Icon style |
class |
any CSS class | Add custom CSS classes |
Examples:
[*wpdmpp_mini_cart display_style="dropdown" show_count="yes"]
[*wpdmpp_mini_cart display_style="floating" position="bottom-right" icon="bag"]
[*wpdmpp_mini_cart show_total="no" class="my-custom-cart"]
Add the mini cart directly to your navigation menu for seamless integration:
#Cart (or leave empty)wpdmpp-minicartThe menu item will automatically transform into a fully functional mini cart with dropdown panel, showing:
The cart panel appears directly below the trigger button. Best for header placement where you want a compact, traditional e-commerce experience.
A full-height panel slides in from the side of the screen. Ideal for a more immersive cart experience with better visibility of cart contents.
A fixed-position button that stays visible as users scroll. Perfect for ensuring cart access on long pages.
The mini cart uses CSS custom properties for easy theming. You can override these in your theme's CSS or in the Custom CSS field:
/* Override mini cart colors */
:root {
--wpdmpp-mc-primary: #your-color;
--wpdmpp-mc-text: #your-text-color;
--wpdmpp-mc-breakpoint: 768px;
}
/* Custom trigger button style */
.wpdmpp-mc-trigger {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 50px;
padding: 12px 20px;
}
/* Custom panel styling */
.wpdmpp-mc-panel {
border-radius: 16px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
/* Item hover effect */
.wpdmpp-mc-item:hover {
background: #f8fafc;
transform: translateX(4px);
}
| Class | Element |
|---|---|
.wpdmpp-mini-cart |
Main container |
.wpdmpp-mc-trigger |
Trigger button |
.wpdmpp-mc-icon |
Cart icon |
.wpdmpp-mc-count |
Item count badge |
.wpdmpp-mc-total |
Subtotal display |
.wpdmpp-mc-panel |
Cart panel container |
.wpdmpp-mc-panel-header |
Panel header |
.wpdmpp-mc-panel-body |
Panel content area |
.wpdmpp-mc-panel-footer |
Panel footer with buttons |
.wpdmpp-mc-items |
Items container |
.wpdmpp-mc-item |
Individual cart item |
.wpdmpp-mc-item-thumb |
Item thumbnail |
.wpdmpp-mc-item-name |
Item name/title |
.wpdmpp-mc-item-remove |
Remove item button |
.wpdmpp-mc-empty |
Empty cart message |
.wpdmpp-mc-btn |
Action buttons |
.wpdmpp-mc-btn--primary |
Primary button (Checkout) |
.wpdmpp-mc-btn--secondary |
Secondary button (View Cart) |
The mini cart provides a JavaScript API for advanced integrations:
// Access the mini cart object
var cart = window.WPDMPPMiniCart;
// Open the cart panel
cart.open();
// Close the cart panel
cart.close();
// Toggle cart panel
cart.toggle();
// Refresh cart data from server
cart.fetchCart(function(response) {
console.log('Cart updated:', response);
});
// Update cart display with data
cart.updateCart(cartData);
// Show toast notification
cart.showToast('Item added!', 'success');
cart.showToast('Error occurred', 'error');
Listen for cart events in your custom JavaScript:
// Cart updated event
jQuery(document).on('wpdmpp:cart:updated', function(e, cartData)
{
console.log('Cart updated:', cartData);
console.log('Item count:', cartData.item_count); console.log('Total:', cartData.total_formatted);
});
// Item added event
jQuery(document).on('wpdmpp:cart:item:added', function(e, response)
{
console.log('Item added to cart:', response);
});
The mini cart uses REST API endpoints for real-time updates:
| Endpoint | Method | Description |
|---|---|---|
/wp-json/wpdmpp/v1/cart |
GET | Get current cart contents |
/wp-json/wpdmpp/v1/cart |
POST | Add item to cart |
/wp-json/wpdmpp/v1/cart/{product_id} |
DELETE | Remove item from cart |
/wp-json/wpdmpp/v1/cart)wpdmpp-minicart is added to the menu itemVersion 6.2.0 - Initial release of Mini Cart Widget
For any technical issue, if you are already using pro version please post in pro forum and free version users please post in free forum. Otherwise, if you have any pre-sale or order related query please contact live chat support team. For technical support.