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.