Change Cart icon

Hi guys,

I want to change the cart icon. 
I've tried to replace the <i class> style to <img src=""/> in the header-top-area.php but it is still the old cart icon. 
Any clue on how I can change the i class to a custom image for the cart?

Looking forward hearing from you,

BR,
Michiel

Comments

  • btw. when I delete all my cookies etc. and re-open the site, it shows up for 1 second and then got overruled or something by the icon again.
  • // WooCommerce Cart
    if( $woocommerce ){
    echo '<a id="header_cart" href="'. $woocommerce->cart->get_cart_url() .'"><img src="image link here" /><span>'. $woocommerce->cart->cart_contents_count .'</span></a>';
    }

    This is what I have so far but doesnt work as i expect..
  • Hi,

    to change cart icon in header, you need to modify includes/header-top-area.php file. You need to modify content which looks like below:
    // WooCommerce Cart
    if( $woocommerce ){
        echo '<a id="header_cart" href="'. $woocommerce->cart->get_cart_url() .'"><i class="icon-basket"></i><span>'. $woocommerce->cart->cart_contents_count .'</span></a>';
    }
    This will work on 100%. All you need to do is change <i class="icon-basket"></i> inside this code with other icon from list of available icons that are on http://themes.muffingroup.com/betheme/shortcodes/typography#icons. But if you prefer to use own image instead of icon, then you must play with img html tag and css as well.
  • Thanks guys. I figured out that doing the same in the functions/theme-woocommerce.php was the solution. I was thinking that changing it in the includes would do. Thanks anyway for your excelent and quick support.
  • Ok then :) Thanks for the info!
  • I've tried EVERYTHING.  I can't get the cart icon to change from a bag-fine to a cart
  • You can change the icon simply just by going to theme options>blog,portfolio&shop>shop and set the icons there, like so: http://prntscr.com/fhah5o
    Disale all chache and try to delete browser cache as well.

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.