Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default 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...

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: EZ Page - Registered Only

    You would have to re-write the code for this but yes ... this is Zen Cart and anything can be customized to suit ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: EZ Page - Registered Only

    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.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: EZ Page - Registered Only

    You can use:
    PHP Code:
    if (isset($_SESSION['customer_id']) && (int)$_SESSION['customer_id'] > 0) { 
    // blah blah

    This assures it is set and a real value ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: EZ Page - Registered Only

    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.

  6. #6
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: EZ Page - Registered Only

    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.

    Code:
    <?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...

 

 

Similar Threads

  1. v150 how to create a custom form page for only registered users?
    By buhebutler in forum General Questions
    Replies: 6
    Last Post: 4 Apr 2013, 01:08 PM
  2. Download some files only if registered
    By monkeyjr47906 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 29 Jun 2008, 11:08 PM

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