Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Resolved] Image in the Woocommerce Shopping Cart widget

Home Forums Support [Resolved] Image in the Woocommerce Shopping Cart widget

Home Forums Support Image in the Woocommerce Shopping Cart widget

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #380238
    Oleh

    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.

    #380445
    Tom
    Lead Developer
    Lead Developer

    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?

    #380478
    Oleh

    Thank you for your ansver.
    I’ll try with HTML or with some plugin.

    #380711
    Tom
    Lead Developer
    Lead Developer

    Sounds good, let me know if you need more help 🙂

    #381094
    David
    Staff
    Customer Support

    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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.