PDA

View Full Version : Using Coupon And Custom Text Fields


jcary
06-11-2003, 02:29 PM
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

alex-adm
06-11-2003, 06:39 PM
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"

jcary
06-12-2003, 02:10 PM
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 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 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

alex-adm
06-12-2003, 06:01 PM
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:
Promo code: {$user.data.promo}

jcary
06-13-2003, 10:29 AM
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 add_member_field('promo', 'Promo',
'text', 'promo code');
and added this code to the signup.html template <input type=text name=promo size=18 maxlength=15>
and added this code to the amember/templates/admin/mail_payment.txt file 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

alex-adm
06-13-2003, 04:45 PM
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.

Quaor
07-23-2003, 07:03 AM
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?

alex-adm
07-25-2003, 07:48 PM
IT IS ALL FOR AMEMBER PRO ;) lol