I am in the beginning steps of setting this up. Here is the process:
A user registers for a free basic membership and that info is entered into a members table.
I have a registration date field (current Timestamp) and a regType (1 = a free membership)
Now I have a cart for them to purchase a 30, 60 or 365 day membership (regType: 30 day = 2, 60 day = 3, 365 day = 4).
There is also a profile page to update their information, but having the registration date set to current timestamp will this update if they modified their address? I want to avoid having the timestamp changed unless they have purchased a membership.
The third part of this is: expiring the membership after the allotted time. Following this post your referenced showpost.php?p=139675&postcount=6
I have one rule set:
case "Logged in to Members":
$comparisons = array(TRUE, "".((isset($_SESSION['SecurityAssist_MemberID']))?$_SESSION['SecurityAssist_MemberID']:"") ."", 2, "");
$comparisons = array(TRUE, "".((isset($_SESSION['RegType']))?$_SESSION['RegType']:"") ."", 1, "1");
$comparisons = array(FALSE, "".(date("Y-m-d")) ."", 5, "".(date("Y-m-d", mktime(0, 0, 0, date("m", strtotime($_SESSION['regDate'])),date("d", strtotime($_SESSION['regDate'])) + 30,date("Y", strtotime($_SESSION['MemberRegistrationDate']))))) ."");
Is this correct?
The final thing is the purchase of the membership. I have a membership cart in place. They would go to the checkout page and that would be populated based on the free membership information. So they proceed to the confirm page.
Would I have a recordset on the confirm page that filters their info by the SecurityAssist_memberID, then have an update behavior that pulls the regType from the cart and updates their membership once the order is submitted? How do I prevent that from updating if the order is declined?