To show the number of products in the basket
eCommerce WordPress theme to create online shop with WooCommerce support
- GK User
- Tue Dec 20, 2016 7:19 pm
Hello, is it possibile to show the template INSTYLE current number of products in the basket? I would like to make it look like the template STOREFRONT.
-
- Senior Boarder
- Joshua M
- Tue Dec 20, 2016 10:48 pm
Hi,
Try to use a child theme for this kind of modification, please edit InStyle/layouts/header.php file and replace:
with:
dont' forget to add also global $woocommerce variable at the beginning of this file.
Try to use a child theme for this kind of modification, please edit InStyle/layouts/header.php file and replace:
- Code: Select all
<?php _e('Shopping Cart', GKTPLNAME); ?>
with:
- Code: Select all
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', GKTPLNAME); ?>">
<?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, GKTPLNAME), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?>
dont' forget to add also global $woocommerce variable at the beginning of this file.
-
- Moderator
2 posts
• Page 1 of 1