Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pull down menu on checkout_payment.php


djm

Recommended Posts

Posted

On the checkout_payment.php page I want to change how the expiration months are shown. Instead of having the months, I want to have the numbers that represent the months. For example, instead of January, I want it to say 01. Is there a way to do this?

 

I use Authorize.net as my gateway.

 

 

-Dwight

Posted

It's done in the payment module you use, so I guess that would be modules/payment/authorize.php

 

look inthere, it's probably done through PHP date function and not with a simple html dropdown. But it is where you should look.

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

Thanks mattice,

 

You are right, it doesnt use html format.

 

How can I change the code to represent the month numbers?

 

 

-Dwight

Posted

includes/modules/payment/cc.php

 

About line 43

 

look for:

$expires_month[] = array(

 

Mine reads:

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

 

Where everything after the "=>" is what is displayed. Mine reads like:

 

01 - January

02 - February

 

etc.

 

If you just want to display 01,02, etc. take out the

 

. ' - ' . strftime('%B',mktime(0,0,0,$i,1,2000))

 

Making it:

 

$expires_month[] = array('id' => sprintf('%02d', $i), 'text' =>  sprintf('%02d', $i));

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...