Jump to content
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

Contribution works great and looks good! But am having problems with the last row, far right column, no product is showing up even though there are more pages of product to show.

The code you posted is not an SPPC version.... In version 4.2.0 of SPPC there is a product_listing_col.php for SPPC that has fixes for the display problems. It is more efficient query-wise too.

Share this post


Link to post
Share on other sites

I am looking to add this module on my new site and came across these differences.

it was not order and it was general.php.

 

This is my present coding:-

 

// Calculates Tax rounding the result
 function tep_calculate_tax($price, $tax) {
global $currencies;

return tep_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
 }

this is what it needs changing to according to Separate Prices:-

 

 

// Calculates Tax rounding the result
 function tep_calculate_tax($price, $tax) {
return $price * $tax / 100;
 }

 

 

There is no $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])

 

What difference will this make???

 

I was looking at separate pricing e420 and I believe I am on oscommerce 2.2 with MySQL of 4.2.2. I think am i trying to mix different versions that should not be mixed?


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites
I am looking to add this module on my new site and came across these differences.

it was not order and it was general.php.

 

This is my present coding:-

 

What difference will this make???

You are not using RC1 (release candidate 1, the latest version of osC 2) but an older version of osC 2 (milestone 2 updated in either 2005 or 2006 usually referred to as osC 2.2). That will make a difference if you upload files from the package because then you will (possibly) mix code of RC1 with an older version. There was a new function for the price that is used in the class shopping_cart for example.

 

What it means is that you would either have to manually add the SPPC code to your files (which is not a problem, just an awful lot of work) or change all your files to the RC1 ones (and add the table administrators) then add the ready-made-files of SPPC 4.2.0 and subsequently add the contributions you already had added.

Share this post


Link to post
Share on other sites

Is there anyway to set the default customer group to 'Wholesale' or something other than Retail. Like when a new customer fills out the form for a new account, is there a MOD already created that lets the user select which group they would like to be a part of? Let me know. Here's my site im working on - www.southeasternmktg.com. Thank you.

Share this post


Link to post
Share on other sites

Hello,

 

Is it possible or is there a contribution that will allow for separate downloads for different customer base. For example, I have downloads I only want dealers to have, and same for distributors. Need to only have access to downloads for the desired login.

 

Thanks JR

Share this post


Link to post
Share on other sites
You are not using RC1 (release candidate 1, the latest version of osC 2) but an older version of osC 2 (milestone 2 updated in either 2005 or 2006 usually referred to as osC 2.2). That will make a difference if you upload files from the package because then you will (possibly) mix code of RC1 with an older version. There was a new function for the price that is used in the class shopping_cart for example.

 

What it means is that you would either have to manually add the SPPC code to your files (which is not a problem, just an awful lot of work) or change all your files to the RC1 ones (and add the table administrators) then add the ready-made-files of SPPC 4.2.0 and subsequently add the contributions you already had added.

Jan - Is your SPPC attributes mod rev. 1 (14-Nov-2006) compatible with osC 2.2?

 

I'm running SPPC on a heavily modded osC 2.2 site and was considering upgrading to SPPC 4.2, until I read your comments.

 

Kind regards,

EricK

Share this post


Link to post
Share on other sites

My question:

Does the SPPC contribution contain the ability to have different products available to different groups?

 

For example:

Wholesale customers buy the product in a box of 6 individual items. (Product X-W)

Retail customers buy the product as an individual item. (Product X-R)

 

Entering completely separate products for these two scenarios would be necessary (from my understanding), but would the SPPC contribution allow me to "turn off" products for a particular group? Wholesale customers only see certain products and Retail customers only see certain products.

 

I'm working on OSC MS2.2, heavily modified with many custom additions. Tweaking a module is not a big deal. Just hoping to find more information before spending many hours on a manual install.

 

 

Thanks for any insight.

Share this post


Link to post
Share on other sites

Great contributions and excellent documentation. I'm currently using OSCommerce 2.2 RC1 with SPPC 4.2 and Hide Products 2.02 for SPPC. SPPC4.2 and SPPC Hide Products 2.02 are newly installed (and this took a few days to insert the code due to the fact Hide Products 2.02 was written pre-RC1). All is seemingly working except for an error caused during my customer's login sequence.

 

If GUEST/RETAIL shopping cart has an item when logging in to WHOLESALE account, login is successful.

 

