Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Mod CC month drop down menu?

Mod CC month drop down menu?

Locked

Views: 1,375

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
9 Sep 2006, 3:54 AM
#1
re_active avatar

re_active

New Zenner

Join Date:
May 2006
Location:
Bay area, California
Posts:
10
Plugin Contributions:
0

Mod CC month drop down menu?

Greetings all Zenners!

I've spent a couple of months walking around and setting up a new Zen cart install.
The search function on this support forum has helped me solve many issues and answered many questions but this one has me a little stumped.

I have installed Innovative gateway module (and modified for CVV2). It works correctly.

What I want now is to modify the month drop down menu text in the CC checkout page from January,February etc to January-01, February-02 and so forth. (I have another ecommerce site and am constantly surprised by how many people can't count their months off their credit cards...)
Anyway where would I start looking to find the month list?

Thanks in advance.

Keep up the excellent work folks!

Br

9 Sep 2006, 5:14 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mod CC month drop down menu?

See if you don't have in the function selection() of the Payment Module a spot where it builds the content for the dropdown ...

You could adapt the code for what you are wanting ...

9 Sep 2006, 7:21 AM
#3
re_active avatar

re_active

New Zenner

Join Date:
May 2006
Location:
Bay area, California
Posts:
10
Plugin Contributions:
0

Re: Mod CC month drop down menu?

Thanks for the reply.

I replaced:

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

with:

$expires_month = array(
   0 => 'Select Month',
   1 => '01-January',
   2 => '02-February',
   3 => '03-March',
   4 => '04-April',
   5 => '05-May',
   6 => '06-June',
   7 => '07-July',
   8 => '08-August',
   9 => '09-September',
   10 => '10-October',
   11 => '11-November',
   12 => '12-December',
);

$select = '<select name="expires_month" id="expires_month">'."\r\n";

foreach($expires_month as $key => $value){
   $select .= "\t".'<option value="'.$key.'">' . $value.'</option>'."\r\n";
}

$select .= '</select>';

But I only get the first letter of the array in the drop down menu.
It's getting late here now and but I'll need to go back and study up on my php coding to see where I screwed up..

Cheers!
Br