Zen Follower
- Join Date:
- May 2006
- Posts:
- 313
- Plugin Contributions:
- 0
EZ Page - Registered Only
Hey everyone,
Is it possible to make an EZ-Page that is only accessible if you're logged in?
Thanks in advance...
Views: 888
Zen Follower
Hey everyone,
Is it possible to make an EZ-Page that is only accessible if you're logged in?
Thanks in advance...
Oba-san
You would have to re-write the code for this but yes ... this is Zen Cart and anything can be customized to suit ...
Zen Follower
Thanks Ajeh. I'm assuming it has to be some kind of 'if the customer is registered' then show this page. and if not, then show this page.
does that sound right?
if so, i'm wondering what the registered statement would look like. I could probably figure out the rest...
If i'm in the wrong ballpark... ha. wouldn't be surprised.
Thanks again for your help.
Oba-san
You can use:
if (isset($_SESSION['customer_id']) && (int)$_SESSION['customer_id'] > 0) {
// blah blah
}
This assures it is set and a real value ...
Zen Follower
Thanks Ajeh,
That should more than get me started... I will post the code if I get it all worked out right.
Have a great night.
Zen Follower
Okay, so I got it. My plans had reversed a bit.
Here is the link to take the customer to the contest page if they are logged in, and an ez-page if they are not.
<?php if (isset($_SESSION['customer_id']) && (int)$_SESSION['customer_id'] > 0) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_MEMBERSHIP_CONTEST, '', 'NONSSL'); ?>"><?php echo ESSAY_CONTEST; ?></a></li>
<?php } else {?>
<li><a href="<?php echo zen_ez_pages_link(14, '0', false); ?>"><?php echo ESSAY_CONTEST; ?></a></li>
<?php } ?>
Thanks again, Linda.
Hope this helps someone else out in the future...
Fields marked required must be completed.
Tell staff why this post should be reviewed.