Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to: Take out Countries drop down & add States drop down ?


mrgtec

Recommended Posts

Posted

Hi,

 

1. Does anyone know how to take the Country drop down out of create_account.php?

 

2. Does anyone know how to put a United States drop down in for the state part of create_account.php?

 

Thank you,

Michael

Michael

Posted

Hi,

 

Thank you anyways lrparr, but I cant use the file, I already have hacked my files to beable to use Fast Easy Checkout by Nana (I think).

 

Please help me.

 

Thank you,

Michael

Michael

Posted
Hi,

 

Thank you anyways lrparr, but I cant use the file, I already have hacked my files to beable to use Fast Easy Checkout by Nana (I think).

 

Please help me.

 

Thank you,

Michael

 

You can still use the contribution, you will just need to make the changes to the files manually instead of replacing the complete file.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

Hi,

 

Ok. And how what manual steps am I going to have to do. Is it in the readme file what I have to do?

 

Thank you,

Michael

Michael

Posted
Hi,

 

Ok. And how what manual steps am I going to have to do. Is it in the readme file what I have to do?

 

Thank you,

Michael

 

If you download the contribution you will find a readme with install instructions. Since you are installing on changed files the line numbers and code that you have to replace may not be exactly the same as if you were installing on a clean install so you may have to do a little hunting in the file.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

I know control F, to get the find box up & type the 1st line of code & then it will go through the page & find that line of code, its a very cool trick.

Michael

Posted

Hi, Again,

 

1 more question on the create_account.php part, can that coding/code be used in the create_account3.php?

 

Thank you,

Michael

Michael

Posted
Hi, Again,

 

1 more question on the create_account.php part, can that coding/code be used in the create_account3.php?

 

Thank you,

Michael

it's essentially the same file (with a few different options), so yes :)

i use nana's wonderful fast easy checkout also :thumbsup:

Posted

Hi, Again,

 

I just installed this hack, but the page isnt changing when I change the countries

 

Heres my code for create_account3.php:

 

<?php
/*
 $Id: create+account3.php,v 2.00 2004/01/05 23:28:24 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
$show_account_box = 0;
//IF you want to give the option to create an account with random password choose to 0 if not
$create_password =1;// set to 1 to create an account with random password
$show_login=0;// set to 1 to show login box
////////////////////////////////////////////////
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . 'create_account.php');
require(DIR_WS_LANGUAGES . $language . '/' . 'fast_account.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);
// if we have been here before and are coming back get rid of the credit covers variable
 if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');  //rmh M-S_ccgv
//line 21-23 sends the customer ti index.php if he is logedin 
if ((tep_session_is_registered('customer_id'))&&(tep_session_is_registered('createaccount'))) {  tep_redirect(tep_href_link('account_password_new.php', '', 'SSL'));
 }

 if (tep_session_is_registered('customer_id')) {
	 tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
 }

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
 if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
 }
 $error = false;

 // +Country-State Selector
 $refresh = false;
 if (isset($HTTP_POST_VARS['action']) && (($HTTP_POST_VARS['action'] == 'process') || ($HTTP_POST_VARS['action'] == 'refresh'))) {
if ($HTTP_POST_VARS['action'] == 'process')  $process = true;
if ($HTTP_POST_VARS['action'] == 'refresh') $refresh = true;
 // -Country-State Selector

  if (ACCOUNT_GENDER == 'true') {
  if (isset($HTTP_POST_VARS['gender'])) {
	$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
  } else {
	$gender = false;
  }
}
  //START REGISTRATION CODE
$createaccount='N';
//next two lines gives you a temporary fixed password you can change to what you like
$password = tep_create_random_value(15);
$confirmation = $password;
 //start type one create assount

 if ($create_password == 1) {
 $createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
 if ($createaccount!='Y')$createaccount='N';
 }
 //start type two create account 
  if ($show_account_box == 1) {
 $createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
	 if ($createaccount=='Y') {
 $password = tep_db_prepare_input($HTTP_POST_VARS['password']);
	 $confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 }
 }

$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']);
$street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);

if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']);
$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
$city = tep_db_prepare_input($HTTP_POST_VARS['City']);
 if (ACCOUNT_STATE == 'true') {
  $state = tep_db_prepare_input($HTTP_POST_VARS['state']);
  if (isset($HTTP_POST_VARS['zone_id'])) {
	$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
  } else {
	$zone_id = false;
  }
}
$country =  tep_db_prepare_input($HTTP_POST_VARS['country']);

$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);
$fax = tep_db_prepare_input($HTTP_POST_VARS['fax']);

if (isset($HTTP_POST_VARS['newsletter'])) {
  $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
} else {
  $newsletter = false;
}

// +Country-State Selector
if ($process) {
// -Country-State Selector
$error = false;

if (ACCOUNT_GENDER == 'true') {
  if ( ($gender != 'm') && ($gender != 'f') ) {
	$error = true;

	$messageStack->add('create_account', ENTRY_GENDER_ERROR);
  }
}

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
}

if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}
//rmh M-S_addr-enhancer begin
if (ACCOUNT_DOB == 'true' && REQUIRE_DOB == 'true') {
  if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
	$error = true;

	$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
  }
}
//rmh M-S_addr-enhancer end
if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif (tep_validate_email($email_address) == false) {
  $error = true;

  $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} else {
  $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
  $check_email = tep_db_fetch_array($check_email_query);

/*  if ($check_email['total'] > 0) {
	$error = true;
	$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
  }*/
