In This Article
2. What a mini cart is made of
3. Where Divi puts the cart by default
4. Step 1 — Build the header with a cart icon and count
5. Step 2 — Create a canvas for the cart panel
6. Step 3 — Style the panel
7. Step 4 — Add the show and hide CSS
8. Step 5 — Wire up the cart icon
9. What you’re accepting if you build it this way
10. The faster route
11. Pulling it together
No panel opens. No count updates. If they want to see what’s in their basket, they have to leave the page and go to the cart.
Divi 5 can actually fix this now, natively — no plugin required. It takes about twenty minutes, a few lines of CSS and one small script. We’ll walk through the whole thing, and then be honest about where it lands and what it still can’t do.
What a mini cart is made of
The icon and count — always visible, always current.
The panel — slides in showing items and totals.
The link between them — clicking the icon opens the panel.
Divi 5 gives you the first two. The third needs a little help.
Where Divi puts the cart by default
If you’re using Divi’s default menu, a cart icon appears in it automatically once WooCommerce is active. Useful — except there’s no setting to style it, move it, or turn it off. It’s simply there, looking however Divi decides it looks.
Either way, what you get is a link to the cart page. Your customer still leaves the page to see what they’ve got.
Let’s fix that.
Step 1 — Build the header with a cart icon and count
Add a Menu module, and in its settings enable:
- Show Shopping Cart Icon
- Show Cart Quantity
That’s half the job done, with no code at all.
Step 2 — Create a canvas for the cart panel
At the top left of the Builder, click Main Canvas, then Add Canvas. Name it minicart, select Append Below, and give it a Z index of 99999. Click Add Canvas.
Inside the new canvas, add three modules:
- an Icon module — this will be your close button
- Woo Cart Products — displays what’s in the cart
- Woo Cart Totals — displays the totals
Step 3 — Style the panel
- Design → Spacing: padding 10px all round
- Content → Background: add a background colour, so it isn’t transparent
- Design → Sizing: width 500px, max width 100%, max height 100%
- Advanced → Visibility: Vertical Overflow → Scroll
- Advanced → Position: Fixed, centre right
- Advanced → Z index: 99999
- Advanced → Attributes: add ID divi-minicart
- Advanced → Attributes: add class visible
- Design → Sizing: width 100%
- Content → Icon: search “close” and pick one you like
- Design → Icon: set colour and size
- Design → Sizing → Alignment: Start
- Trigger Event: Click
- Effect Action: Toggle Attribute
- Target Element: the minicart Section
- Attribute Name: Class
- Attribute Value: visible
Under Content → Elements, disable:
- Show Product Image
- Show Coupon Code
- Show Update Cart Button
- Show Remove Item Icon
Save.
Step 4 — Add the show and hide CSS
html:not(.et-vb-app-ancestor) #divi-minicart:not(.visible){
transform:translate(100%,-50%)!important;
}
#divi-minicart{
transition: all .3s ease
}
The second rule gives it a smooth 0.3s slide rather than an abrupt jump.
Step 5 — Wire up the cart icon
Divi’s Interactions fire from the module you attach them to — so putting one on the Menu module would mean any menu item opens the cart, not just the icon. There’s no way to scope it to the icon alone.
So we use a small script instead. Go to Divi → Theme Options → Integrations and add this to the < head >:
That’s it. Icon, live count, sliding panel, closing button — all in Divi 5.
What you’re accepting if you build it this way
The count isn’t a bubble. Divi shows it as text beside the icon rather than in a circle, and there’s no setting to change that. It’s a cosmetic point on desktop, but it costs you real space on a phone — see below.
The panel is a cart page in a small box. You can hide the product image, coupon field and Update Cart button — but product name, price, quantity and subtotal are fixed columns. There’s no way to restructure them into something laid out for a narrow flyout.
There’s no overlay behind the panel. It slides over the page with nothing dimming what’s underneath, which makes it feel less like a distinct layer.
The faster route
It covers the gaps above: a customisable count bubble, your own cart icon, drop-down or fly-in, opening on hover or on click, opening automatically when someone adds to cart, an overlay behind the panel, and working quantity and remove controls inside it. The panel is designed for a narrow space rather than adapted from a cart page — you control image sizes, title sizes and spacing, which is what makes it sit properly on a phone. And it switches itself off on the cart page, so there’s no cart on top of a cart.
You also get proper buttons at the bottom: View Cart and Checkout, side by side or stacked, with your own text and colours on each.
And nothing depends on Divi’s internal class names staying the same, because keeping up with that is our job rather than yours.
If you only want the icon and count in your menu, without the panel, Divi Menu Cart covers just that.
Pulling it together
What it still can’t do is the small stuff that makes a mini cart feel finished — the count bubble, the panel opening at the right moment, a layout built for the space it lives in.

