Post by itrends » Mon Nov 19, 2012 6:09 am

Hey all.

Any way to get the SagePay Direct payment module to use normal date drop downs instead of the names of the months?

Active Member

Posts

Joined
Tue Jul 14, 2009 7:54 pm

Post by Avvici » Tue Nov 20, 2012 4:44 am

Open catalog/controller/payment/sagepay_direct.php and find this:

Code: Select all

for ($i = 1; $i <= 12; $i++) {
            $this->data['months'][] = array(
                'text'  => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)), 
                'value' => sprintf('%02d', $i)
            ); 
Change to this:

Code: Select all

for ($i = 1; $i <= 12; $i++) {
            $this->data['months'][] = array(
                'text'  => strftime('%m', mktime(0, 0, 0, $i, 1, 2000)), 
                'value' => sprintf('%02d', $i)
            );  
That will give you NUMBERED MONTHS instead.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: Google [Bot] and 66 guests