if ($check_email['total'] > 0)
{  //PWA delete account
	$get_customer_info = tep_db_query("select customers_id, customers_email_address, createaccount from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
	$customer_info = tep_db_fetch_array($get_customer_info);
	$customer_id = $customer_info['customers_id'];
	$customer_email_address = $customer_info['customers_email_address'];
	$customer_pwa = $customer_info['createaccount'];
	if ($customer_pwa =='Y')
	{
	$error = true;
	$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
	} else {
	// here i am adding another line just incase they change to an account immediatly i do not know if it is necessary or not
if (tep_session_is_registered('registered_now')) tep_session_unregister('registered_now');
		if (tep_session_is_registered('createaccount')) tep_session_unregister('createaccount');
		tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");
		tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");
		tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'");
		tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'");
		tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "'");
		tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . $customer_id . "'");
	}
  }
// END
}
if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
}

if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_POST_CODE_ERROR);
}

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_CITY_ERROR);
}

if (is_numeric($country) == false) {
  $error = true;

  $messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
}

if (ACCOUNT_STATE == 'true') {

  // +Country-State Selector
  if ($zone_id == 0) {
  // -Country-State Selector

	if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
	  $error = true;

	  $messageStack->add('create_account', ENTRY_STATE_ERROR);
	}
  }
}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}
if ($error == false) {
  $sql_data_array = array('customers_firstname' => $firstname,
						  'customers_lastname' => $lastname,
						  'customers_email_address' => $email_address,
						  'customers_telephone' => $telephone,
						  'customers_fax' => $fax,
						  'createaccount' => $createaccount,
						  'customers_newsletter' => $newsletter,
						   'confirmation_key' => $confirmation,
						  'customers_password' => tep_encrypt_password($password));

  if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
  if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

  tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

  $customer_id = tep_db_insert_id();

  $sql_data_array = array('customers_id' => $customer_id,
						  'entry_firstname' => $firstname,
						  'entry_lastname' => $lastname,
						  'entry_street_address' => $street_address,
						  'entry_postcode' => $postcode,
						  'entry_city' => $city,
						  'entry_country_id' => $country);

  if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
  if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
  if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
  if (ACCOUNT_STATE == 'true') {
	if ($zone_id > 0) {
	  $sql_data_array['entry_zone_id'] = $zone_id;
	  $sql_data_array['entry_state'] = '';
	} else {
	  $sql_data_array['entry_zone_id'] = '0';
	  $sql_data_array['entry_state'] = $state;
	}
  }

  tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
  $address_id = tep_db_insert_id();

  tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

  tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

  if (SESSION_RECREATE == 'True') {
	tep_session_recreate();
  }

  $customer_first_name = $firstname;
  $customer_default_address_id = $address_id;
  $customer_country_id = $country;
  $customer_zone_id = $zone_id;
  tep_session_register('customer_id');
  tep_session_register('customer_first_name');
  tep_session_register('customer_default_address_id');
  tep_session_register('customer_country_id');
  tep_session_register('customer_zone_id');

$registered_now=1;
tep_session_register('registered_now');
if  ($createaccount == 'N') tep_session_register('createaccount');

$shipping_address_query = tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "'");
$shipping_address = tep_db_fetch_array($shipping_address_query);
$billto = $shipping_address['address_book_id'];
 $sendto = $shipping_address['address_book_id'];
