X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   changing months in words to the numerical instead (https://forum.x-cart.com/showthread.php?t=12524)

cotc2001 03-02-2005 08:30 AM

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???

balinor 03-02-2005 08:39 AM

Does the date format in General Settings/Appearance options have effect on it?

cotc2001 03-02-2005 09:20 AM

no i've already got it set as 02-03-05 i.e numericaly

ian_fs 03-02-2005 09:43 AM

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

cotc2001 03-02-2005 09:54 AM

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.

shan 03-02-2005 10:35 AM

yeh not good this.

should be set to numbers instead

never listed as words on cards etc

cotc2001 03-02-2005 10:43 AM

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

shan 03-02-2005 10:49 AM

main/register_ccinfo.tpl

http://smarty.php.net/manual/en/language.function.html.select.date.php

cotc2001 03-02-2005 10:55 AM

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

shan 03-02-2005 10:57 AM

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}



All times are GMT -8. The time now is 03:02 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.