Support Forums

Old 04-26-2006, 09:18 AM   #1
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 17
dawyatt is on a distinguished road
Question case sensitive: coupons?

We are setting up coupons for a few people who will helping us promote our site. They will be given a percentage of each posting they sell. They have been given a coupon code based on their name and the % off a user will get if they enter the unique coupon code.

My question? Is the coupon field case sensitive...? My initial test seemed to indicate that was the case, but it does not seem to be consistance.

Example of a coupon code:

Name of promoter is Julie Roth
Offers customer a 30% discount if they enter in unique code.
Unique code= JRoth 30


Could the problem be spaces in the code? Again, it does not seem to be consistant in my testing...
I am sure it would be easier to just use a numeric code... I like a code the easily identifies my promoter...

Just curious as to anyone's suggestions or solutions...

Thanks...
__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________

Last edited by dawyatt; 04-26-2006 at 09:20 AM.
dawyatt is offline  
Old 04-26-2006, 09:38 AM   #2
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,156
Rep Power: 58
juven14 is a jewel in the rough
Default

As a matter of practice I don't use spaces for inputs. You might do something like JRoth-40 or JRoth40 instead of using spaces.

It doesn't convert it to lowercase, and the coupon is compared to the coupons in the database, which uses coupon=coupon, so it should be case-sensitive.
__________________
TemplateCodes.com
juven14 is offline  
Old 04-26-2006, 12:39 PM   #3
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 17
dawyatt is on a distinguished road
Post

Thanks, Juven14,

I think i will use numeric codes as I don't want to slow up the checkout process if a customer enters the code wrong (ie caps/no caps).... or I may consider some type of mod to convert entry....

Thanks for your input.... I appreciate it....
__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________
dawyatt is offline  
Old 04-26-2006, 01:16 PM   #4
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,156
Rep Power: 58
juven14 is a jewel in the rough
Default

If you'd like I can dig something up to convert user input to lowercase for the coupon comparsion.

EDIT: Here is a solution, if you want it.

Open usercheckout.php and find:
//now see if they entered a coupon
$couponcode=trim(@$_POST['coupon']);

and replace with:
//now see if they entered a coupon
$couponcode=trim(@$_POST['coupon']);
$couponcode = strtolower($couponcode);

This will convert their coupon code to all lowercase and provided you entered the coupon codes via the admin in all lowercase this will match them up.
__________________
TemplateCodes.com

Last edited by juven14; 04-26-2006 at 01:23 PM.
juven14 is offline  
Old 04-26-2006, 01:33 PM   #5
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 17
dawyatt is on a distinguished road
Cool

COOOOOOOOLLLLLL !

I will check it out.....

Thank you!
__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________
dawyatt is offline  
Old 06-22-2006, 01:38 PM   #6
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,156
Rep Power: 58
juven14 is a jewel in the rough
Default

I've just run into this problem myself. The solution I ended up with was to make the cNumber field binary. They are now case-sensitive.

There is a trade off - you will need to input a random number for coupon code via script edit or mysql when creating discounts. Since you can't have duplicate values of ""
__________________
TemplateCodes.com

Last edited by juven14; 06-28-2006 at 11:14 AM.
juven14 is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User login names case sensitive? Chad v3.1 Questions & Support 2 10-27-2006 05:08 PM
How to make search query not case sensitive Maffo v3.1 Questions & Support 10 06-02-2006 02:17 PM
How to set up coupons martini55 v3.0 Questions & Support 4 04-19-2006 05:31 PM


All times are GMT -4. The time now is 02:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0