tep_session_register('billto');
tep_session_register('sendto');
 $billto = $shipping_address['address_book_id'];
 $sendto = $shipping_address['address_book_id'];
  // restore cart contents
  $cart->restore_contents();

  //END REGISTRATION CODE



  //START DIFFERENT SHIPPING CODE

  if (tep_not_null($HTTP_POST_VARS['ShipFirstName']) && tep_not_null($HTTP_POST_VARS['ShipLastName']) && tep_not_null($HTTP_POST_VARS['ShipAddress'])) {
  $process = true;

  $firstname = tep_db_prepare_input($HTTP_POST_VARS['ShipFirstName']);
  $lastname = tep_db_prepare_input($HTTP_POST_VARS['ShipLastName']);
  $street_address = tep_db_prepare_input($HTTP_POST_VARS['ShipAddress']);
  if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['shipsuburb']);
  $postcode = tep_db_prepare_input($HTTP_POST_VARS['shippostcode']);
  $city = tep_db_prepare_input($HTTP_POST_VARS['ShipCity']);
  $suburb = tep_db_prepare_input($HTTP_POST_VARS['shipsuburb']);
  $country = tep_db_prepare_input($HTTP_POST_VARS['shipcountry']);
  if (ACCOUNT_STATE == 'true') {
	if (isset($HTTP_POST_VARS['zone_id'])) {
	  $zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
	} else {
	  $zone_id = false;
	}
	$state = tep_db_prepare_input($HTTP_POST_VARS['shippingstate']);
  }

  if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
	$error = true;

	$messageStack->add('checkout_address', ENTRY_FIRST_NAME_ERROR);
  }

  if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
	$error = true;

	$messageStack->add('checkout_address', ENTRY_LAST_NAME_ERROR);
  }

  if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
	$error = true;

	$messageStack->add('checkout_address', ENTRY_STREET_ADDRESS_ERROR);
  }

  if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
	$error = true;

	$messageStack->add('checkout_address', ENTRY_POST_CODE_ERROR);
  }

  if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
	$error = true;

	$messageStack->add('checkout_address', ENTRY_CITY_ERROR);
  }

  if (ACCOUNT_STATE == 'true') {
	$zone_id = 0;
	$check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
	$check = tep_db_fetch_array($check_query);
	$entry_state_has_zones = ($check['total'] > 0);
	if ($entry_state_has_zones == true) {
	  $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
	  if (tep_db_num_rows($zone_query) == 1) {
		$zone = tep_db_fetch_array($zone_query);
		$zone_id = $zone['zone_id'];
	  } else {
		$error = true;

		$messageStack->add('checkout_address', ENTRY_STATE_ERROR_SELECT);
	  }
	} else {
	  if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
		$error = true;

		$messageStack->add('checkout_address', ENTRY_STATE_ERROR);
	  }
	}
  }

  if ( (is_numeric($country) == false) || ($country < 1) ) {
	$error = true;

	$messageStack->add('checkout_address', ENTRY_COUNTRY_ERROR);
  }
