Community Add-Ons
| Maintainers: | alexjudd |
Credit Card Expires Month set to current month
for osCommerce Online Merchant v2.2
A very simple modification to make the default expiry month of the credit card to be the current month of the year, not January as it is by default.
This means that the customer, and shop owner when testing, start with a valid expiry month.
/includes/modules/payment/cc.php
Ln: 85 (add)
$today_month = $today['mon'];
Ln: 94 (modify)
[replace]
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year))));
[with]
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month, $today_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year))));
A very simple modification to make the default expiry month of the credit card to be the current month of the year, not January as it is by default.
This means that the customer, and shop owner when testing, start with a valid expiry month.
/includes/modules/payment/cc.php
Ln: 85 (add)
$today_month = $today['mon'];
Ln: 94 (modify)
[replace]
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year))));
[with]
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month, $today_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year))));
