Answers.Body: <p>Assuming <code>yourLightSwitchFieldHandle</code> is labeled "Hide From Logged Out Users", something like this should work.  Completely untested.</p>
  
  <pre><code>{# if the user is logged in OR they are not logged in but we don't want to hide the current product #}
  
  {% if currentUser OR (not currentUser and not yourProduct.yourLightSwitchFieldHandle) %}
          Show Product
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T22:36:34.117Z
Answers.Text: Im not sure if it is labeled "Hide From Logged Out Users" how can I check?
Answers.UserDisplayName: JustinTheeDude
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T22:38:34.297Z
Answers.Text: It's just an example... the light switch can be either positive (Show to logged out users) or negative (Hide from logged out users) depending on how you've set things up. If it's negative, you need the `not` in front of `yourProduct.yourLightSwitchFieldHandle`. If it's positive, you don't.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T22:39:56.147Z
Answers.Text: Oh okay for sure I'll give it a try
Answers.UserDisplayName: JustinTheeDude
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T23:36:44.497Z
Answers.Text: Could I actually make a whole category private?
Answers.UserDisplayName: JustinTheeDude
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T22:19:53.640Z
Answers.LastActivityDate: 2016-07-20T22:19:53.640Z
Answers.UserDisplayName: Brad Bell
Body: <p>Currently I have a light switch on some commerce items that make them private to users that are not logged in but they still show up when the user is logged out. Is there a way to do this? I'm continuing development for a webpage and I'm still new to craft so I am sort of lost</p>
  
Tags: <plugin-craftcommerce>
Title: Creating private items
ThreadText: # Creating private items
  
  (Asked by: username_0 on 2016-07-20)
  
  Currently I have a light switch on some commerce items that make them private to users that are not logged in but they still show up when the user is logged out. Is there a way to do this? I'm continuing development for a webpage and I'm still new to craft so I am sort of lost
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-20. Score: 4
  
  Assuming `yourLightSwitchFieldHandle` is labeled "Hide From Logged Out Users", something like this should work. Completely untested.
  
  ```
  {# if the user is logged in OR they are not logged in but we don't want to hide the current product #}
  
  {% if currentUser OR (not currentUser and not yourProduct.yourLightSwitchFieldHandle) %}
          Show Product
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: Im not sure if it is labeled "Hide From Logged Out Users" how can I check?  
  > **username_1**: It's just an example... the light switch can be either positive (Show to logged out users) or negative (Hide from logged out users) depending on how you've set things up. If it's negative, you need the `not` in front of `yourProduct.yourLightSwitchFieldHandle`. If it's positive, you don't.  
  > **username_0**: Oh okay for sure I'll give it a try  
  > **username_0**: Could I actually make a whole category private?  
  
  ---
  
  