In our website we have a promotion like "recruit-a-friend".
The first time a new user buys something may indicate the email of a friend during the checkout process.
In this way the friend obtains a discount of 10 Euro for each new users indicate his name..
I added a custom field in order to manage this information.
I would like to show this field only during the first purchase (after the first purchase the promotion is no more valid)
Do you have any suggestion?
I thought to use the "access level" but I need to use in the opposite way (if a user is inside the group "already purchased" he cannot see anymore the custom field)
Alternatively I also thought to modify the view, and use the function:
$user =& JFactory::getUser();
$userGroups = JAccess::getGroupsByUser($user->id, true);
if (!in_array(9,$userGroups)) {
in this case I don't know how to disable only the specific custom fields (I have 2 custom fields).
Thank You