Archived topic
Mini cart hook
11 replies · Started by Matt on March 4, 2021
Hi there,
I want to add a piece of text underneath the checkout button in the mini cart.https://www.dropbox.com/s/wtpd7r6n8jhmnje/Screenshot%202021-03-04%20at%2023.26.51.png?dl=0
How can I do this? The normal woocommerce_after_cart_totals doesn't work unfortunately. https://mattt.is/telefooncenter/winkelwagen/ is the site (cart page)
Hi Matt,
I failed to add any product in to the cart.
The massage shows up: Selecteer eerst product-opties alvorens dit product in de winkelmand te plaatsen.
I didn't find any options to choose from.
Oh no, did the layout look weird too?
Yes, Unfortuanly I have to say the single product page is very hard to read.
Could you try clearing your cache and refresh? I think it's fixed now 🤞🏻
The text is showing now, you fixed it?
Yes, it's shown in the 'big cart'. I'd like to show it in the mini cart (popup) https://www.dropbox.com/s/lm4bs52t3hupea2/Screenshot%202021-03-05%20at%2000.12.51.png?dl=0
I'm having a hard time to get the mini cart to show, does it only show on cell phone?
Are you using some sort of plugin for the mini cart?
This is what I see for mobile simulation using chrome developer tool:
https://www.screencast.com/t/UVLLZUyL
It's shown when there's a product in the cart. So add a product like this (https://mattt.is/telefooncenter/product/iphone-8/) to your cart and then hover over the cart icon.
I'm not familiar with woocommerce hooks, but you could give this css a try:
.woocommerce-mini-cart__total.total:after {
content: "your-custom-text";
display: block;
margin-top: 20px;
}
Let me know :)
Thanks, that works!
Glad to hear that :)