| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Credit Card Expiry Date Length | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
Thanks for the code Boomer (much more efficient than my attempt )!
This works on my 3.5.4 version up to a point, but the value is not present on the order email. I'm doing offline processing if that matters. Just wondering if there's anything obvious that may be stopping it being output? Many thanks Dan
__________________
4.4.2 and 4.6.1 |
|||||||
#22
|
|||||||
|
|||||||
Finally, seem to have got it to work. The only difference being I put the:
Code:
Statement in payment/payment_cc.php where I originally put the concatenating code in my original example, so: Code:
Now I get a 2 digit month and year. I'm off now to do the same with the "valid from" date. Oh, I've also used the numerical equivalent for the displaying of month seen as CC's only use digits -believe you me, some people have difficulty trying to work out the numeric value of a month so best keep things simple, so: Code:
noting the month_format=%m attribute. Dan Dan
__________________
4.4.2 and 4.6.1 |
|||||||
#23
|
|||||||
|
|||||||
Javascript help
OK, using the examples I have written about above, I've successfuly created dropdown boxes for the expiry and valid from dates using the smarty function, html_select_date. The problem I have now is when I switch CC validation on the Javascript cc checking function falls flat as it's checking the default $expire_date value. At the moment I'm getting two values that are eventually concatenated:
card_expire_Month e.g. 06 card_expire_Year e.g. 2004 I was trying to be clever in altering the cc validating javascript by changing function checkExpirationDate in check_cc_number_script.tpl by replacing: Code:
with: Code:
to concatenate the month and the last two digits of the year from these Smarty select boxes. Now I get a javascript error saying "card_expire_Month" is undefined. Any ideas on how to sort this before I remove the expiry date checking javascript altogether? Thanks Dan
__________________
4.4.2 and 4.6.1 |
|||||||
#24
|
|||||||
|
|||||||
fix for javascript and linkpoint
Actually, if you're using the drop-down method seen in earlier posts, there's really no reason to re-validate with the javascript. (Since it only checks for string value entry errors, and presumably, these kind of errors would no longer exist.....) With that in mind, I just skipped the expiration date-checking js altogether by changing the following in checkout.tpl. Change it from this (at around line 53):
to this: That takes care of the js errors. ....Also, I use linkpoint and had to change the following on lines 59 and 60 in the cc_linkpoint.php file to reflect the new post variables. (There's no need to search for individual entries in the card_expire string.....), so change from this: Code:
to this: Code:
You may need to do something similar with other payment gateways.
__________________
www.markroyko.com |
|||||||
#25
|
|||||||
|
|||||||
Looks like there are a couple different versions floating around of this mod. Once all the bugs are worked out could someone post a final version of this mod?
TIA!
__________________
X-Cart Gold various versions Tahoe Web Design WebsiteCM.com - We recommend WebsiteCM |
|||||||
#26
|
|||||||
|
|||||||
OK, I worked out how to have a blank month and year added to the valid from date select boxes (as it looks odd if there's an entry and you don't actually need it) by adding:
Code:
so it looks like: Code:
But, I can't work out how to have the blank boxes selected by default. I've searched on Google and looked at various smarty pages, but the closest I can find is using the time attribute but that only works with dates. Anyone know how to do this? Thanks Dan[/code]
__________________
4.4.2 and 4.6.1 |
|||||||
#27
|
|||||||
|
|||||||
I'm working on the same thing as above...I've managed to get the Year dropdown to default to "Select a Year", but the Month defaults to December now, wheras previously it was defaulting to the current month.
The closest I've come to finding an explanation is on another forum located at: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=5198&highlight=htmlselectdate and http://www.phpinsider.com/smarty-forum/viewtopic.php?t=6141&highlight=htmlselectdate I'm still trying to figure out how to get the month to default to month_empty="Select Month". This is the link to the {html_select_date} custom function: http://smarty.php.net/manual/en/language.function.html.select.date.php
__________________
-John |
|||||||
|
|||
X-Cart forums © 2001-2020
|