Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

changing months in words to the numerical instead

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-02-2005, 08:30 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default changing months in words to the numerical instead

Just noticed something that seems a bit daft to me, if using manual proccessing for cards (or any cc payment method where you take the details on your own site) instead of have the start and expiry month in words i.e January, Febuary, March etc. etc. shouldn't it be 01, 02, 03 etc. etc. i've yet to see a credit card where it is words instead of numbers.

Anyone know of a way how I can change it to the months by numbers instead???
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #2  
Old 03-02-2005, 08:39 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Does the date format in General Settings/Appearance options have effect on it?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-02-2005, 09:20 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

no i've already got it set as 02-03-05 i.e numericaly
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #4  
Old 03-02-2005, 09:43 AM
 
ian_fs ian_fs is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: Norwich, UK
Posts: 86
 

Default

Another issue with the payment (manual) process is if you have a Maestro Card for example you sometimes do not have a start date.

X-Cart automatically lists the current month and year for both start and end dates.

I think it should be numerical as you said, but also default be:

-- --
01 01
02 02

etc

That way if you dont have a Start Date you can select -- -- instead of X-Cart showing 02 04 as how do you know that their card really did start on 02 04 or that they dont have a start date and x-cart defaults (if it was that month and year) 02 04.

Jez
__________________
X-Cart 4.0.17
Reply With Quote
  #5  
Old 03-02-2005, 09:54 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Yeah i've noticed that as well good idea, in my experience though the start date is pretty much ignored for validation purposes anyway with all card, it seems the expiry date is the only one that is checked.
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #6  
Old 03-02-2005, 10:35 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

yeh not good this.

should be set to numbers instead

never listed as words on cards etc
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #7  
Old 03-02-2005, 10:43 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

there must be a template somewhere which has that drop down box in it, it passes numerics so i guess it's just a case of editing it so that description and value are the same, problem is trying to find it though, cant seem to get the right on in webmaster mode
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #8  
Old 03-02-2005, 10:49 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

main/register_ccinfo.tpl

http://smarty.php.net/manual/en/language.function.html.select.date.php
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #9  
Old 03-02-2005, 10:55 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

ok so we change html_select_date to ???????? I really cant tell from the smarty manual, it only give demonstration code as what is already happening
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #10  
Old 03-02-2005, 10:57 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

try this, not tested live though yet