$error = false;
  if ($error == false) {
   $sql_data_array = array('customers_id' => $customer_id,

						  'entry_firstname' => $firstname,
						  'entry_lastname' => $lastname,
						  'entry_street_address' => $street_address,
						  'entry_postcode' => $postcode,
						  'entry_city' => $city,
						  'entry_country_id' => $country);

  if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
  if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
  if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
  if (ACCOUNT_STATE == 'true') {
	if ($zone_id > 0) {
	  $sql_data_array['entry_zone_id'] = $zone_id;
	  $sql_data_array['entry_state'] = '';
	} else {
	  $sql_data_array['entry_zone_id'] = '0';
	  $sql_data_array['entry_state'] = $state;
	}
  }

  tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

  $address_id = tep_db_insert_id();
   $sendto =$address_id;
  tep_session_unregister('sendto');
 ;
	  tep_session_register('sendto');

	$sendto = tep_db_insert_id();

}
 }
  //END DIFFERENT SHIPPING CODE



  tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));
 }
}
 if ($error == true) {
 //  $messageStack->add('create_account', TEXT_CREATE_ACCOUNT_ERROR);
 }

 // +Country-State Selector 
}
if ($HTTP_POST_VARS['action'] == 'refresh') {$state = '';}
if (!isset($country)) $country = DEFAULT_COUNTRY;
// -Country-State Selector

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT,   '', 'SSL'));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script src="global.js"type=text/javascript></SCRIPT>
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="3" rightmargin="3" >
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3" align="center">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLES; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLES, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>

  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<tr>
	<td><?php   if ($show_login ==1) { require('login_box.php');}else{echo PRIMARY_ADDRESS_DESCRIPTION; } ?></td>
  </tr>

  <tr>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

<tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><?php echo tep_draw_form('checkout', tep_href_link('create_account3.php', '', 'SSL'), 'post','onSubmit="return check_form(checkout);"') . tep_draw_hidden_field('action', 'process'); ?><b><?php //echo TITLE_FORM; ?></b></td>
	  </tr>
	</table></td>
  </tr>

<tr>
	<td><br><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TITLE_PAYMENT_ADDRESS; ?></b></td>
	   <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
	  </tr>
<?php
 if ($messageStack->size('create_account') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('create_account'); ?></td>
  </tr>
<?php
}
?>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" cellspacing="2" cellpadding="2" align="right">
	<tr>
		   <td class = "infoBoxContents"><?php echo PAYMENT_SHIPMENT; ?></td>
		   <td class = "infoBoxContents"><input type="image" src="images/collapse_tcat.gif" name="row" value="1" onclick="return toggle_collapse('forumbit_1')"></td>
				</tr>
				</table></td>
	  </tr>
	</table></td>
  </tr>

  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" cellspacing="2" cellpadding="2">
	<tr><?php
 if (ACCOUNT_GENDER == 'true') {
?>
		  <tr>
			<td class="infoBoxContents"><?php echo ENTRY_GENDER; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_radio_field('gender', 'm') . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f') . '  ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
		 </tr> </tr>
<?php
 }
?>
		  <td class="infoBoxContents"><?php echo ENTRY_FIRST_NAME; ?></td>
		  <td class="infoBoxContents"><?php echo tep_draw_input_field('firstname','','') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
   </tr> <tr>
		  <td class="infoBoxContents"><?php echo ENTRY_LAST_NAME; ?></td>
		  <td class="infoBoxContents"><?php echo tep_draw_input_field('lastname','','') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
   <?php
 if (ACCOUNT_DOB == 'true') {
?>
		 </tr> <tr>
			<td class="infoBoxContents"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
			<td class="infoBoxContents"><?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>

<?php
 }
