Forums / General Questions / How to restrict "Read Reviews" to logged in users?

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

Views: 608

Results 1 to 3 of 3
24 Feb 2013, 6:00 PM
#1
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

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.

:DAny pointers would be appreciated!

Dennis
www.stampdays.com
Over 80,000 stamps and still growing!

26 Feb 2013, 3:12 PM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,296
Plugin Contributions:
39

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 https://pro-webs.net/

28 Feb 2013, 6:13 PM
#3
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

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

mprough:

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!