Show the Cart only for registered user - by MarCor81

This topic has 2 replies, 2 voices, and was last updated 8 years, 9 months ago ago by Jack Richardson

  • Avatar: MarCor81
    MarCor81
    Participant
    July 1, 2015 at 10:58

    Hi.

    Is possible to show the shopping cart in heading area only to registered users?

    1 Answer
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 1, 2015 at 11:11

    Hello,

    You have to edit the file header-structure-*.php in the directory wp-content/themes/royal/headers (you should select the file due to the header type you’re using).
    Find the code

    <?php if(class_exists('Woocommerce') && !etheme_get_option('just_catalog') && etheme_get_option('cart_widget')): ?>
    <?php etheme_top_cart(); ?>
    <?php endif ;?>

    and replace it with this one:

    <?php if(class_exists('Woocommerce') && !etheme_get_option('just_catalog') && etheme_get_option('cart_widget') && is_user_logged_in()): ?>
    <?php etheme_top_cart(); ?>
    <?php endif ;?>

    Best regards,
    Jack Richardson.

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.