If GUEST/RETAIL shopping cart is empty but WHOLESALE account has previously added item, login is successful.

 

If GUEST/RETAIL shopping cart is empty and WHOLESALE cart is empty, the following error occurs:

 

Warning: implode(): Bad arguments. in /catalog/includes/functions/general.php on line 2276

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

 

select p.products_id, find_in_set('1', products_hide_from_groups) as hide_or_not, find_in_set('1', categories_hide_from_groups) as in_hidden_category from products p left join products_to_categories p2c using(products_id) left join categories c using(categories_id) where p.products_id in ()

 

[TEP STOP]

 

The following is a snippet from /catalog/includes/functions/general.php, where line 2276 is

 

$list_of_products_ids = implode(',', $int_products_id_array);

 

// BOF SPPC, hide products and categories from groups
 function tep_get_hide_status_single($customer_group_id, $pid_for_hide) {
		    $hide_query = tep_db_query("select find_in_set('" . $customer_group_id . "', products_hide_from_groups) as hide_or_not, find_in_set('" . $customer_group_id . "', categories_hide_from_groups) as in_hidden_category from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_id = '" . $pid_for_hide . "'");
    // since a product can be in more than one category (linked products) we have to check for the
    // possibility of more than one row returned
    while ($_hide_product_array = tep_db_fetch_array($hide_query)) {
	    $hide_product_array[] = $_hide_product_array; 
    }
     if (is_array($hide_product_array)) { // if products_id exists
       foreach ($hide_product_array as $key => $hide_product_sub_array) {
	       if ($hide_product_sub_array['hide_or_not'] != '0') { 
			   $hide_product = true; 
			   }
	    // if the product is also present in a category that is not hidden it should be possible 
	    // to buy it, delete it, get notifications etcetera
	         elseif ($hide_product_sub_array['in_hidden_category'] == '0') { 
	           $hide_product = false; 
	    // no need to continue with foreach
	         break;
	       } elseif ($hide_product_sub_array['in_hidden_category'] != '0') {
					   $hide_product = true;
				 } 
       } // end  foreach ($hide_product_array as $key => $hide_product_sub_array)
     } else { // if a product_id doesn't exist
       $hide_product = true;
     }
  return $hide_product;
}

 function tep_get_hide_status($hide_status_products, $customer_group_id, $temp_post_get_array) {
	foreach ($temp_post_get_array as $key => $value) {
    $int_products_id = tep_get_prid($value);
 // the November 13 updated MS2.2 function tep_get_prid 
 // can return false with an invalid products_id 
	     if ($int_products_id != false ) {
	        $int_products_id_array[] = $int_products_id;
       }
          $list_of_products_ids = implode(',', $int_products_id_array);
    } // end foreach ($temp_post_get_array as $key => $value)

 	 $hide_query = tep_db_query("select p.products_id, find_in_set('".$customer_group_id."', products_hide_from_groups) as hide_or_not, find_in_set('".$customer_group_id."', categories_hide_from_groups) as in_hidden_category from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_id in (" . $list_of_products_ids . ")");
    // since a product can be in more than one category (linked products) we have to check for the
    // possibility of more than one row returned for each products_id where "hide_or_not"
    // is the same for every row, but "in_hidden_category" can be different
    unset($int_products_id_array); // start over
		$int_products_id_array = array();
		if (tep_not_null($hide_status_products)) {
		  foreach($hide_status_products as $key => $subarray) {
    $int_products_id_array[] = $hide_status_products['products_id'];
			}
		} // end if (tep_not_null($hide_status_products))
    while ($hide_products_array = tep_db_fetch_array($hide_query)) {
			$cat_hidden = '1';
			$prod_hidden = '0';
				if ($hide_products_array['hide_or_not'] != '0') {
					$prod_hidden = '1';
				} elseif ($hide_products_array['in_hidden_category'] == '0') {
					$cat_hidden = '0';
				}
				if ($prod_hidden == '0' && $cat_hidden == '0') { 
					$hidden = '0'; 
				} else {
					$hidden = '1';
				}
			  if (in_array($hide_products_array['products_id'], $int_products_id_array)) {
             foreach($hide_status_products as $key => $subarray) {
               if ($subarray['products_id'] == $hide_products_array['products_id']) {
								if ($subarray['hidden'] == '1' && $subarray['prod_hidden'] == '0' && $cat_hidden == '0') {
									// product is not a hidden one and now found to be in a category that is not hidden
                 $hide_status_products[$key]['hidden'] = '0';
								}
               } // end if ($subarray['products_id'] == $hide_products_array['products_id'])
              } // end foreach ($hide_status_products as $key => $subarray)
				  } else { 
					$hide_status_products[] = array('products_id' => $hide_products_array['products_id'], 'hidden' => $hidden, 'prod_hidden' => $prod_hidden);
				  }
       $int_products_id_array[] = $hide_products_array['products_id'];
    } // end while
		return $hide_status_products;
 }
