WordPress.org

Support

Support » Plugins and Hacks » Shopping cart for logged in users only…

Shopping cart for logged in users only…

  • Christiaan
    Member

    @christiaan-grob

    Hello,

    I’m working on my website but there are a few problems I cant solve.
    In the header I have my shopping cart but I want that only logged in users can see the shopping cart. Do someone know how to fix this?

    I’m using WP Sold from Themeforest.

    Here is the code that is inside the header file:

    <?php
    	endif;
    
    	if (function_exists('woocommerce_get_page_id')) : 
    
    			global $woocommerce;
    ?>
    
    					<li class="pk_option_item">
    						<?php if((sizeof($woocommerce->cart->cart_contents)) == 0):
        echo '&nbsp;&nbsp;Winkelwagen is leeg&nbsp;&nbsp;';
    ?>
    <?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 producten',
                    $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
    	endif;
    ?>

    And I have one more question. Is it possible to show an advice price under the normal price of products?

    Reagards Christiaan

    http://wordpress.org/plugins/woocommerce/

  • The topic ‘Shopping cart for logged in users only…’ is closed to new replies.