Jump to content
Sign in to follow this  
ozysean

Credit Card Month Dropdown

Recommended Posts

Can anyone tell me where the names of the months that come up in the dropdown menu are?

They are defaulted to the names, January, Feb.... etc but I want to change them to the numbers of the month as that is the way the date is displayed on the credit card.

I cant find this in the database or any of the language files I have looked in.

 

Any help would be much appreciated!

 

Thanks,

 

Sean

Share this post


Link to post
Share on other sites

catalog/includes/modules/payment/cc.php

 

Find:

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

 

Replace by:

	  for ($i=1; $i<13; $i++) {
	$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
  }

Share this post


Link to post
Share on other sites

This thread is a year old but here is the solution. This is a very simple edit.

 

Same page as stated above. The change is ONE character from an uppercase B to a lowercase m

 

Current Code

 for ($i=1; $i<13; $i++) {
       $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%[size=6]B[/size]',mktime(0,0,0,$i,1,2000)));
     }

 

Desired changes Code

for ($i=1; $i<13; $i++) {
       $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%[size=6]m[/size]',mktime(0,0,0,$i,1,2000)));
     }

 

That worked for us

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×