Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Edit month drop down menu


danthman

Recommended Posts

My client wants numbers added to the month of the year in the month drop down menu credit card payment module. I cannot find an area to edit anywhere. Does anyone know how this can be edited?

includes/modules/cc.php

 

find this

 

function selection() {

global $order;

 

for ($i=1; $i<13; $i++) {

$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));

}

change to this

 

function selection() {

global $order;

 

for ($i=1; $i<13; $i++) {

$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => ($i<10? '(0':'(') . $i . ') ' . strftime('%B',mktime(0,0,0,$i,1,2000)));

}

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

You want to replace the month names with the numbers instead?

January - 01

February - 02

.

.

etc.

 

For the standard CC module?

 

Yes, I want it exactly as you wrote it, January - 01, February - 02, ...

 

It's in the Paypal WWP module.

Link to comment
Share on other sites

:-) ... I put the numbers first as you cannot format in two columns in dropdowns and alignment looks nasty if the numbers are after the month names ...

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...