Private: Home › Forums › WordPress Themes › Elvyre – Retina Ready WordPress Theme › Cart in header – visibility › Reply To: Cart in header – visibility
February 11, 2015 at 1:10 pm
#2044
Participant
Hello,
One posibility is to modify the header.php in wp-content/themes/elvyre. Open that file and go to about line 128 where it says:
<?php if (defined('PI_WOOCOMMERCE') && PI_WOOCOMMERCE && isset($pi_theme_options['woo_header_cart']) && $pi_theme_options['woo_header_cart'] == '1'): ?>
<?php global $woocommerce ?>
<div class="header-cart">
<div class="cart-container icon-cart-3">
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'pi_framewowk'); ?>"> <span class="cart-count"><?php $woocommerce->cart->cart_contents_count ?></span> <?php echo $woocommerce->cart->get_cart_total(); ?></a>
</div>
</div>
<?php endif; ?>
And modify the code to look like:
<?php if (defined('PI_WOOCOMMERCE') && PI_WOOCOMMERCE && isset($pi_theme_options['woo_header_cart']) && $pi_theme_options['woo_header_cart'] == '1'): ?>
<?php global $woocommerce ?>
<?php if ( sizeof( $woocommerce->cart->cart_contents ) != 0 ) { ?>
<div class="header-cart">
<div class="cart-container icon-cart-3">
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'pi_framewowk'); ?>"> <span class="cart-count"><?php $woocommerce->cart->cart_contents_count ?></span> <?php echo $woocommerce->cart->get_cart_total(); ?></a>
</div>
</div>
<?php } ?>
<?php endif; ?>
Let me know if that’s what you wanted…
Robert