?>
	</tr><tr>
			<td class="infoBoxContents"><?php echo ENTRY_COMPANY; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
		  </tr> <tr>
		  <td class="infoBoxContents"><?php echo ENTRY_STREET_ADDRESS; ?></td>
		  <td class="infoBoxContents"><?php echo tep_draw_input_field('street_address','','') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>

	</tr><tr>
			<td class="infoBoxContents"><?php echo ENTRY_POST_CODE; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
		  </tr>
		  <?php
 if (ACCOUNT_SUBURB == 'true') {
?>
		  <tr>
			<td class="infoBoxContents"><?php echo ENTRY_SUBURB; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
		  </tr>
<?php
 }
?>	   <tr>
		   <td class="infoBoxContents"><?php echo ENTRY_CITY; ?></td>
		   <td class="infoBoxContents"><?php echo tep_draw_input_field('City') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
		</tr>
	  <?php

 if (ACCOUNT_STATE == 'true') {
?>
		  <tr>
			<td class="infoBoxContents"><?php echo ENTRY_STATE; ?></td>
			<td class="infoBoxContents">
<?php
// +Country-State Selector
$zones_array = array();
$zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = " . 
  (int)$country . " order by zone_name");
while ($zones_values = tep_db_fetch_array($zones_query)) {
  $zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
  }
if (count($zones_array) > 0) {
  echo tep_draw_pull_down_menu('zone_id', $zones_array);
} else {
  echo tep_draw_input_field('state');
}
// -Country-State Selector

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
			</td>
		  </tr>
<?php
 }
?>
	<tr>
			<td class="infoBoxContents"><?php echo ENTRY_COUNTRY; ?></td>
		  <?php // +Country-State Selector ?>
			<td class="main"><?php echo tep_get_country_list('country',$country,
			   'onChange="return refresh_form(create_account);"') . ' ' . 
			   (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . 
			   '</span>': ''); ?></td>
			<?php // -Country-State Selector ?>

   </tr><tr>

		  <td class="infoBoxContents"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
		  <td class="infoBoxContents"><?php echo tep_draw_input_field('telephone','','') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
	</tr><tr>
		  <td class="infoBoxContents"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
		  <td class="infoBoxContents"><?php echo tep_draw_input_field('email_address') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
   </tr>
<tr>
			<td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
			<td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': '');?></td>
		  </tr>
<?php

 if ($create_password == 1) {
?>
  <tr>
			<td class="main"><?php echo YES_ACCOUNT; ?></td>
			<td class="main"><?php echo tep_draw_checkbox_field('createaccount', 'Y') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': '');?></td>
		  </tr>
<?php
 }
?>
		  </table></td>
		  </tr>
		</table></td>
	  </tr>



			 <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2">
				<TBODY id=collapseobj_forumbit_1>
				  <TD class=alt2 noWrap>
				  <table border="0" width="100%" cellspacing="1" cellpadding="2">
					  <TBODY>
						   <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TITLE_SHIPPING_ADDRESS; ?></b></td>
	  </tr>
	</table></td>
  </tr>

   <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">


   <tr>
		   <td class="infoBoxContents"><?php echo ENTRY_FIRST_NAME; ?></td>
		   <td class = "infoBoxContents"><input type="text" name="ShipFirstName" value="<? echo $FirstName; ?>" size="20"></td>
  </tr> <tr>
		   <td class="infoBoxContents"><?php echo ENTRY_LAST_NAME; ?></td>
		   <td class = "infoBoxContents"><input name="ShipLastName" value="<? echo $LastName; ?>" size="20"></td>
   </tr><tr>
		   <td class="infoBoxContents"><?php echo ENTRY_STREET_ADDRESS; ?></td>
		   <td class = "infoBoxContents"><tt><font size="2"><input name="ShipAddress" value="<? echo $ShipAddress; ?>" size="20"></font></tt></td>
   </tr><tr>
			<td class="infoBoxContents"><?php echo ENTRY_POST_CODE; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('shippostcode'); ?></td>
		  </tr>
 </tr>  <tr>
		   <td class="infoBoxContents"><?php echo ENTRY_CITY; ?></td>
		   <td class="infoBoxContents"><?php echo tep_draw_input_field('ShipCity') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
		</tr>
