Remove 0,O,1,l from Gift Cert Generator? |
Post Reply
|
| Author | ||
TrekLightGear
Groupie
Joined: 24-April-2007 Location: Boulder, CO Online Status: Offline Posts: 76 |
Post Options
Quote Reply
Topic: Remove 0,O,1,l from Gift Cert Generator?Posted: 30-April-2012 at 1:15pm |
|
|
Hi -
I thought I remembered a post on this a long while back but have been unable to find the answer in the forum or Wiki. I'd like to continue using ProductCart's built-in Gift Certificate code generator but I want to prevent it from including commonly confused characters like 0,O and 1,l. Can anyone tell me the easiest way to modify DefaultGiftCode.asp to prevent these characters from being included in the random generator? Thanks! |
||
|
Seth Haber
|
||
![]() |
||
Sean@WMS
Certified ProductCart Developers
Joined: 26-April-2009 Location: United States Online Status: Offline Posts: 851 |
Post Options
Quote Reply
Posted: 04-May-2012 at 10:38pm |
|
|
You should be able to simply find:
and change that to:
|
||
![]() |
||
TrekLightGear
Groupie
Joined: 24-April-2007 Location: Boulder, CO Online Status: Offline Posts: 76 |
Post Options
Quote Reply
Posted: 07-May-2012 at 4:19pm |
|
|
Thanks Sean. I'm on v4.1a SP2 still and my code appears differently:
'--- Start Generating Gift Code - This is just SAMPLE CODE Tn1="" For w=1 to CodeStrLen Randomize myC=Fix(3*Rnd) Select Case myC Case 0: Randomize Tn1=Tn1 & Chr(Fix(26*Rnd)+65) Case 1: Randomize Tn1=Tn1 & Cstr(Fix(10*Rnd)) Case 2: Randomize Tn1=Tn1 & Chr(Fix(26*Rnd)+97) End Select Next '--- Finish Generating GiftCode '--- END OF GIFT CERTIFICATE CODE GERNERATOR Thoughts? |
||
|
Seth Haber
|
||
![]() |
||
Sean@WMS
Certified ProductCart Developers
Joined: 26-April-2009 Location: United States Online Status: Offline Posts: 851 |
Post Options
Quote Reply
Posted: 07-May-2012 at 10:00pm |
|
|
I see.
The code here is much friendlier in 4.5. PM me and I'll get you ironed out on this.
|
||
![]() |
||
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |