Forums / Built-in Shipping and Payment Modules / Expiry Date - Blank Value

Expiry Date - Blank Value

Locked

Views: 3,249

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
5 Jun 2006, 8:34 AM
#1
stehodges avatar

stehodges

New Zenner

Join Date:
Jun 2005
Posts:
52
Plugin Contributions:
0

Expiry Date - Blank Value

How do i add a blank value into the $expires_month[] array.

I want the dropdown to have a selected value of 'Please Choose' or blank, so people have to change it from the default date.

Need to alter the following...

for ($i=1; $i<13; $i++) {
        $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));
      }
8 Jun 2006, 7:43 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,848
Plugin Contributions:
17

Re: Expiry Date - Blank Value

IF I am reading you right, the answer is to have the options thusly using the example of Date as the Option Name.
All can be done from the Attributes Controller in the admin panel

  • Under Option Name Date, Create an Option Value of "Please Select a Date"
  • Select the Product and Press Display
  • Under Adding New Attributes, the Order and Attribute Flags are the important part.
  • set order to 0
  • click flag buttons for - Yes No Yes Yes Yes No
  • Click the insert button
    This makes the first Item in the Drop Down the "instructions" to select a date and tells the system it is not a valid choice but only for display.

Couldn't find Ajeh's explanation to me some time ago, so I'm paraphrasing.

HTH

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Jun 2006, 8:54 AM
#3
stehodges avatar

stehodges

New Zenner

Join Date:
Jun 2005
Posts:
52
Plugin Contributions:
0

Re: Expiry Date - Blank Value

Thanks for the reply.

However, I believe your solution will only work as an attribute on a product.

I am referring to the Expiry Date dropdown at the payment stage for a credit card

8 Jun 2006, 2:07 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,848
Plugin Contributions:
17

Re: Expiry Date - Blank Value

:shocking:
Knew I was too sleepy to comprehend.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Sep 2006, 2:23 AM
#5
fauxtog avatar

fauxtog

New Zenner

Join Date:
Sep 2006
Posts:
18
Plugin Contributions:
0

Re: Expiry Date - Blank Value

I could use this information too

seems authorizenet module keeps giving a date that is 2 moths and 11 years off

I rather have people type in their dates than use the drop down.