View Full Version : promo code option
dru_nasty
August 31st, 2005, 12:24 AM
This sportsbook site I've been working on (for) is going to blast a campaign to offer a weeks trial of the sports picks. (all access for one week)
I'm very infant when it comes to working with a database and php, but the site was already in place before I came along. There's already a promo code ability there, I just need to figure out how to go about this.
When a new user registers to our site they'll enter the promo code given.
Upon entering the site they'll have accesss to our picks for a week. Once a week is up they no longer have access to those picks. Also, they'll have to be some kind of random promo code generation, so the person can't sign up again with the same code. If someone can point me in the right direction, or break down some steps I need to take (and some things to search). I've came a long way with my knowledge of php/mySQL so far with this project, and I'm not giving up until I know it in and out.
Any help you know is appreciated :beer:
hl
August 31st, 2005, 12:36 AM
i can help you 3:30PM eastern tommorow on AIM or MSN :)
info in profile.
dru_nasty
August 31st, 2005, 07:59 AM
I'm at my day job all week (m-f) til 5pm (eastern). And I don't have access there. Would you have any time between now and Sunday to work through some things?
We're sending out a 20k email blast Monday, and I need this to be functional.
There's definitely a little $ I can throw your way for your involvement.
I put your AIM address in my list, I'll keep an eye out for ya. But let me know a time (if possible) this week (after 5) or weekend (anytime) that I can contact you.
Thanks so much.
bwh2
August 31st, 2005, 09:52 AM
When a new user registers to our site they'll enter the promo code given....Once a week is up they no longer have access to those picks...Also, they'll have to be some kind of random promo code generation, so the person can't sign up again with the same code.
assuming you know how many codes you're going to send out (you should b/c you're probably sending one w/each e-mail)...
steps:
1) make db with all randomly generated codes (i can help you w/this)
2) user registers w/promo code
2a) check db to see if code exists (if yes, goto 2b. if no, goto 3)
2b) check db to see if code is assigned to a user already (if yes, goto 3. if no, goto 2c)
2c) check db to see if code is expired (if yes, goto 3. if no, goto 4)
3) give error message
4) activate code
4a) set expiration date/time in db
4b) assign username to code in db
that should be the general jist of what you're doing. if i were you, i would draw this out on paper in a decision tree format. that makes your if statements a little easier to understand.
dru_nasty
August 31st, 2005, 10:13 AM
Bwh2, that helps me out greatly with figuring out how to attack this. Let's just see if I'm up to the task of making it happen. As far as how many codes need to be sent out. It'll be however many we get on the mailing list. Most likely 20,000. So it is possible to randomly generate promo codes which will be sent along with the email?
If you could better explain #1 in your steps, I'd appreciate it.
Thanks:beer:
cholin
August 31st, 2005, 10:16 AM
Im also available to help you out with this if you want. Give me a shout on MSN (cholin at gmail dot com) if you need some help coding this or something.
bwh2
August 31st, 2005, 10:32 AM
So it is possible to randomly generate promo codes which will be sent along with the email?well, what program or whatever are you using to send out your e-mails? i would think it's mostly up to the ability of that program.
as far as the random filename, look at the randomCode function in this post:
http://kirupa.com/forum/showpost.php?p=1592338&postcount=5
basically you will loop through 20,000 times a function that:
1) generates a random code
2) inserts the random code into the db
how you setup your db really depends on how you want the site to function. if you want a code to match up to each user (one user could not use someone else's code), you could insert that in your db from the start. if you want users to be able to use potentially multiple or someone else's code, then you would not assign a user to the code from the start but rather would do it in step 2b as i have described.
hl
August 31st, 2005, 03:50 PM
sure i'll be on after 5 eastern :) feel free to IM me. i'm sure i'll be help you a lot better live rather then on a forum. this is just because you have so much stuff and no basis yet. and yes i'd love money :)
dru_nasty
September 1st, 2005, 07:16 PM
If anyone can lend a hand on this the files are at http://homepage.mac.com/dru6.
We're not going to do a promo code, we just want to offer free access for one week only to any new registering user.
Thanks to anyone that takes this up.
email me if you can at dru6atmac.com and I'm on AIM right now- dru6atmac.com as well.
Hopefully I can get a helping hand.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.