Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Location
    Burleson. Texas
    Posts
    194
    Plugin Contributions
    0

    Default How to restrict "Read Reviews" to logged in users?

    The point is not to allow the GP to be able to read any reviews (they are for unique and site-specific products) but do allow them to view the products.

    I am aware that this does seem to defeat the purpose of reviews, but that is the way it needs to be.

    I am also aware that product viewing can be restricted to only those who are logged in, but that would not be the ideal.

    The site is using 1.50 with limited add-ons.

    Any pointers would be appreciated!
    Dennis
    www.stampdays.com
    Over 80,000 stamps and still growing!

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

    Default Re: How to restrict "Read Reviews" to logged in users?

    I would think something like below in the appropriate pages in modules >> pages would do the trick

    if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
    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
    Feb 2007
    Location
    Burleson. Texas
    Posts
    194
    Plugin Contributions
    0

    Default Re: How to restrict "Read Reviews" to logged in users?

    Quote Originally Posted by mprough View Post
    I would think something like below in the appropriate pages in modules >> pages would do the trick

    if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
    That worked!!

    I kinda had an idea of what was needed but I was looking in the wrong place. It did not register that it would be in the header in pages. My mind set told me that it had to be in a tpl_ file.

    Many thanks for getting me straight.
    Dennis
    www.stampdays.com
    Over 80,000 stamps and still growing!

 

 

Similar Threads

  1. Replies: 6
    Last Post: 31 Mar 2014, 03:06 PM
  2. Replies: 18
    Last Post: 29 Sep 2009, 02:37 PM
  3. php code for "if logged in" vs "if not logged in"
    By p m in forum General Questions
    Replies: 11
    Last Post: 26 Aug 2008, 11:36 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