BuddyBoss Home – Web Support Forums Themes Boss. theme Cart icon visible for logged out users

Viewing 4 posts - 1 through 4 (of 4 total)
  • Question

    #59886
    @lahir

    Hi,

    Our website is mainly an online store and we are using Woocommerce “Guest checkout”, so the cart icon should be visible even for logged out users. please let me know how to do that.

    Thank you

    Answers

    #59890

    Anonymous
    @

    Hi @lahir, To do the changes copy the ‘header-profile.php’ from parent theme to child theme under ‘template-parts’

    The exact path will be : boss-child/template-parts/header-profile.php

    After this, Paste the following code at line no. 134

    
    <?php
          global $woocommerce;
          if ( $woocommerce ) {
          $cart_items = $woocommerce->cart->cart_contents_count;
          ?>
    	<div class="header-notifications">
    	  <a class="cart-notification notification-link fa fa-shopping-cart" href="<?php echo $woocommerce->cart->get_cart_url(); ?>">
    		<?php if ( $cart_items ) { ?>
    			<span><?php echo $cart_items; ?></span>
    		<?php } ?>
    	  </a>
    	</div>
          <?php } ?>
    

    Regards

    #60063
    @lahir

    Hi @pallavi

    I tried that, it broke the website. Any idea or do you want me to email you access to my staging website?

    Thank you.

    #60111

    Anonymous
    @

    Hi @lahir, OK send your site detail from our contact us pge I will check that.

    Regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • The question ‘Cart icon visible for logged out users’ is closed to new replies.