Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34
  1. #31
    Join Date
    Mar 2009
    Location
    PA, USA
    Posts
    31
    Plugin Contributions
    0

    Default Re: members only area

    Quote Originally Posted by Derek Bryant View Post
    Hi Liam

    are you familiar with using ftp software and modifying zen cart files with text editors?

    cheers

    Derek
    Hi Derek,
    I had given in on a reply, stopped being lazy, and figured it out for myself. The answer I was looking for is already in this same thread, I guess my frustration at the time stopped my ability to read properly. Amazing how often that happens on this (and other) forums.

    Thank you for whatever valuable information you were about to share.
    Liam

  2. #32
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    162
    Plugin Contributions
    0

    Default Re: members only area

    Hi Liam

    I presume you mean the my posting on 31st March 2009 (for anyone else struggling)

    pleased you've cracked it!!

    cheers

    Derek

  3. #33
    Join Date
    May 2009
    Location
    Virginia
    Posts
    101
    Plugin Contributions
    0

    Default Re: members only area

    Quote Originally Posted by Derek Bryant View Post
    This the code:

    <?php

    $custID = $_SESSION['customer_id'];

    if ($custID > 0)
    {
    $host="localhost";
    $user="username";
    $password="password";
    $database="database name";
    $connection = mysql_connect($host, $user, $password)
    or die ("Could not connect");
    $db = mysql_select_db($database, $connection)
    or die ("Could not connect");

    $query = "SELECT customers_firstname, customers_lastname, customers_id, customers_newsletter from customers WHERE customers_id=$custID";
    $result = mysql_query($query)
    or die ("couldn't execute query");

    $row = mysql_fetch_array($result,MYSQL_BOTH);

    $newlettercode = $row[3];

    if ($newlettercode == 0)
    {echo "non member - please purchase membership subscription above";}
    else
    {echo "link to members section";}

    }
    else
    { echo "<br>Please log in if you are a member<br> ";}

    ?>
    The code works great, Derek. I'm using it to encourage customers to create accounts as members to take part in contests. Here's the work in progress:
    Code:
    http://www.janaygreen.com/index.php?main_page=contests
    . It's awesome! Thanks. Awesome and easy!

  4. #34
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    162
    Plugin Contributions
    0

    Default Re: members only area

    Hi Greengreetings

    thanks for the feedback - pleased to be of help

    Derek

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Members only area
    By jlong in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 8 Jan 2011, 07:11 PM
  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. Add a members only area
    By jdl in forum General Questions
    Replies: 8
    Last Post: 3 May 2007, 02:46 PM
  4. Replies: 7
    Last Post: 3 May 2007, 04:40 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