Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fast easy checkout


nana

Recommended Posts

I can't get this working so let me tell you exactly what I've done, and hopefully someone one can give me very precise instructions on what to do in step five.

 

1. I copied the code from yellow box in the instructions (choice 2 to give create account option)

tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));

// tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

 

And I pasted it "in the beginning of checkout_shipping.php" as Frank said in a comment, which I presume meant right after the copyright information. That gave me a blank page when I clicked Check Out, so obviously that wasn't the right place.

 

 

2. Next, right after "// if the customer is not logged on, redirect them to the login page", replaced"

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

with the two lines in the yellow box

 

At first, that seemed to work when I clicked Check Out--I got the customer billing info page with the login and create account option but, when I clicked Continue, I got a blank page (account_password_new.php?....)

 

 

 

3. I went to form-check.js.php and made the change described in the instructions. But now I get a blank page when I click Check Out eventhough the page loaded before.

 

 

I also tried using the two lines of code from the pink other box: // tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

 

but I always got the blank page at Check Out when I tried this option.

 

Thanks.

Link to comment
Share on other sites

  • Replies 1.7k
  • Created
  • Last Reply

Top Posters In This Topic

Help! Since installing this contrib (Part 1 only combine checkout_shipping.php and checkout_payment.php) the buyer goes swifty through the checkout, which is fantastic BTW, gets to the confirm order on checkout_confirmation.php. This should then pass him to Paypal where he can either login and use his PP account or simply pay by CC. BUT he goes to the main Paypal page. The interesting this is if he (me in this case) simply presses back on the browser to go back to checkout_confirmation.php and then confirm again I then go to the right place! I've confirmed that this is happening since FEC was installed as I've gone back to the original files and all is ok. Can anyone shed some light on this one?

 

Sarah

Link to comment
Share on other sites

Firstly, Great Contrib exactly what I was looking for.

 

I am using create_account3.php nad trying to add the "Country-State Selector 1.3.3" contrib.

However I can only seem to get it working with the Billing address. It doesn't work on the dropdown Shipping address.

 

Has anyone managed to use the two contribs togeather? If so can you let us know how.

 

I also want to use the "How Did You Hear About Us" Contrib but have not started on this one yet

 

 

Thanks

Link to comment
Share on other sites

I just posted new language files for this, it will help get rid of these errors -

 

LOGINBOX_EXSISTING_CUSTOMER

 

LOGINBOX_EMAIL

LOGINBOX_PASSWORD

LOGINBOX_TEXT_PASSWORD

LOGINBOX_FORGOT_PASSWORD

 

Michael

Michael

Link to comment
Share on other sites

And that line says:

 

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

--->	if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
  $error = true;

 

The arrow I put there is from me now, its not in the script.

 

Michael

Edited by mrgtec

Michael

Link to comment
Share on other sites

Regarding www.beadsneeds.co.uk

 

Someone has come from this thread, created an account under the name dsadsa and purchased something with the option to pay by cheque.

 

Please do NOT purchase anything as a test, if you do so my client will be forced to contact your service provider.

 

It is plain to see its a live and fully operational store, so test purchases should be requested before being done.

 

Thank you.

 

Sorry NANA this is not meant for you, but from someone looking at this thread from Argentina.

 

My client is not pleased I can tell you.

Born - Scotland

Location - Kent, England

Job - hunting for one

Link to comment
Share on other sites

i'm trying to do something similar to what akmac did by hiding the password field during checkout until a customer clicks the "YES" box to create an account. i can't figure it out though, i installed the js file but i'm not sure that it's actually being used.

have a look

http://www.diggwear.com/

the site is not near complete as far as design and products, so just look past it and add the shirt to the cart and checkout.

Link to comment
Share on other sites

Hi, Nana,

 

I have installed 2 other hacks on the create_account.php file, but I get a error saying the following -

 

Your E-Mail Address already exists in our records - please log in with the e-mail address or create an account with a different address.

 

But I did not create a password or a e-mail account?

 

Please help.

 

Thank you,

Michael

Michael

Link to comment
Share on other sites

Then when I put in another e-mail address, its says -

 

Fatal error: Call to undefined function: crypt_password() in /home/mrgtechn/public_html/shop/create_account.php on line 287

 

Here's my whole create_account.php

 

<?php
/*
 $Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
///////////////////////////////////////
//configuration
$show_account_box = 1;
//IF you want to give the option to create an account with random password choose to 0 if not
$create_password = 0;// set to 1 to create an account with random password
$show_login=1;// set to 1 to show login box
////////////////////////////////////////////
 require('includes/application_top.php');
  require(DIR_WS_LANGUAGES . $language . '/' . 'fast_account.php');
 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'));
  }
// needs to be included earlier to set the success message in the messageStack
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

$country = (isset($HTTP_POST_VARS['country']))?tep_db_prepare_input($HTTP_POST_VARS['country']):((int)STORE_COUNTRY);

 $country_flag = (isset($HTTP_POST_VARS['country_old']) && ($country == $HTTP_POST_VARS['country_old']))?false:true;

 $process = false;
 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
//extra questions start
if (QUESTION_LOCATION == 'account')  require('extra_questions_upload_result_box.php');
//extra questions end
  //START REGISTRATION CODE
  $formlogin = tep_db_prepare_input($HTTP_POST_VARS['form_login']);
//next two lines gives you a temporary fixed password you can change to what you like
$createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
 //start type one create assount
 //FORMLOGIN=1 WHEN CREATE ACCOUNT IS MANDATORY
  if($fromlogin==1){
   $createaccount='Y';
	$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
 $confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);
//rmh referral start
$source = tep_db_prepare_input($HTTP_POST_VARS['source']);
if (isset($HTTP_POST_VARS['source_other'])) $source_other = tep_db_prepare_input($HTTP_POST_VARS['source_other']);
//rmh referral end
   }
   //THIS IS WHEN A CHECK BOX INVITES TO HAVE AN ACCOUNT
 if ($create_password == 1) {
 $createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
 if ($createaccount!='Y')$createaccount='N';
$password = tep_create_random_value(15);
$confirmation = $password;
 }
 //THIS IS WHEN CUSTOMER CHOOSES WITH PASSWORD
 //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']);
  }else{
$createaccount='N';
$password = tep_create_random_value(15);
$confirmation = $password;

 }
 }
$process = true;
  // $createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
// if ($createaccount== '') $createaccount='Y';
if (ACCOUNT_GENDER == 'true') {
  if (isset($HTTP_POST_VARS['gender'])) {
	$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
  } else {
	$gender = false;
  }
}
$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']);
$city = tep_db_prepare_input($HTTP_POST_VARS['city']);
if (ACCOUNT_STATE == 'true') {
  $state = tep_db_prepare_input($HTTP_POST_VARS['state']);
$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
  if (isset($HTTP_POST_VARS['zone_id'])) {
	$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
  } else {
	$zone_id = false;
  }
}

$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;
}

$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);
}

if (ACCOUNT_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);
  }
}

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 {
	 if (tep_session_is_registered('createaccount')) tep_session_unregister('createaccount');
	 if (tep_session_is_registered('registered_now')) tep_session_unregister('registered_now');
		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($city) < ENTRY_CITY_MIN_LENGTH) {
  $error = true;

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

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

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

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

  $messageStack->add('create_account', ENTRY_COUNTRY_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('create_account', ENTRY_STATE_ERROR_SELECT);
	}
  } else {
	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);
}

//rmh referral start
if ((REFERRAL_REQUIRED == 'true') && (is_numeric($source) == false)) {
	$error = true;

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

if ((REFERRAL_REQUIRED == 'true') && (DISPLAY_REFERRAL_OTHER == 'true') && ($source == '9999') && (!tep_not_null($source_other)) ) {
	$error = true;

	$messageStack->add('create_account', ENTRY_SOURCE_OTHER_ERROR);
}
//rmh referral end

 if  ($createaccount == 'Y') {
if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
  $error = true;

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

//VISUAL VERIFY CODE start
 require(DIR_WS_FUNCTIONS . 'visual_verify_code.php');
$code_query = tep_db_query("select code from visual_verify_code where oscsid = '" . tep_session_id($HTTP_GET_VARS[tep_session_name()]) . "'");
$code_array = tep_db_fetch_array($code_query);
$code = $code_array['code'];

tep_db_query("DELETE FROM " . TABLE_VISUAL_VERIFY_CODE . " WHERE oscsid='" . $vvcode_oscsid . "'"); //remove the visual verify code associated with this session to clean database and ensure new results

$user_entered_code = $HTTP_POST_VARS['visual_verify_code'];
if (!(strcasecmp($user_entered_code, $code) == 0)) {	//make the check case insensitive
	$error = true;
	$messageStack->add('create_account', VISUAL_VERIFY_CODE_ENTRY_ERROR);
}
//VISUAL VERIFY CODE stop

if( !$error && !$country_flag) {

  $sql_data_array = array('customers_firstname' => $firstname,
						'customers_lastname' => $lastname,
						'customers_email_address' => $email_address,
						'customers_telephone' => $telephone,
						'customers_fax' => $fax,
						'customers_newsletter' => $newsletter,
						'customers_advertiser' => $advertiser,
						'customers_referer_url' => $referer_url,
						'customers_default_address_id' => $default_address_id,
						'customers_password' => crypt_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();

//extra questions start
if (QUESTION_LOCATION == 'account')  require('extra_question_db_upload_box.php');
//extra questions end

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

						  '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 . "'");

  //rmh referral start
  tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('" . (int)$customer_id . "', '0', now(), '". (int)$source . "')");

  if ($source == '9999') {
	tep_db_perform(TABLE_SOURCES_OTHER, array('customers_id' => (int)$customer_id, 'sources_other_name' => tep_db_input($source_other)));
  }
//rmh referral end
$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'];

  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');
  tep_session_unregister('referral_id'); //rmh referral
  tep_session_unregister('createaccount');
  if  ($createaccount == 'N') tep_session_register('createaccount');
// restore cart contents
  $cart->restore_contents();

// build the message content
  $name = $firstname . ' ' . $lastname;

  if (ACCOUNT_GENDER == 'true') {
	 if ($gender == 'm') {
	   $email_text = sprintf(EMAIL_GREET_MR, $lastname);
	 } else {
	   $email_text = sprintf(EMAIL_GREET_MS, $lastname);
	 }
  } else {
	$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
  }

  $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
  if  ($createaccount == 'Y') tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

		if  ($createaccount == 'Y') {
	 if ($cart->count_contents() > 0) {
		tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
		} else {
		tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
		   }	  }
  else {
	  tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
  }
}
 }


 $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">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <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_TITLE; ?></td>
	  </tr>
	</table></td>
  </tr>
<?php
if($fromlogin!=1){
?>
<tr>
<td><?php if ($show_login ==1) { require('includes/fec/login_box.php');}else{echo PRIMARY_ADDRESS_DESCRIPTION; } ?></td>
</tr>

<?php
}
?>
  <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?>
  <tr>
	<td class="smallText"></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if( $messageStack->size('create_account') > 0 && !$country_flag ) {
?>
  <tr>
	<td><?php echo $messageStack->output('create_account'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td height="18" class="headerNavigation"><?php echo LOGINBOX_NEW_CUSTOMER ?></td>
	   <td class="headerNavigation" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></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">
<?php
 if (ACCOUNT_GENDER == 'true') {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_GENDER; ?></td>
			<td class="main"><?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>
<?php
 }
?>
		  <tr>
			<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_LAST_NAME; ?></td>
			<td class="main"><?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
		  </tr>
<?php
 if (ACCOUNT_DOB == 'true') {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
			<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>
		  </tr>
<?php
 }
?>
		  <tr>
			<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
			<td class="main"><?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>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 if (ACCOUNT_COMPANY == 'true') {
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></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>
			<td class="main"><?php echo ENTRY_COMPANY; ?></td>
			<td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></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>
			<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
			<td class="main"><?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>
<?php
 if (ACCOUNT_SUBURB == 'true') {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_SUBURB; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_CITY; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_STATE; ?></td>
			<td class="main">
<?php

if ($process == true) {
  if ($entry_state_has_zones == true) {
	$zones_array = array();
	$zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
	$zones_query = tep_db_query("select 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_name'], 'text' => $zones_values['zone_name']);
	}
	echo tep_draw_pull_down_menu('state', $zones_array);
  } else {
	$zones_array = array();
	$zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
	$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " 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('state', $zones_array);
  }
} else {
	$zones_array = array();
	$zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
	/*$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " order by zone_name");*/
	$zones_query = tep_db_query("select 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_name'], 'text' => $zones_values['zone_name']);
	}
	echo tep_draw_pull_down_menu('state', $zones_array);
}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;

?>
			</td>
		  </tr>

		  <tr>
			<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
			<td class="main"><?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
 }
?>
		  <tr>
			<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
			<td class="main"><b><?php echo ($tmp_object = tep_get_country_active_list('country', $country, 'onChange="this.form.submit();"')) . tep_draw_hidden_field('country_old', $country) . ' ' . (is_array($tmp_object) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></b></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></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>
			<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
			<td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></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>
			<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>
		</table></td>
	  </tr>
	</table></td>
  </tr>

		  <!-- //rmh referral start -->
<?php
 if ((tep_not_null(tep_get_sources()) || DISPLAY_REFERRAL_OTHER == 'true') && (!tep_session_is_registered('referral_id') || (tep_session_is_registered('referral_id') && DISPLAY_REFERRAL_SOURCE == 'true')) ) {
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_SOURCE; ?></b></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>
			<td class="main"><?php echo ENTRY_SOURCE; ?></td>
			<td class="main"><?php echo tep_get_source_list('source', (DISPLAY_REFERRAL_OTHER == 'true' || (tep_session_is_registered('referral_id') && tep_not_null($referral_id)) ? true : false), (tep_session_is_registered('referral_id') && tep_not_null($referral_id)) ? '9999' : '') . ' ' . (tep_not_null(ENTRY_SOURCE_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_TEXT . '</span>': ''); ?></td>
		  </tr>
<?php
if (DISPLAY_REFERRAL_OTHER == 'true' || (tep_session_is_registered('referral_id') && tep_not_null($referral_id))) {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_SOURCE_OTHER; ?></td>
			<td class="main"><?php echo tep_draw_input_field('source_other', (tep_not_null($referral_id) ? $referral_id : '')) . ' ' . (tep_not_null(ENTRY_SOURCE_OTHER_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_OTHER_TEXT . '</span>': ''); ?></td>
		  </tr>
<?php
}
?>





<?php
 } else if (DISPLAY_REFERRAL_SOURCE == 'false') {
  echo tep_draw_hidden_field('source', ((tep_session_is_registered('referral_id') && tep_not_null($referral_id)) ? '9999' : '')) . tep_draw_hidden_field('source_other', (tep_not_null($referral_id) ? $referral_id : ''));
 }
?>
<!-- //rmh referral end -->

<?php
 if ($create_password == 1) {
 if($fromlogin!=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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>



<?php
if ($show_account_box == 1) require('includes/fec/account_box.php');
?>

<?php
//extra questions start
if (QUESTION_LOCATION == 'account')  require('extra_questions_show_box.php');
//extra questions end
?>

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

  <!-- VISUAL VERIFY CODE start -->
  <tr>
	<td class="main"><b><?php echo VISUAL_VERIFY_CODE_CATEGORY; ?></b></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>
			<td class="main"><?php echo VISUAL_VERIFY_CODE_TEXT_INSTRUCTIONS; ?></td>
			<td class="main"><?php echo tep_draw_input_field('visual_verify_code') . ' ' . '<span class="inputRequirement">' . VISUAL_VERIFY_CODE_ENTRY_TEXT . '</span>'; ?></td>

			<td class="main">
			  <?php
				  //can replace the following loop with $visual_verify_code = substr(str_shuffle (VISUAL_VERIFY_CODE_CHARACTER_POOL), 0, rand(3,6)); if you have PHP 4.3
				$visual_verify_code = "";
				for ($i = 1; $i <= rand(3,6); $i++){
					  $visual_verify_code = $visual_verify_code . substr(VISUAL_VERIFY_CODE_CHARACTER_POOL, rand(0, strlen(VISUAL_VERIFY_CODE_CHARACTER_POOL)-1), 1);
				 }
				 $vvcode_oscsid = tep_session_id($HTTP_GET_VARS[tep_session_name()]);
				 tep_db_query("DELETE FROM " . TABLE_VISUAL_VERIFY_CODE . " WHERE oscsid='" . $vvcode_oscsid . "'");
				 $sql_data_array = array('oscsid' => $vvcode_oscsid, 'code' => $visual_verify_code);
				 tep_db_perform(TABLE_VISUAL_VERIFY_CODE, $sql_data_array);
				 $visual_verify_code = "";
				 echo('<img src="' . FILENAME_VISUAL_VERIFY_CODE_DISPLAY . '?vvc=' . $vvcode_oscsid . '"');
			  ?>
			</td>
			<td class="main"><?php echo VISUAL_VERIFY_CODE_BOX_IDENTIFIER; ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<!--
 VISUAL VERIFY CODE stop   -->

  <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 width="10"><?php // $fromlogin=1000;
			echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE).tep_draw_hidden_field('form_login',$fromlogin); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></form></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 include(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thank you,

Michael

Michael

Link to comment
Share on other sites

Hello,

 

i use fast and easy check_out 2.0, because new version make trouble with my other contribs.

 

after installing 2.0 anything works fine.

;-)

 

... but i use RMA-System in my Store.

If a customer make a order without account, he cant use the RMA-System, becaus he cant log in to return a product.

 

After I changed in the Database "createaccount" from "N" to "Y" he can get a new password from the shopsystem.

 

how can i change this automatic to "Y"

because i dont want search after the customer in the database and change this.

 

it is not imortant when every user who dont made a account in the first time must create one if he came back to order again.

 

thanks for this great contribution.

 

bg

michael

Link to comment
Share on other sites

Problem gone, i have read the email from the customer.

 

GREAT !

He can create an account if he want, or buy on and on.

I LOVE this Contrib.

 

But how can i change the design of the email or change the informations inside ?

 

I also use this Contrib:

http://www.oscommerce.com/community/contributions,3115

 

Anyone use these Contribs together ?

 

Thanks.

 

bg

Michael

Link to comment
Share on other sites

Hello,

I only want to add the first part of the contrib, combining the shipping and payment steps. I'm getting errors from checkout_shipping.php.

 

Warning: main includes/languages/english/fast_account.php): line 16

 

When I comment out require(DIR_WS_LANGUAGES . $language . '/' . 'fast_account.php'); I get the next error

 

Warning: main(includes/fec/products_box.php): line 356

 

Do I need to install fast_account.php if I only want part one of the contrib? Thank you.

Link to comment
Share on other sites

Hi. I just installed this great contrib, but I have a little problem... I want to use

 

// tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

 

but when I proceed to checkout I get the following errors:

 

Your Details

 

Warning: main(login_box.php) [function.main]: failed to open stream: No such file or directory in /home/mircea/public_html/catalog/create_account.php on line 409

 

Fatal error: main() [function.require]: Failed opening required 'login_box.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/mircea/public_html/catalog/create_account.php on line 409

 

I took a look, and in create_account.php, on line 409 I have the following line:

 

<td><?php if ($show_login ==1) { require('login_box.php');}else{echo PRIMARY_ADDRESS_DESCRIPTION; } ?></td>

 

...I presume that he can't find login_box.php. But the file is in the includes/fec/ folder. Do you have any ideas what I'we done wrong ?

Link to comment
Share on other sites

I've searched the forum more thoroughly and I finally found the answer. Sorry for not finding it sooner and posting on the same problem again. I chose to add "includes/fec/" before the names of the files create_account.php couldn't find.

 

so I ended up with

<td><?php if ($show_login ==1) { require('includes/fec/login_box.php');}else{echo PRIMARY_ADDRESS_DESCRIPTION; } ?></td>

and there's another file and I did the same thing.

 

And since after that I got a page with broken translations, I decided to combine Nana's advice and another user's advice and added:

 

define('ENTRY_CREATEACCOUNT', 'By creating an account at ' . STORE_NAME . ' you will be able to shop faster, be up to date on an orders status, and keep trac
define('LOGINBOX_EXSISTING_CUSTOMER', '<font color="#FF0000"><small><b>NOTE:</b></font></small> If you already have an account login here. ');
define('LOGINBOX_EMAIL', 'Email address');
define('LOGINBOX_TEXT_PASSWORD', 'Password forgotten ?');
define('LOGINBOX__FORGOT_PASSWORD', 'Password forgotten? Click here.');
define('LOGINBOX_NEW_CUSTOMER', 'New Customer - Please Fill in Your Details');
define('LOGINBOX_EXISTING_CUSTOMER', 'Existing Customer');
define('HEADING_TITLE_2', 'Create Account');
define('LOGINBOX_PASSWORD', 'Password');
define('LOGINBOX_FORGOT_PASSWORD', 'Click Here...');
define('MY_PASSWORD_TITLE', 'Choose a Password to create an account');

 

to includes/languages/english.php

 

Good luck.

Link to comment
Share on other sites

Ok... everything seemed to be working fine... but when I'm guest and proceed to checkout, even if I choose "Yes please, create an account for me" or "No thanks, this is a one-off purchase.", after I fill in the data, and click Continue, I'm redirected to shopping_cart.php. Do you by any chance know why this is happening ? If I choose to Sign in instead, it works ok, and I'm redirected to checkout_shipping.php.

 

I'm using

// tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));
tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

 

Have a nice one ;)

Link to comment
Share on other sites

I love this contribution (thanks!) however I am having an issue with updating the order total on the checkout_shipping.php page.

 

When I click the update button, I get a payment error.

 

I did cut and paste the code in checkout_confirmation.php to get the total, however I have another contrib here so the code does not look exactly the same:

 

--------------------------------------------------------------------------

 

//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules = new order_total;

//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules->collect_posts();

//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules->pre_confirmation_check();

 

/// fec for get total

$paynow = tep_db_prepare_input($HTTP_GET_VARS['paynow']);

if ($paynow ==3) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'show_total=1&error_message=' . urlencode(ERROR_TOTAL_NOW), 'SSL'));

}

// ICW CREDIT CLASS Amended Line

if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {

// if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {

// tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

}

 

if (is_array($payment_modules->modules)) {

$payment_modules->pre_confirmation_check();

}

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

//ICW Credit class amendment Lines below repositioned

// require(DIR_WS_CLASSES . 'order_total.php');

// $order_total_modules = new order_total;

 

-----------------------------------------------------------------------------------------------------------

 

I have tried commenting / uncommenting several lines above and nothing seems to work. Any ideas? I am so close to getting this to work....

 

Thanks in advance..

 

Jennifer

Link to comment
Share on other sites

I'm also using the Cregit Card Gift Voucher Contrib which was a pain to install. I was using fast easy previously but I had to start fresh.

 

Could anyone you has gotten them to work together let me know how they did it or share their files? Thanks

Link to comment
Share on other sites

I'm also using the Cregit Card Gift Voucher Contrib which was a pain to install. I was using fast easy previously but I had to start fresh.

 

Could anyone you has gotten them to work together let me know how they did it or share their files? Thanks

 

Never mind. I got it sorted out. Here is my checkout_shipping for those having problems using this great contrib with CCGV. (it has column_right removed and a few minor mods fyi) :)

<?php
/*
$Id: checkout_shipping_express.php,v 1.16 2003/06/09 23:03:53 hpdl Exp $
redone by nana
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License

*/
require('includes/application_top.php');
require('includes/classes/http_client.php');

require(DIR_WS_LANGUAGES . $language . '/' . 'fast_account.php');



// if no shipping destination address was selected, use the customers own address as default
if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
} else {
// verify the selected shipping address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
$sendto = $customer_default_address_id;
if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
}
}
// if no billing destination address was selected, use the customers own address as default
if (!tep_session_is_registered('billto')) {
tep_session_register('billto');
$billto = $customer_default_address_id;
} else {
// verify the selected billing address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
$billto = $customer_default_address_id;
if (tep_session_is_registered('payment')) tep_session_unregister('payment');
}
}


//the next 4 lines are for ccgv
require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check(); 
// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));
//tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment;


$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();


require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}

// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
$cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
// ###### Added CCGV Contribution #########
//if ($order->content_type == 'virtual') {
 if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) {
// ###### End Added CCGV Contribution #########
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
tep_session_unregister('billing');
tep_session_unregister('payment');
if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];
if (!tep_session_is_registered('payment')) tep_session_register('payment');



if($n==1){

if (isset($_POST['save_x'])){
$paynow=3;
}
if (isset($_POST['preview_x'])){
$paynow=5;
}


//i commented this out so payment is not required in this page and total can be accessed
/*if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
*/
tep_session_unregister('payment');
$payment_modules->update_status();
}
if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
//}
while (list($key, $value) = each($_POST))
{
tep_session_register($key);
}
if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$free_shipping = true;

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
} else {
$free_shipping = false;
}

// process the selected shipping method
if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
$shipping = $HTTP_POST_VARS['shipping'];

list($module, $method) = explode('_', $shipping);
if ( is_object($$module) || ($shipping == 'free_free') ) {
if ($shipping == 'free_free') {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules->quote($method, $module);
}
if (isset($quote['error'])) {
tep_session_unregister('shipping');
} else {
if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
$shipping = array('id' => $shipping,
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' => $quote[0]['methods'][0]['cost']);

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION,'paynow='.$paynow, 'SSL'));
}
}
} else {
tep_session_unregister('shipping');
}
}
} else {
$shipping = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'paynow='.$paynow, 'SSL'));
}
}

// get all available shipping quotes
$quotes = $shipping_modules->quote();

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);


$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', '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">

<?php //echo $payment_modules->javascript_validation(); ?>
<script language="javascript"><!--
var selected;

function selectRowEffect2(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected2';
 selected = object;

// one button is not an array
 if (document.checkout_payment.shipping[0]) {
document.checkout_payment.shipping[buttonSelect].checked=true;
 } else {
document.checkout_payment.shipping.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
<script language="javascript"><!--
var selected;
<?php //rmh M-S_ccgv begin ?>
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
<?php //rmh M-S_ccgv end ?>
function selectRowEffect(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
document.checkout_payment.payment.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <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 //-->
  <!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'n=1', 'SSL'), 'post', 'onsubmit="return check_form();"') . tep_draw_hidden_field('action', 'process'); ?><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_TITLE;
//echo $ZETA; ?></td>
		<td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td>
	<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
	  <tr class="infoBoxNoticeContents">
		<td>
		<table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table>
   </td>
	  </tr>
	</table>
<?php
 }
?>
  </td>
	<td>
	<table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		   </tr>
	</table></td>
  </tr>
<?php	require('includes/fec/products_box.php');?>
 <?php	//require('includes/fec/comment_box.php');?>
<?php	require('includes/fec/shipping_box.php');?>
<?php
$show_total = tep_db_prepare_input($HTTP_GET_VARS['show_total']);	
 if ($show_total ==1)		  require('includes/fec/total_box.php');?>
<?php
 echo $order_total_modules->credit_selection();//rmh M-S_ccgv
?>
<tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php	//require('includes/fec/address_box.php');?>
 <?php	require('includes/fec/payment_box.php');?>

  <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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE,'name="preview" value="preview data"');  ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <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_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></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><?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%"><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="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?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></form></td>
<!-- body_text_eof //-->

<!--column_right_removed-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

I think my problem is with with create_account.php. Even if I don't go to checkout, but I click "create an account" in the first page, the same thing happens... if I log in with an existing user everything is ok, but if I want to create an account, after I fill all the data and click "Continue" I'm redirected to shopping_cart.php, regardless of what option I choose ("Yes please, create an account for me." or "No thanks, this is a one-off purchase.").

 

This is my create_account.php. Maybe it's only a minor thing I'm screwing up, but I can't seem to see the problem :(. I'm only a beginer at php.

<?php
/*
 $Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
///////////////////////////////////////
//configuration
$show_account_box = 1;
//IF you want to give the option to create an account with random password choose to 0 if not
$create_password = 0;// set to 1 to create an account with random password
$show_login=1;// set to 1 to show login box
////////////////////////////////////////////
 require('includes/application_top.php');
  require(DIR_WS_LANGUAGES . $language . '/' . 'fast_account.php');
 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'));
  }
// needs to be included earlier to set the success message in the messageStack
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

 $process = false;
 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
  //START REGISTRATION CODE
  $formlogin = tep_db_prepare_input($HTTP_POST_VARS['form_login']);
//next two lines gives you a temporary fixed password you can change to what you like
$createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
 //start type one create assount
 //FORMLOGIN=1 WHEN CREATE ACCOUNT IS MANDATORY
  if($fromlogin==1){
   $createaccount='Y';
	$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
 $confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);
   }
   //THIS IS WHEN A CHECK BOX INVITES TO HAVE AN ACCOUNT
 if ($create_password == 1) {
 $createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
 if ($createaccount!='Y')$createaccount='N';
$password = tep_create_random_value(15);
$confirmation = $password;
 }
 //THIS IS WHEN CUSTOMER CHOOSES WITH PASSWORD
 //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']);
  }else{
$createaccount='N';
$password = tep_create_random_value(15);
$confirmation = $password;

 }
 }
$process = true;
  // $createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
// if ($createaccount== '') $createaccount='Y';
if (ACCOUNT_GENDER == 'true') {
  if (isset($HTTP_POST_VARS['gender'])) {
	$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
  } else {
	$gender = false;
  }
}
$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
//replaced after adding the dob moddifcation
//if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS[dob_month] . '/' . $HTTP_POST_VARS[dob_day] . '/' . $HTTP_POST_VARS[dob_year]);
//end of modif
$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;
}

$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);
}

if (ACCOUNT_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);
  }
}

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 {
	 if (tep_session_is_registered('createaccount')) tep_session_unregister('createaccount');
	 if (tep_session_is_registered('registered_now')) tep_session_unregister('registered_now');
		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') {
  $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('create_account', ENTRY_STATE_ERROR_SELECT);
	}
  } else {
	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  ($createaccount == 'Y') {
if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
  $error = true;

  $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}
}
if ($error == false) {

  $sql_data_array = array('customers_firstname' => $firstname,
						  'customers_lastname' => $lastname,
						  'customers_email_address' => $email_address,
						  'customers_telephone' => $telephone,
						  'customers_fax' => $fax,
						  'customers_newsletter' => $newsletter,
						   'confirmation_key' => $confirmation,

					 'createaccount' => $createaccount,
						  '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())");
$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'];

  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');
  tep_session_unregister('createaccount');
  if  ($createaccount == 'N') tep_session_register('createaccount');
// restore cart contents
  $cart->restore_contents();

// build the message content
  $name = $firstname . ' ' . $lastname;

  if (ACCOUNT_GENDER == 'true') {
	 if ($gender == 'm') {
	   $email_text = sprintf(EMAIL_GREET_MR, $lastname);
	 } else {
	   $email_text = sprintf(EMAIL_GREET_MS, $lastname);
	 }
  } else {
	$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
  }

  $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* BEGIN
 if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
$coupon_code = create_coupon_code();
$insert_query = tep_db_query("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
$insert_id = tep_db_insert_id($insert_query);
$insert_query = tep_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id ."', '0', 'Admin', '" . $email_address . "', now() )");

$email_text .= sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "\n\n" .
			   sprintf(EMAIL_GV_REDEEM, $coupon_code) . "\n\n" .
			   EMAIL_GV_LINK . tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code,'NONSSL', false) .
			   "\n\n";
 }
 if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
	$coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;
$coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_code = '" . $coupon_code . "'");
$coupon = tep_db_fetch_array($coupon_query);
	$coupon_id = $coupon['coupon_id'];		
$coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . (int)$languages_id . "'");
$coupon_desc = tep_db_fetch_array($coupon_desc_query);
$insert_query = tep_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id ."', '0', 'Admin', '" . $email_address . "', now() )");
$email_text .= EMAIL_COUPON_INCENTIVE_HEADER .  "\n" .
			   sprintf("%s", $coupon_desc['coupon_description']) ."\n\n" .
			   sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n" .
			   "\n\n";
 }
//	$email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* END

  if  ($createaccount == 'Y') tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

  if  ($createaccount == 'Y') {
	if ($cart->count_contents() > 0) {
	  tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
	} else {
	  tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
	}	  
  } else {
	tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
  }
}
 }


 $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">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <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_TITLE; ?></td>
	  </tr>
	</table></td>
  </tr>
<?php
if($fromlogin!=1){
?>
<tr>
<td><?php if ($show_login ==1) { require('includes/fec/login_box.php');}else{echo PRIMARY_ADDRESS_DESCRIPTION; } ?></td>
</tr>

<?php
}
?>
  <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?>
  <tr>
	<td class="smallText"></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($messageStack->size('create_account') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('create_account'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td height="18" class="headerNavigation"><?php echo LOGINBOX_NEW_CUSTOMER ?></td>
	   <td class="headerNavigation" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></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">
<?php
 if (ACCOUNT_GENDER == 'true') {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_GENDER; ?></td>
			<td class="main"><?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>
<?php
 }
?>
		  <tr>
			<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_LAST_NAME; ?></td>
			<td class="main"><?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
		  </tr>
<?php
 if (ACCOUNT_DOB == 'true') {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<!-- replaced following line with code, after dob modification -->
<!--			  <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
				for ($i=1; $i<32; $i++) {
				  $dob_day_arr[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
				}
				for ($i=1; $i<13; $i++) {
				  $dob_month_arr[] = 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_arr[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
				}

				echo tep_draw_pull_down_menu('dob_day', $dob_day_arr);
				echo tep_draw_pull_down_menu('dob_month', $dob_month_arr);
				echo tep_draw_pull_down_menu('dob_year', $dob_year_arr);
				echo tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': '';
			  ?>
			</td>
<!-- end of modification -->				
		  </tr>
<?php
 }
?>
		  <tr>
			<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
			<td class="main"><?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>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 if (ACCOUNT_COMPANY == 'true') {
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></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>
			<td class="main"><?php echo ENTRY_COMPANY; ?></td>
			<td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></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>
			<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
			<td class="main"><?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>
<?php
 if (ACCOUNT_SUBURB == 'true') {
?>
		  <tr>
			<td class="main"><?php echo ENTRY_SUBURB; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_POST_CODE; ?></td>
			<td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo ENTRY_CITY; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_STATE; ?></td>
			<td class="main">
<?php
if ($process == true) {
  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)$country . "' 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('state', $zones_array);
  } else {
	echo tep_draw_input_field('state');
  }
} else {
  echo tep_draw_input_field('state');
}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
			</td>
		  </tr>
<?php
 }
?>
		  <tr>
			<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
			<td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></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>
			<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
			<td class="main"><?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="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
			<td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></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>
			<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) {
 if($fromlogin!=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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php



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

 ?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></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 width="10"><?php // $fromlogin=1000;
			echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE).tep_draw_hidden_field('form_login',$fromlogin); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></form></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 include(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

If anyone can see what I've done wrong, please enlighten me. Or please give me a version of create_account.php that you know it works...

 

If I can't make this work can I rollback to the setup where I had PWA (I removed PWA before installing this) and use PWA with the option of combining shipping and payment ?

 

Thanks for any answers...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...