// EOF SPPC, hide products and categories from groups

 

I have checked Post #3564, which seems to be a related problem, but I was not able to infer the solution. What is going wrong with my existing customer logins to WHOLESALE status when their carts have zero (0) items that causes this error?

Share this post


Link to post
Share on other sites
All is seemingly working except for an error caused during my customer's login sequence.

 

If GUEST/RETAIL shopping cart has an item when logging in to WHOLESALE account, login is successful.

 

If GUEST/RETAIL shopping cart is empty but WHOLESALE account has previously added item, login is successful.

 

If GUEST/RETAIL shopping cart is empty and WHOLESALE cart is empty, the following error occurs:

I tried to replicate that error but I can't. This would seem to be the place where the function is called (in login.php the function restore_contents from the class shopping_cart.php is called:

	  $products_query = tep_db_query("select products_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
// BOF SPPC hide products and categories from groups
		$no_of_products_in_basket = 0;
  while ($_products = tep_db_fetch_array($products_query)) {
	$temp_post_get_array[] = $_products['products_id'];
			$products[] = $_products;
			$no_of_products_in_basket += 1;
		}
 if ($no_of_products_in_basket > 0) {
			$hide_status_products = array();
			$hide_status_products = tep_get_hide_status($hide_status_products, $this->cg_id, $temp_post_get_array);

It looks like there is some item in the table customers_basket for that customer that doesn't have a products_id (some other contribution involved here?).

Share this post


Link to post
Share on other sites
Is there anyway to set the default customer group to 'Wholesale' or something other than Retail. Like when a new customer fills out the form for a new account, is there a MOD already created that lets the user select which group they would like to be a part of? Let me know. Here's my site im working on - www.southeasternmktg.com. Thank you.

To me that sound ridiculous. Why would you give a retail customer the possibility to pose as a wholesale customer and buy at/see lower prices?

 

But of course you can add a drop-down (there are some notes/instructions/examples in this thread) as a new html field in create_account.php, let them make their choice and set in the sql_array for the table customers the customer_group on the basis of the choice (at present the default for the column: 0 is used).

Share this post


Link to post
Share on other sites
Is it possible or is there a contribution that will allow for separate downloads for different customer base. For example, I have downloads I only want dealers to have, and same for distributors. Need to only have access to downloads for the desired login.

Do you mean downloads as a product or downloads like manuals or something? I must say I haven't looked at hiding downloadable products in the Hide products from customer groups for SPPC. Of course you can always do things in regular PHP files based on the customer_group_id.

Share this post


Link to post
Share on other sites
Jan - Is your SPPC attributes mod rev. 1 (14-Nov-2006) compatible with osC 2.2?

Which 2.2? The pre-2005, update 2005, update 2006 or RC1? Actually, it is compatible with all of them, as long as you don't rely on the pre-packaged files but on the manual instructions.

 

I'm running SPPC on a heavily modded osC 2.2 site and was considering upgrading to SPPC 4.2, until I read your comments.

There are no upgrade instructions for SPPC 4.2 (yet... hopefully). There are a number of changes, the biggest one I think that the tax_id is moved to another table.

Share this post


Link to post
Share on other sites

Hello Jan,

 

Thanks for the reply. Sorry, what I meant is that I have price sheets for dealers and distributors. Would like it if they can down load the sheets depending on the customer group.

 

Thanks JR

Share this post


Link to post
Share on other sites
what I meant is that I have price sheets for dealers and distributors. Would like it if they can down load the sheets depending on the customer group.

Just echo the link to the different price sheets depending on the customer group. Don't make the name of the distributor/dealer price sheet easily guessable :)

Share this post


Link to post
Share on other sites
It looks like there is some item in the table customers_basket for that customer that doesn't have a products_id (some other contribution involved here?).

 

Your assumptions were 100% spot on :thumbsup: . We have been testing with an existing user account by toggling back and forth to wholesale and retail settings. After your advice, we created a new user and set them to wholesale and now the shopping cart to login sequence to check out features all work properly. I have not combed the table customers_basket to determine what exactly caused the problem for this existing user. I want to believe this is a fluke caused by too many tests, products that no longer exist, old session files or something of the like, which are all unlikely to occur with NEW wholesale accounts.

 

As an aside, when the error was occurring on the screen, I was able to hit the back button and be magically logged in as if the error had not occurred. You also asked about additional contributions for which I use many that conflicted with the install and required many hours to manually merge. The most notorious and perhaps source of many conflicts was Purchase Without Account or PWA. I actually disabled this feature some time ago because it was not compatible with our QBI (Quickbooks Integration software), however the code is still tangled into our OSC shop.

 

Jan, thank you again for amazing support! I was able to resolve most problems before this one by simply checking the contribution manuals and reading the forums. Having you respond to my post really saved the day!

Share this post


Link to post
Share on other sites
I was able to hit the back button and be magically logged in as if the error had not occurred.

True, you're first logged-in and then the restore_contents function in the shopping cart class is called. So if there is an error in there, you still are logged-in.

Share this post


Link to post
Share on other sites
To me that sound ridiculous. Why would you give a retail customer the possibility to pose as a wholesale customer and buy at/see lower prices?

 

But of course you can add a drop-down (there are some notes/instructions/examples in this thread) as a new html field in create_account.php, let them make their choice and set in the sql_array for the table customers the customer_group on the basis of the choice (at present the default for the column: 0 is used).

 

Jan,

 

Actually, it's not too ridiculous. I would like the same function as well. Currently we are using OSCommerce to create an order system for our internal use and it would be nice to default customers to a group other than Retail. We are primarily a b2b company at the moment and our default pricing is not retail for any of our customers. We can switch back to the preferred method of SPPC use later, but for now it would be nice to default it to another customer group. It would save the admin tons of time too. Thanks.

Share this post


Link to post
Share on other sites
Actually, it's not too ridiculous. I would like the same function as well. Currently we are using OSCommerce to create an order system for our internal use and it would be nice to default customers to a group other than Retail. We are primarily a b2b company at the moment and our default pricing is not retail for any of our customers. We can switch back to the preferred method of SPPC use later, but for now it would be nice to default it to another customer group. It would save the admin tons of time too. Thanks.

Then go ahead and add your code to create_account.php. I made it even easier to do that in version 4.2. What is the problem?

 

You add another input field or drop-down, let's say you name this group_id. Then process the POST variable group_id say around line 33:

	$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

// BOF processing selected group
$group_id = tep_db_prepare_input($HTTP_POST_VARS['group_id']);
// EOF processing selected group

// BOF Separate Pricing Per Customer, added: field for tax id number

Then add your code for evaluating what has been typed in or chosen from a drop-down around line 178, where all the other stuff has been dealt with:

	  $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}
// add your code to evaluate the group and now introduce and set the new variable $customers_group_id

A couple of lines further you add the group_id to the sql_array:

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

// BOF processing group
  $sql_data_array['customers_group_id'] = $customers_group_id; 
// EOF processing group

and done.

Share this post


Link to post
Share on other sites
Then go ahead and add your code to create_account.php. I made it even easier to do that in version 4.2. What is the problem?

 

Because not all of us are programming masters like you. :thumbsup:

Share this post


Link to post
Share on other sites
Because not all of us are programming masters like you.

Don't tell anybody then... I'm just an amateur.

Share this post


Link to post
Share on other sites
Don't tell anybody then... I'm just an amateur.

 

I would sacrifice my friends girlfriend for the knowledge you have. Seriously though, I was a bit confused about some comments I found in create_account.php. I've been hunting around for it for a few days (I am not even a junior programmer) and I couldn't see it. Here's the section I'm referring to:

 

// BOF Separate Pricing Per Customer
// register SPPC session variables for the new customer
// if there is code above that puts new customers directly into another customer group (default is retail)
// then the below code need not be changed, it uses the newly inserted customer group
     $check_customer_group_info = tep_db_query("select c.customers_group_id, cg.customers_group_show_tax, cg.customers_group_tax_exempt, cg.group_specific_taxes_exempt from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id) where c.customers_id = '" . $customer_id . "'");
     $customer_group_info = tep_db_fetch_array($check_customer_group_info);
     $sppc_customer_group_id = $customer_group_info['customers_group_id'];
     $sppc_customer_group_show_tax = (int)$customer_group_info['customers_group_show_tax'];
     $sppc_customer_group_tax_exempt = (int)$customer_group_info['customers_group_tax_exempt'];
     $sppc_customer_specific_taxes_exempt = '';
     if (tep_not_null($customer_group_info['group_specific_taxes_exempt'])) {
       $sppc_customer_specific_taxes_exempt = $customer_group_info['group_specific_taxes_exempt'];
     }
// EOF Separate Pricing Per Customer

 

The whole "if there is code above" part is throwing me off. Sorry to bug you, but if I can just change one variable, then it would be great as 90% of our customers will be in an alternate group and the rest the admins can take care of. If it's really simple, just point me to it and I'll take care of it myself, but if it requires some kind of coding, could you assist? Thanks.

Share this post


Link to post
Share on other sites
Is there anyway to set the default customer group to 'Wholesale' or something other than Retail. Like when a new customer fills out the form for a new account, is there a MOD already created that lets the user select which group they would like to be a part of? Let me know. Here's my site im working on - www.southeasternmktg.com. Thank you.

Here is an example of how I accomplish this.

Please beware that I use a heavily modified version of create account. I dissected the necessary code and pasted it into a clean create_account.php from ms2.2 I hope I got it right If yo have problems or need help implementing the code :

 

this code will let the customer choose their account type upon registration. It will auto assign the customer to the designated group.

 

you will need to change the defines at the top of the file as well as the group ids in the radio fields.

 

<?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 © 2003 osCommerce

 

Released under the GNU General Public License

*/

<?php define('ENTRY_GROUP_ID_TEXT', '');

define('ENTRY_GROUP_ID', 'Type of Account:');

define('ENTRY_GROUP_ID0', 'Individual');

define('ENTRY_GROUP_ID1', 'Business');

define('ENTRY_GROUP_ID2', 'Educational');

define('ENTRY_GROUP_ID3', 'Religious');

define('ENTRY_GROUP_ID4', 'Medical');

define('ENTRY_GROUP_ID5', 'Fundraiser');

define('ENTRY_GROUP_ID6', 'Screen Printing');

define('ENTRY_GROUP_ID7', 'Embroidery');

define('ENTRY_GROUP_ID8', 'ASI');

define('ENTRY_GROUP_ID9', 'PPAI');

define('ENTRY_GROUP_ID10', 'Reseller');

define('ENTRY_GROUP_ID11', 'Distributor');

define('ENTRY_GROUP_ID12', 'Other');

?>

 

require('includes/application_top.php');

 

// 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')) {

$process = true;

 

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']);

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

}

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 

$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 (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 = '" . tep_db_input($state) . "' or zone_code = '" . 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 (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,

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

 

// 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;

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', '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"><?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'); ?><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>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.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>

<tr>

<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></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 class="main"><b><?php echo CATEGORY_PERSONAL; ?></b></td>

<td class="inputRequirement" 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 // start loadmaster auto group assignment example ?>

<tr>

<td class="main" colspan="2">

<table summary="">

<tr><td class="main" colspan="3"><?php echo ENTRY_GROUP_ID; ?></td></tr>

<tr>

<td class="productPriceInBox"><?php echo tep_draw_radio_field('group_id', '0') . '  ' . ENTRY_GROUP_ID0 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '1') . '  ' . ENTRY_GROUP_ID1 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '2') . '  ' . ENTRY_GROUP_ID2 . ' </td></tr><tr><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '3') . '  ' . ENTRY_GROUP_ID3 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '4') . '  ' . ENTRY_GROUP_ID4 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '5') . '  ' . ENTRY_GROUP_ID5 . ' </td></tr><tr><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '6') . '  ' . ENTRY_GROUP_ID6 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '7') . '  ' . ENTRY_GROUP_ID7 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '8') . '  ' . ENTRY_GROUP_ID8 . ' </td></tr><tr><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '9') . '  ' . ENTRY_GROUP_ID9 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '10') . '  ' . ENTRY_GROUP_ID10 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '11') . '  ' . ENTRY_GROUP_ID11 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '12') . '  ' . ENTRY_GROUP_ID12 . ' </td>' . (tep_not_null(ENTRY_GROUP_ID_TEXT) ? '<span class="inputRequirement">' . ENTRY_GROUP_ID_TEXT . '</span>': ''); ?></tr>

