Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore : Only show cart to logged in users of the site

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore : Only show cart to logged in users of the site

  • This topic has 3 replies, 3 voices, and was last updated 10 years, 7 months ago by arvz.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • November 15, 2014 at 12:07 pm #11790
    arvz
    Member

    Greetings!

    Here’s my website: [http://highmetricdomains.com/marketplace/]

    My setup WP Estore and Wishlist Member with no particular integration… No page is currently protected at the moment.

    I really want hide the shopping cart to users that are not logged in.

    See screenshot: [http://screencast.com/t/jE0CXqxz]

    I’m using this short code for the shopping cart: [wp_eStore_display_compact_cart4]

    I came up with this code but it broke the site:

    <div class=”custom-cart-wrapper”>

    <?php

    if ( is_user_logged_in() ) {

    echo eStore_shopping_cart();

    } else {

    return false;

    }

    ?>

    </div>

    <div style=”clear: both;”></div>

    I’m not really a coder though, I’m just trying my luck :)

    I would really appreciate any help from you guys.

    Thank you in advance!

    -Arvin

    November 15, 2014 at 2:19 pm #66830
    wzp
    Moderator

    I came up with this code but it broke the site:

    What exactly do you mean by “broke the site?”

    November 15, 2014 at 11:19 pm #66831
    admin
    Keymaster

    That function call is incorrect (that function doesn’t exist so I am not sure where you got it from).

    You probably want to use something like the following so it shows the compact shopping cart to logged in members only:

    <div class="custom-cart-wrapper">
    <?php
    if ( is_user_logged_in() ) {
    echo eStore_display_compact_cart4();
    } else {
    echo "";
    }
    ?>
    </div>

    November 16, 2014 at 12:05 am #66832
    arvz
    Member

    Thanks admin! It worked!

    Hi wzp! I got a php error when I played with my own code, but nothing serious happened. All I have to do is remove the code that I pasted.

    Thank you so much for your help!

    Best Regards,

    Arvin

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