Archived topic
Image in the Woocommerce Shopping Cart widget
4 replies · Started by Oleh on September 6, 2017
Hi,
Is it possible to add a image instead of just text ih the Woocommerce cart widget?
The page is here. The name of the cart is Inkøbskurv.
Thank you
Oleh.
Hi there,
I'm not sure if it's possible to edit the core WC shopping cart widget.
You can add an HTML widget above it with an image in it?
Thank you for your ansver.
I'll try with HTML or with some plugin.
Sounds good, let me know if you need more help :)
This may help you on the way.
I use the follow php to remove the text:
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_archive_custom_cart_button_text' ); // 2.1 +
function woo_archive_custom_cart_button_text() {
return '';
}
And add a Fontawesome icon for the button with CSS:
.add_to_cart_button::before {
content: "\f218";
font-family: FontAwesome;
}
You could of course replace the content with an img or whatever.