</table>

</td>

</tr>

<?php // end loadmaster auto group assignment example ?>

<?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_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>

</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_PASSWORD; ?></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_PASSWORD; ?></td>

<td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>

<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_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><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><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></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'); ?>

Edited by loadmaster

"Will code for food"

www.AHitchhiker.com

Share this post


Link to post
Share on other sites

Sorry for the double post, but there was a serious error in the code I posted yesterday. Here it is all fixed up.

 

Here is an example of how I accomplish this.

Please beware that I use a heavily modified version of create account. I dissected the necessary code and pasted it into a clean create_account.php from ms2.2 I hope I got it right If yo have problems or need help implementing the code :

 

this code will let the customer choose their account type upon registration. It will auto assign the customer to the designated group.

 

you will need to change the defines at the top of the file as well as the group ids in the radio fields.

 

 

<?php define('ENTRY_GROUP_ID_TEXT', 'test');

define('ENTRY_GROUP_ID', 'Type of Account:');

define('ENTRY_GROUP_ID0', 'Individual');

define('ENTRY_GROUP_ID1', 'Business');

define('ENTRY_GROUP_ID2', 'Educational');

define('ENTRY_GROUP_ID3', 'Religious');

define('ENTRY_GROUP_ID4', 'Medical');

define('ENTRY_GROUP_ID5', 'Fundraiser');

