![]() |
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??? |
Does the date format in General Settings/Appearance options have effect on it?
|
no i've already got it set as 02-03-05 i.e numericaly
|
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 |
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.
|
yeh not good this.
should be set to numbers instead never listed as words on cards etc |
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
|
|
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
|
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 $ *} |
Yup that works perfectly, now just got to sort out the issue with the protx direct script adding a + symbol in place of symbols and passing the order description, never bloody finished is it!!!!!
|
Spoke to x-cart about it, told them that general opinion in the forum is that it is silly the way they display it at the moment and they agreed that in future releases it would be shown numerically (like they do on the acutal credit cards) RESULT!!!
|
Still Months in a recent 4.0.15 upgrade...
For anyone needing the change, it is only: Find: Code:
<TR valign="middle"> Replace with this: Code:
<TR valign="middle"> |
To make the credit card month drop-down menu extra clear, I prefer the format:
01 - Jan 02 - Feb 03 - Mar etc. If you would like this format, simply modify... File: /main/register_ccinfo.tpl And add: month_format="%m - %b" to this part of the template code: Code:
{html_select_date prefix="card_expire_" month_format="%m - %b" display_days=false end_year="+10" time=$userinfo.card_expire_time} Robert |
How do I get the year to read:
05 06 07 08 09 etc rather than the 4 digit default? I thought it might be the time attribute but it's already got time=$userinfo.card_expire_time and I'm not sure where $userinfo.card_expire_time is set? Thanks Dan |
Quote:
You will need to experiment, but here's some tips to help you get started... just as we used "%m" for the 2-digit month (see above posts), you will need to use "%y" for the 2-digit year (note: lower-case "y"). In the File: /main/register_ccinfo.tpl You will probably need to specify the format, such as: year_format="%y" or date_format="%y" From the Smarty site: %y - year as a decimal number without a century (range 00 to 99) %Y - year as a decimal number including the century Here's some Smarty links for more details: http://smarty.php.net/manual/en/language.modifier.date.format.php and http://smarty.php.net/manual/en/language.function.html.select.date.php Good luck and post your results here when you get a chance. Robert |
Thanks, hmmm, I'll give that another go as I think that's what I tried this morning...I'll post back if it works.
Dan |
No, neither of those worked. I'm thinking I should actually be adjusting the time attribute as it says "timestamp/YYYY-MM-DD" but I'm not sure if I can replace $userinfo.card_expire_time...
Dan |
Re: changing months in words to the numerical instead
Quote:
I contacted support with the same problem & received the following reply: To implement this you should modify the 'skin1/main/register_ccinfo.tpl' file. Find the following fragments: a. --------------------------------------- {html_select_date prefix="card_valid_from_" display_days=false start_year="-5" end_year="+4"} --------------------------------------- b. --------------------------------------- {html_select_date prefix="card_expire_" display_days=false end_year="+10" time=$userinfo.card_expire_time} --------------------------------------- and replace it with this codes: a. --------------------------------------- {html_select_date prefix="card_valid_from_" display_days=false start_year="-5" end_year="+4" month_format="%m"} --------------------------------------- b. --------------------------------------- {html_select_date prefix="card_expire_" display_days=false end_year="+10" time=$userinfo.card_expire_time month_format="%m"} --------------------------------------- It worked for me. |
All times are GMT -8. The time now is 01:02 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.