Credit Card Expiry Date Length
I notice the CC expiry date is only 4 digits and doesn't seem to cater for customers who format it incorrectly e.g. put a space/dash/slash in between the numbers e.g. 04-06 which would end up as 04-0 on the order.
I guess you can change the field length easily? What is the ratio of having to contact people who put the number in wrongly or am I worrying too much? :wink: Thanks Dan |
You can always create two drop downs for the exp. date and then re-combine the values in payment_cc.php
|
code for combining two fields using php?
Hi boomer,
What code is used to join 2 fields? Thanks, Chris |
same problem for me
same problem for me 5 percent of the customers make this mistake,,
is there any way to solve this problem? |
The X-Cart team have given me the instructions to make my field size bigger which will work with offline payments:
Quote:
For the select boxes, and I need some guidance here, I was thinking of changing this code in register_ccinfo.tpl: Code:
<input type=text name=card_valid_from size=4 maxlength=4 value=""> to something like: Code:
<select name=card_expire_month> and then concatenating the two fields like so in payment_cc.php: Code:
$order_details = ""; This is just a guess based on reading some information on concatenating strings in php. Am I on the right track? Dan |
Dan, your modifications look good to me.
Yes, . (period) is the concat equivalent to combine two strings. :wink: |
Code question
What changes need to be made to the code? My specific concern is the value="{$userinfo.card_expire}"
Original code in the register_ccinfo.tpl: <input type=text name=card_expire size=4 maxlength=4 value="{$userinfo.card_expire}"> New code in the register_ccinfo.tpl: <select name=card_expire_month> <option value="01">01</OPTION> <option value="02">02</OPTION> <option value="03">03</OPTION> <option value="04">04</OPTION> <option value="05">05</OPTION> <option value="06">06</OPTION> <option value="07">07</OPTION> <option value="08">08</OPTION> <option value="09">09</OPTION> <option value="10">10</OPTION> <option value="11">11</OPTION> <option value="12">12</OPTION> </select> <select name=card_expire_year> <option value="04">2004</OPTION> <option value="05">2005</OPTION> <option value="06">2006</OPTION> <option value="07">2007</OPTION> <option value="08">2008</OPTION> <option value="09">2009</OPTION> <option value="10">2010</OPTION> <option value="11">2011</OPTION> <option value="12">2012</OPTION> </select> Thanks, Chris |
Not sure of your version of X-Cart but I'm on 3.5.4 and the code is:
Code:
<input type=text name=card_expire size=4 maxlength=4 value=""> I still haven't tried this hack yet though :wink:. I'm not sure what your code you posted is trying to do, as it looks like the $userinfo.card_expire has already been given a value, so I would guess the change needs to happen elsewhere, at an earlier stage perhaps. Maybe some of the guru's would like to comment. Dan |
CC Expiry Date Problems
I have also had about 7% of my orders with the CC expiry date jacked up. Since the field is only 4 digits it doesn't seem to cater for customers who format it incorrectly e.g. put a space/dash/slash in between the numbers e.g. 04-06 or more often 1/06, which doesn't allow me to process the order and delays shipment, which tends to make customers unhappy.
The cart performance is a direct reflection of the type of business I run, so I would like to resolve the issue quickly. Since I'm still not an expert, I would appreciate EXACT instructions from a "Guru" who can tell me how to perform the mod. What I've found in this post doesn't exactly give me the confidence I need to move forward, too many unanswered questions... Thanks, |
skin1/main/register_ccinfo.tpl
find: Code:
<tr valign=middle> Comment or remove the above code, replace it with: Code:
<tr valign=middle> Now edit include/register.php After hacking attempt print (around line 51) add: Code:
$card_expire = $card_expire_Month.substr($card_expire_Year,2,2); donations: paypal@molotovbliss.com :!: I'm also moving this thread to Custom Mods |
All times are GMT -8. The time now is 07:11 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.