Using Coupon And Custom Text Fields

Discussion in 'Customization & add-ons' started by jcary, Jun 11, 2003.

  1. jcary

    jcary Guest

    Hey Alex et al. --

    I want to offer a select group of people "a free widget" for becoming a member of my site. They wouldn't receive a discount on membership, but I would give them a free widget. On the sign-up page, I want to add a place for "Enter Promo Code" so I can tell who qualifies for the free widget.

    I tried testing the coupon approach but in my control panel, I click on Coupon > Generate Coupon and nothing happens. There's a link there but clicking on it just returns the same 'Coupon Batches' page. What am I doing wrong with that section?

    Would an easier approach be to add a customized text field in the sign up form? I noticed the thread you spelled this out in (http://www.cgi-central.net/forum/index.php?act=ST&f=7&t=855). What would the code look like if I wanted to add an optional field in my sign up form called "Promo Code"?

    Would I then get the promo code in my admin "new payment" email?

    Thanks Alex. Great product.

    Josh
  2. alex-adm

    alex-adm Guest

    About coupons - you have to enable "Use Coupons" at aMember CP => Setup => Advanced

    For your goal, it is easy to add customized field to signup form - see FAQ forum -> "Adding Fields"
  3. jcary

    jcary Guest

    Hi Alex,

    For some reason, after I enabled "use coupons" in the setup >advanced section, it still doesn't allow me to "generate coupons." The link clicks but just comes back to the same exact page.

    Also, to add an optional "promo code" field I'd have to add something like this to the admin/config.inc.php
    Code:
    add_member_field('phone', 'Phone',
     'text', 'phone number of customer');
    I kinda get all that but I'm not sure what each variable means. For my purpose of a simple promom code inputed would I enter
    Code:
    add_member_field('promo', 'Promo',
     'text', 'promo code');
    Then what would the text field on the signup.php I need to add: <input type=text name=promo> ? Will this pass the promo code back to me in the admin "new payment" email?

    Thanks.

    Josh
  4. alex-adm

    alex-adm Guest

    Josh, please split different questions to different topics - it would be easier to reply and it will be easier to understand my reply ;)
    It is valid not for this forum only...

    About coupons, may i see it? I need admin login info. Seems there is a bug.

    About fields - everything is correct. TO receive code with payment, edit
    amember/templates/admin/mail_payment.txt
    and add:
    Code:
    Promo code: {$user.data.promo}
  5. jcary

    jcary Guest

    Hey Alex,

    Ok, I'll leave the coupon part alone for now in this thread (I'd rather focus on the extra field)!

    Regarding the Adding Extra Field: As you stated, I added this code to the admin/config.inc.php file
    Code:
    add_member_field('promo', 'Promo',
    'text', 'promo code');
    and added this code to the signup.html template
    Code:
    <input type=text name=promo size=18 maxlength=15>
    and added this code to the amember/templates/admin/mail_payment.txt file
    Code:
    Promo code: {$user.data.promo}
    I tried signing up as a user, while providing a promo code in the signup form and I didn't receive the text contents of the promo code in the email. Does the word promo in the {$user.data.promo} need to be capped (Promo instead of promo)?

    Any suggestions? Thanks.

    Josh
  6. alex-adm

    alex-adm Guest

    It is stated about amember/config.inc.php, not about amember/admin/config.inc.php

    I hope it is only reason and it will resolve entire issue.
  7. Quaor

    Quaor Guest

    Hi Alex - you state
    "TO receive code with payment, edit
    amember/templates/admin/mail_payment.txt
    and add:

    CODE
    Promo code: {$user.data.promo}"

    but no such file mail_payment.txt - is this amemberpro only?
  8. alex-adm

    alex-adm Guest

    IT IS ALL FOR AMEMBER PRO ;) lol

Share This Page