define('ENTRY_GROUP_ID6', 'Screen Printing');

define('ENTRY_GROUP_ID7', 'Embroidery');

define('ENTRY_GROUP_ID8', 'ASI');

define('ENTRY_GROUP_ID9', 'PPAI');

define('ENTRY_GROUP_ID10', 'Reseller');

define('ENTRY_GROUP_ID11', 'Distributor');

define('ENTRY_GROUP_ID12', 'Other');

 

/*

$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 © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// 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')) {

$process = true;

 

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']);

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

}

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 

$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 (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 = '" . tep_db_input($state) . "' or zone_code = '" . 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 (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,

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

 

// 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;

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', '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"><?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'); ?><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>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.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>

<tr>

<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></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 class="main"><b><?php echo CATEGORY_PERSONAL; ?></b></td>

<td class="inputRequirement" 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 // start loadmaster auto group assignment example ?>

<tr>

<td class="main" colspan="2">

<table summary="">

<tr><td class="main" colspan="3"><?php echo ENTRY_GROUP_ID; ?></td></tr>

<tr>

<td class="productPriceInBox"><?php echo tep_draw_radio_field('group_id', '0') . '  ' . ENTRY_GROUP_ID0 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '1') . '  ' . ENTRY_GROUP_ID1 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '2') . '  ' . ENTRY_GROUP_ID2 . ' </td></tr><tr><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '3') . '  ' . ENTRY_GROUP_ID3 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '4') . '  ' . ENTRY_GROUP_ID4 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '5') . '  ' . ENTRY_GROUP_ID5 . ' </td></tr><tr><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '6') . '  ' . ENTRY_GROUP_ID6 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '7') . '  ' . ENTRY_GROUP_ID7 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '8') . '  ' . ENTRY_GROUP_ID8 . ' </td></tr><tr><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '9') . '  ' . ENTRY_GROUP_ID9 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '10') . '  ' . ENTRY_GROUP_ID10 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '11') . '  ' . ENTRY_GROUP_ID11 . ' </td><td class="productPriceInBox"> ' . tep_draw_radio_field('group_id', '12') . '  ' . ENTRY_GROUP_ID12 . ' </td>' . (tep_not_null(ENTRY_GROUP_ID_TEXT) ? '<span class="inputRequirement">' . ENTRY_GROUP_ID_TEXT . '</span>': ''); ?></tr>

</table>

</td>

</tr>

<?php // end loadmaster auto group assignment example ?>

<?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_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>

</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_PASSWORD; ?></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_PASSWORD; ?></td>

<td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>

<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_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><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><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></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'); ?>


"Will code for food"

www.AHitchhiker.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×