Code:
{* $Id: register_ccinfo.tpl,v 1.21.2.5 2004/07/27 13:22:52 max Exp $ *} {include file="check_cc_number_script.tpl"} <TR valign="middle"> <TD height="20" colspan="5"><A name="ccinfo"></A>{$lng.lbl_credit_card_information}<HR size="1" noshade></TD> </TR> <TR valign="middle"> <TD align="right">{$lng.lbl_cc_type}</TD> <TD><FONT class="Star">{if $config.General.check_cc_number eq "Y" || $smarty.get.mode eq 'checkout'}*{else}{/if}</FONT></TD> <TD nowrap colspan="3"> {if #safeCCNum# eq ""} <SELECT name="card_type"> {section name=card_type loop=$card_types} <OPTION value="{$card_types[card_type].code}" {if $userinfo.card_type eq $card_types[card_type].code}selected{/if}>{$card_types[card_type].type}</OPTION> {/section} </SELECT> {if $smarty.get.err eq 'fields' && $userinfo.card_type eq ''}<FONT class="Star">&lt;&lt;</FONT>{/if} {else} {#safeCCType#} <INPUT type="hidden" name="card_type" value="{#safeCCType#}"> {/if} </TD> </TR> <TR valign="middle"> <TD align="right">{$lng.lbl_cc_name_explanation}</TD> <TD><FONT class="Star">{if $config.General.check_cc_number eq "Y" || $smarty.get.mode eq 'checkout'}*{else}{/if}</FONT></TD> <TD nowrap colspan="3"> {if #safeCCNum# eq ""} <INPUT type="text" name="card_name" size="32" maxlength="50" value="{if $userinfo.card_name ne ""}{$userinfo.card_name}{else}{$userinfo.b_firstname} {$userinfo.b_lastname}{/if}"> {if $smarty.get.err eq 'fields' && $userinfo.card_name eq ''}<FONT class="Star">&lt;&lt;</FONT>{/if} {else} {#safeCCName#} <INPUT type="hidden" name="card_name" value="{#safeCCName#}"> {/if} </TD> </TR> <TR valign="middle"> <TD align="right">{$lng.lbl_cc_number_explanation}</TD> <TD><FONT class="Star">{if $config.General.check_cc_number eq "Y" || $smarty.get.mode eq 'checkout'}*{else}{/if}</FONT></TD> <TD nowrap colspan="3"> {if #safeCCNum# eq ""} <INPUT type="text" name="card_number" size="32" maxlength="20" value="{if $smarty.get.err eq 'fields'}{$userinfo.card_number}{/if}"> {if $smarty.get.err eq 'fields' && $userinfo.card_number eq ''}<FONT class="Star">&lt;&lt;</FONT>{/if} {else} {#safeCCNum#} <INPUT type="hidden" name="card_number" value="{#safeCCNum#}"> {/if} </TD> </TR> {if $config.General.uk_oriented_ccinfo eq "Y"} <TR valign="middle"> <TD align="right">{$lng.lbl_cc_validfrom}</TD> <TD></TD> <TD nowrap> {html_select_date prefix="card_valid_from_" month_format="%m" display_days=false start_year="-5" end_year="+4"} </TD> <TD></TD> <TD>{$lng.lbl_cc_leave_empty}</TD> </TR> {/if} <TR valign="middle"> <TD align="right">{$lng.lbl_cc_expiration}</TD> <TD><FONT class="Star">{if $config.General.check_cc_number eq "Y" || $smarty.get.mode eq 'checkout'}*{else}{/if}</FONT></TD> <TD nowrap colspan="3"> {if #safeCCNum# eq ""} {html_select_date prefix="card_expire_" month_format="%m" display_days=false end_year="+5" time=$userinfo.card_expire_time} {else} {#safeCCExp#} <INPUT type="hidden" name="card_expire" value="{#safeCCExp#}"> {/if} </TD> </TR> {if $payment_cc_data.disable_ccinfo eq "N" || ($payment_cc_data.disable_ccinfo eq "" && $config.General.enable_manual_cc_cvv2 eq 'Y')} <TR valign="middle"> <TD align="right">{$lng.lbl_cc_cvv2}</TD> <TD><FONT class="Star">{if $config.General.check_cc_number eq "Y" || $smarty.get.mode eq 'checkout'}*{else}{/if}</FONT></TD> <TD nowrap colspan="3"> {if #safeCCNum# eq ""} <TABLE cellspacing="0" cellpadding="0" border="0"> <TR> <TD valign="middle"><INPUT type="text" name="card_cvv2" size="4" maxlength="4" value="{if $smarty.get.err eq 'fields'}{$userinfo.card_cvv2}{/if}"></TD> <TD valign="middle">{include file="main/popup_help_link.tpl" section="cvv2"}</TD> {if $smarty.get.err eq 'fields' && $userinfo.card_cvv2 eq ''} <TD><FONT class="Star">&lt;&lt;</FONT></TD> {/if} </TR> </TABLE> {else} {#safeCCcvv2#} <INPUT type="hidden" name="card_cvv2" value="{#safeCCcvv2#}"> {/if} </TD> </TR> {/if} {if $config.General.uk_oriented_ccinfo eq "Y"} <TR valign="middle"> <TD align="right">{$lng.lbl_cc_issueno}</TD> <TD></TD> <TD nowrap> <INPUT type="text" name="card_issue_no" size="4" maxlength="2" value=""> </TD> <TD></TD> <TD>{$lng.lbl_cc_leave_empty}</TD> </TR> {/if}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:40 AM.

   

 
X-Cart forums © 2001-2020