Hide shopping cart for guest…
-
Hello,
while working on my website I stuck on one thing i can not solve by my self.
I want the shopping cart disabled for guest users. This is the code in my header:<li class="pk_option_item"> <?php if((sizeof($woocommerce->cart->cart_contents)) == 0): echo 'Shopping cart is empty!'; ?> <?php else: ?> <a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"> <?php echo sprintf(_n('%d product', '%d products', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?> </a> <?php endif; ?> <span class="pk_option_item_divider"></span> </li> <?php
Anyone who can help me?
Regards
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide shopping cart for guest…’ is closed to new replies.