Pre-Activated Accounts

Discussion in 'Customization & add-ons' started by mjmtaiwan, Mar 29, 2009.

  1. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    I meet a lot of people in my job and I want to give some of them a free trial membership. I'd like to hand out a business card with a unique username and password combination that is date independent so that when the user logs in the trial period then begins.

    Its no good creating a bunch of users and then printing the cards because by the time I hand them out they will be long expired.

    Anyone have a clue as to how this can be managed?
  2. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    Not exactly what you want but I had a client that wanted to sell pre-paid membership cards. So I used aMember to create 100% discount coupons. Each coupon had a different ID. I then exported the created coupon_id's into a .csv file from aMember database. I then imported the .csv file into my business card software. The business card software could then read the coupon_ids and print the coupon_id onto the card. On the front of business card was the client's membership .JPEG. On the back had the coupon_id which we called activation code with instructions on how to activate the membership. I modified all of the aMember templates to say "activation code" instead of "coupon". This worked out really well, people are use to the activation terminology from using prepaid phone cards. In this case when they sign-up they pick there own username/password and just have to enter the activation code and viola they are signed up to a certain membership level/duration.

    The coupons were of the one and done variety so that the same activation code could not be used more than once.

    Jimmy
  3. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    Jim,

    That is a great idea. Trouble is I already use coupons. I wonder if there is away to do two different classes of coupons.

    Mike
  4. jenolan

    jenolan aMember Coder

    Joined:
    Nov 3, 2006
    Messages:
    510
    Duplicate the coupon box, and change the text to activation code they will not know it is the same thing.
  5. mjmtaiwan

    mjmtaiwan aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    45
    Isn't there more I would have to do as far as the php stuff? I am sure that I'd have to change something.
  6. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    I remember changing templates, the language file, and I had to change mysql.inc.php since it had strings referencing coupon on error cases such as following:

    PHP:
        function coupon_get($code$member_id null$locked_ignore=0){
            
    $coupons $this->get_coupons('code'$code);
            if (!
    count($coupons))
                return 
    "Coupon not found, please check coupon code";
            
    $coupon $coupons[0];
            if (
    $statement = ($locked_ignore) ? $coupon['locked'])
                return 
    "Coupon locked, please contact webmaster";
            if (
    $coupon['used_count'] >= $coupon['use_count'])
                return 
    "Coupon is already used";
            if (
    $coupon['used_count'] >= $coupon['use_count'])
                return 
    "Coupon is already used";
            if (
    $coupon['begin_date'] && ($coupon['begin_date'] != '0000-00-00')
                && (
    $coupon['begin_date'] > date('Y-m-d')))
                return 
    "Coupon cannot be used yet";
            if (
    $coupon['expire_date'] && ($coupon['expire_date'] != '0000-00-00')
                && (
    $coupon['expire_date'] < date('Y-m-d')))
                return 
    "Coupon expired";

            if (
    $member_id 0){
                
    $member_used_count 0;
                if (
    $coupon['member_use_count'] && $member_id){
                    foreach (
    split(';'$coupon['used_for']) as $s){
                        list(
    $p,$pr,$m) = split(',',$s);
                        if (
    $m == $member_id$member_used_count++;
                    }
                    if (
    $member_used_count >= $coupon['member_use_count']){
                        return 
    "Coupon is already used";
                    }
                }
            }

            return 
    $coupon;
        }

    Why those strings were not put into language file is a mystery to me.

    Anyway like I said it worked out very well.

    Jimmy
  7. mathhands

    mathhands New Member

    Joined:
    Jan 24, 2008
    Messages:
    1

    I have tried this but .. when a customer enters the coupon with 100% discount, they are then forward to paypal to pay for '0' dollars..

    does anyone know how to fix this?

    thx
  8. sharris203

    sharris203 New Member

    Joined:
    Feb 27, 2009
    Messages:
    45
    If you set the coupon for more than the membership price it will bypass Paypal altogether and go straight to the thank you page.

Share This Page