Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

    Default hide elements from non-members??

    my client wants her new site to feature an online store that is only visible to wholesale clients with a user account.

    so my question is how do i hide elements from non-users?? i need a little piece of code to put around elements (such as the left/right columns) that makes them appear only if logged in.

    thanks alot :)

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default Re: hide elements from non-members??

    Admin >> Customer Details >> Customer Shop Status - View Shop and Prices

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  3. #3
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: hide elements from non-members??

    Quote Originally Posted by mprough View Post
    Admin >> Customer Details >> Customer Shop Status - View Shop and Prices

    ~Melanie
    Thanks Melanie,

    I had already found that but I need to know which 'if' statements in the template code react to these settings and how to edit them so I can customise each element...

    The settings in Admin are not quite specific enough for me!

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: hide elements from non-members??

    Under what conditions, or in what situations, do you want certain elements not to display. You need to be very specific...

    * What elements
    * What conditions / situations
    20 years a Zencart User

  5. #5
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: hide elements from non-members??

    Quote Originally Posted by schoolboy View Post
    Under what conditions, or in what situations, do you want certain elements not to display. You need to be very specific...

    * What elements
    * What conditions / situations
    I need content such as about, contact, EZ pages etc to be visible by all, but hide everything else (cart, prods & cats, search, etc) until logged in.

    basically the actual store itself is for wholesale customers only, and i want to use zencart as CMS to ease moderation. we need quite a lot of content for non members to remain visible, such as galleries and information.

    in the past i managed to hide elements in Virtuemart using this solution - http://forum.virtuemart.net/index.php?topic=51152.0

    is there something similar that will work in ZC?

    thanks alot!

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: hide elements from non-members??

    You should be able to do a similar code changes in init_customer_auth.php

    includes\init_includes\
    20 years a Zencart User

  7. #7
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: hide elements from non-members??

    Thanks everyone but I figured it out!

    Code:
    if ($_SESSION['customer_id'] == '')

 

 

Similar Threads

  1. Replies: 2
    Last Post: 4 Feb 2010, 01:23 AM
  2. members only: hiding the products from non members
    By poosk in forum General Questions
    Replies: 2
    Last Post: 18 Nov 2009, 04:17 PM
  3. How to hide Information page from non registerested guest?
    By sdkhoo in forum Basic Configuration
    Replies: 3
    Last Post: 9 Nov 2009, 09:23 PM
  4. Hide Items from non-registered users
    By kgmmusic in forum Managing Customers and Orders
    Replies: 8
    Last Post: 28 Jan 2007, 05:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg