Welcome to WebmasterWorld Guest from 50.17.5.36

Forum Moderators: buckworks

Message Too Old, No Replies

Need to generate random coupon codes

Any coupon code generators out there?

     
7:00 pm on Aug 1, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:June 11, 2007
posts:45
votes: 0


I'm looking for a small program or script (PHP) that will generate random alphanumeric coupon codes for our ecommerce site. Can anyone point me in the right direction?

Thanks,
Ron

8:22 pm on Aug 1, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 28, 2004
posts: 1786
votes: 0


Did you check the contributions on osCommerce?

-Corey

8:39 pm on Aug 1, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:June 11, 2007
posts: 45
votes: 0


Hi Corey.
We already have our own site/system where we can create discount coupons, but we have to come up with our own code ID's. I'm looking for a small program or script that will simply generate random (alphanumeric) ID's for our coupons. Kind of like those Lottery number generators...

- Ron

8:46 pm on Aug 1, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts: 2143
votes: 7


Is this for people to use the coupon or for your records? You code generate a session ID for each coupon. I don't know the code for PHP, but in ASP it's

<% Response.Write(Session.SessionID) %>

Marshall

9:06 pm on Aug 1, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:June 11, 2007
posts:45
votes: 0


As it is now, I create the coupon in our system to give out (or advertise) to our customers. The coupon ID is the "code" that the customer will enter to receive their discount. And, right now, I have to manually come up with the code ID every time I create a coupon. For example, "ABC123" is the ID for a coupon offering 10% off.

Sure...it's not a big deal to make these up myself. I was just curious if there was something out there to create an ID randomly.

- Ron

9:24 pm on Aug 1, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 13, 2002
posts:662
votes: 0


Just do a quick search for a password generator script, or alpha numeric generator script.

You should get tons of results.

9:37 pm on Aug 1, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:June 11, 2007
posts:45
votes: 0


Thanks, Gibble!
You're right, there's quite a few. I should have been thinking "password" and not "coupon".

- Ron