<?php   
	 if (ACCOUNT_SUBURB == 'true') {
?>
		  <tr>
			<td class="infoBoxContents"><?php echo ENTRY_SUBURB; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('shipsuburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
		  </tr>
<?php
 }

 if (ACCOUNT_STATE == 'true') {
?>
		  <tr>
			<td class="infoBoxContents"><?php echo ENTRY_STATE; ?></td>
			<td class="infoBoxContents">
<?php
if ($HTTP_POST_VARS['action'] == 'process') {
  if ($entry_state_has_zones == true) {
	$zones_array = array();
	$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$shipcountry . "' order by zone_name");
	while ($zones_values = tep_db_fetch_array($zones_query)) {
	  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
	}
	echo tep_draw_pull_down_menu('shippingstate', $zones_array);
  } else {
	echo tep_draw_input_field('shippingstate');
  }
} else {
  echo tep_draw_input_field('shippingstate');
}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
			</td>
		  </tr>
<?php
 }
?>
 <tr>
			<td class="infoBoxContents"><?php echo ENTRY_COUNTRY; ?></td>
			<td class="infoBoxContents"><?php echo tep_get_country_list('shipcountry') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
  </tr> <tr>
		   <td class="infoBoxContents"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
		   <td class="infoBoxContents"><?php echo tep_draw_input_field('shiptelephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
   </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>

  </td></tr>
 </TBODY> </table></td>
		  </tr>
		</table></td>
	  </tr>
<script>toggle_collapse('forumbit_1')</script>
<?php



 if ($show_account_box == 1) require('account_box.php');

 ?>
<table border="0" width="100%" cellspacing="0" cellpadding="2" valign="top">

   </td><td width="100%" border="1"> </td><td width="100%" border="1" valign="top"><center>


<?php

echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form></td>';
?>
</tr></table>
<table border="0" width="100%" cellspacing="0" cellpadding="2" valign="top">
<tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>

</table></td>
  </tr>
</table></TD>


<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->

</body>
</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

What did I do wrong?

 

Please help.

 

Thank you,

Michael

Michael

Posted

Also, I noticed on the bottom of the create_account3.php a little box with a ! in it, & I clicked it & it lead me to this box here.

 

error.JPG

 

Please help.

 

Thank you,

Michael

Michael

Posted

it looks like you erased part of fast easy checkout. only do the edits that aren't part of fast easy checkout. (nana has all of his edits quoted to say something along the lines of:

// fast easy checkout bof and //fast easy checkout eof

(don't quote me on that, it may be worded differently)

 

 

if you run into something that needs to be edited, but fast easy checkout has already modified it... post the portion (not the entire script) that your new modification needs to edit and i (or someone else) will try to fix it up the new edits so you can use both contributions together :)

 

i encounter this myself often because my store is so hacked to pieces with different contributions, it's a game of trial and error trying to merge two completely different contributions

Posted

Hi,

 

I played with it for a while now, getting tired of playing with the hack, I really need some help, please.

 

Thank you,

Michael

Michael

Posted

Hi, Again,

 

I got it working on my create_account.php page, but not on the create_account3.php page, I dont know about the create_account3.php page, how would I fix it to work with this contr.

 

Thank you,

Michael

Michael

Posted

You can ask for help in the Country-State Selector Support Topic if you wish. It's probably a good idea to review the existing thread.

 

This contribution isn't complicated, but it uses some features that may be unfamiliar to some.

Archived

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

×
×
  • Create New...