Shopping cart bucket icon adding in woocommerce website

Add below code where you want to display the cart bucket icon with number of products:

<?php if( function_exists( ‘WC’ ) ) { ?>
<div class=”navbar”>
<a href=”<?php echo WC()->cart->get_cart_url() ?>” title=”View shopping cart”>
<img src=”url” alt=”” />
<span class=”number”><?php echo trim( WC()->cart->get_cart_contents_count() ); ?></span>
</a>
</div>
<?php } ?>