View Single Post
  #5  
Old 03-01-2004, 07:07 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

The X-Cart team have given me the instructions to make my field size bigger which will work with offline payments:

Quote:
You can increase the length of the field, just edit the 'skin1/main/register_ccinfo.tpl' template and replace the line

Code:
<input type=text name=card_expire size=4 maxlength=4 value="">

with

Code:
<input type=text name=card_expire size=5 maxlength=5 value="">
Also, you should apply the following patch under the "Patch/upgrade -> Apply SQL patch" section of the admin interface:

Code:
alter table xcart_customers modify card_expire varchar(5) NOT NULL default '';

However, if you are going to use a credit card processor (not manual processing), a slight additional modification will be required.

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> <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="01">2001</OPTION> <option value="02">2002</OPTION> <option value="03">2003</OPTION> <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> etc etc etc </select>

and then concatenating the two fields like so in payment_cc.php:

Code:
$order_details = ""; [THIS BIT HERE!] $card_expire = $card_expire_month . $card_expire_year;

This is just a guess based on reading some information on concatenating strings in php. Am I on the right track?

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote