osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

DOB drop down

This is a discussion on DOB drop down within the osCMax v1.7 General Mods Discussion forums, part of the osCMax v1.7 Forums category; how can i make a drop down for the date of birth field in account create and account edit. i ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 General Mods Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-22-2004, 10:21 PM
New Member
 
Join Date: Dec 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
bagged89s10
Default DOB drop down

how can i make a drop down for the date of birth field in account create and account edit. i tried to use this contribution

Quote:
Code:
Dropdown menu for dob when create an account. short and easy.

I'll change only one file : /catalog/create_account.php


1. between lines 31 - 34
    // if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
    // first line
    if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS[dob_month] . '/' . $HTTP_POST_VARS[dob_day] . '/' . $HTTP_POST_VARS[dob_year]);
    // last line

2. between lines 345 - 372
                <!-- <td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td> -->
                <td class="main">
                <?php
                // 1. first line
                
                for ($i=1; $i<32; $i++) {
	            $dob_day[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
            	}
            	
				for ($i=1; $i<13; $i++) {
				$dob_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));
				}

				$today = getdate();
				$first_year = $today['year'] - 77; 
				$last_year = $today['year'] - 17;
				for ($i=$first_year; $i < $last_year; $i++) {
				$dob_year[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
				}

                
				echo tep_draw_pull_down_menu('dob_day', $dob_day);
				echo tep_draw_pull_down_menu('dob_month', $dob_month);
				echo tep_draw_pull_down_menu('dob_year', $dob_year);
                
                // last line
                ?>
                </td>

but the BTS makes in ms2-max makes the files different and i cannot figure out how to edit this into mine. Any info will help.

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Drop Down Category Menu rwoody osCommerce 2.2 Modification Help 2 07-11-2005 03:10 PM
Need to make Drop Down into Radio Box a1designs osCommerce 2.2 Modification Help 1 03-13-2005 02:11 PM
Add a drop down box to cc.php?? seank123 osCommerce 2.2 Modification Help 0 08-18-2004 09:29 AM
Get rid of country drop down proton318 osCMax v1.7 Discussion 1 11-19-2003 02:23 PM
drop down menus ? lopeel osCommerce 2.2 Modification Help 2 10-06-2003 03:36 PM


All times are GMT -8. The time now is 04:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax