nana Posted December 23, 2005 Author Share Posted December 23, 2005 maybe changing <td><?phpif (tep_session_is_registered('customer_id')){ echo '<a href="' . to <td><?php if (tep_session_is_registered('customer_id')){ echo '<a href="' . notice space between <?php if might be the problem Quote Link to comment Share on other sites More sharing options...
sbursik Posted December 23, 2005 Share Posted December 23, 2005 That did it! Thanks nana! Quote Link to comment Share on other sites More sharing options...
faris10 Posted December 27, 2005 Share Posted December 27, 2005 this is the support tread forhttp://www.oscommerce.com/community/contributions,3469 does this support 2checkout ? Quote Link to comment Share on other sites More sharing options...
nana Posted December 28, 2005 Author Share Posted December 28, 2005 happy holidays everyone faris i have not tried it but there is no reason why it should not work with every payment module just like stock osc please make sure everything works as you want before installing fec this way you can get help easier for your other contributions and then we can help you here with integration of fec if any issues comes up Quote Link to comment Share on other sites More sharing options...
faris10 Posted December 28, 2005 Share Posted December 28, 2005 happy holidays everyone faris i have not tried it but there is no reason why it should not work with every payment module just like stock osc please make sure everything works as you want before installing fec this way you can get help easier for your other contributions and then we can help you here with integration of fec if any issues comes up OKay , I will try that . thanks Quote Link to comment Share on other sites More sharing options...
mr_absinthe Posted December 29, 2005 Share Posted December 29, 2005 Hi, I received few emails from my customers relating to their experience during checkout process and because I think it should be shared, here is the most important one that summarize them all: " Incidentally, though, your purchase process is a bit confusing since it seems that you may have to enter your credit card after you "Confirm Order", but it doesn't really say that anywhere? This does not follow the typical e-commerce order flow." I use standard osCommerce checkout process with few contributions such as Country- State Selector (should be definitely included in fast easy!) CCGV, PWA etc. I also use third party processing bank, therefore I don't collect credit card details. Perhaps the above could be taken into consideration when working on better checkout such as fast easy. I really appreciate your hard work. All the best in 2006! :thumbsup: Alex Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
faris10 Posted December 29, 2005 Share Posted December 29, 2005 this is the support tread forhttp://www.oscommerce.com/community/contributions,3469 STEP FIVE to change the create account procedure first choice removes the create account option totaly from this stage second choice combines login. and optional create an account in checkout_shipping.php change these two lines to reflect your choices // tep_redirect(tep_href_link('create_account3.php', '', 'SSL')); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); tep_redirect(tep_href_link('create_account3.php', '', 'SSL')); // tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); also now both files have some configurations that allow you to adjust these to act diffrently please try to see what you like I could not find this part . I had a new installation of OSC Also I recieve the next error Parse error: parse error in /home/carolin1/public_html/osCommerce/catalog/checkout_confirmation.php on line 71 I think that was as a reasult of not doing the next step right something that I didnt understand The STEP also in checkout_confirmation.php you have to unregister all cc info that you enter in the payment forms like i did for authorize-net here if you do not know the name of the key un comment the print line to see them if you are using ccgv uncomment the two lines as it says in he code right before this code around line 67 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')); } add /// 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')); } Quote Link to comment Share on other sites More sharing options...
nana Posted December 29, 2005 Author Share Posted December 29, 2005 alex maybe you should change the confirm button to confirm and pay since you are using outside processing i have no other idea how to overcome your situation also remember adding other contributions will complicate instalation process and i am trying to avoid that faris there are two diffrent create account files and you decide which one you want to use create_account.php and create_account3.php in the beginning of checkout_shipping.php you decide which one the customer is directed to also in each create_account.php and create_account3.php on top you can make some choices easies way for you to understand is changing them and looking at what changes Quote Link to comment Share on other sites More sharing options...
richmoijn Posted January 2, 2006 Share Posted January 2, 2006 Hi! I've sort of a problem... When I go through the login.php page and click "create new user" the create_account.php with the "extension" ?fromlogin=1... I would really not want this to happen though this means I cannot create a new user cause the new user cannot log-in again though he doesn't recieve any confirmation mail... What I would like to appear is the create_account that appears when typing only create_account.php (the one with customer information and whether he/she would like to create an account (but without the login-box...) Is it possible? What can I do to sort this problem out? Thank you! It's a great contrib! Quote Link to comment Share on other sites More sharing options...
timothyj Posted January 3, 2006 Share Posted January 3, 2006 is there anyway i can implement a cash on pickup feature with fast and easy checkout out? thanks for the gr8 contrib! Quote Link to comment Share on other sites More sharing options...
nana Posted January 4, 2006 Author Share Posted January 4, 2006 (edited) tim you should find a contribution for this and it should work richard you can change the link in login.php tp any file just copy a file that does what you want name it something else and link to it Edited January 4, 2006 by nana Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 4, 2006 Share Posted January 4, 2006 Thanks for the great contrib nana! I just noticed something and as a newb I'm not sure if it's related to your mod. I have a clean install with -PayPal_Shopping_Cart_IPN -fast easy checkout I created a new user account and made a purchase fine. Then I logged off. I then returned to log in and it says my email doesn't exist...as though my account's not there. I check in admin and the account is there. I create a new account with the exact same info and it proceeds (shouldn't it realize the duplicate?).....and then I try logging off again and run into the same problems when I try to log back in. Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 4, 2006 Share Posted January 4, 2006 oh I just found something else. I receive an email showing my order process and there is the following link: You may create an account by following this link and entering a password of your own choice: http://www.edmontonsportriderz.com/store/a...&customers_id=3 You will then be taken to another screen where you can log in to your new account Products However when you click the link I get: Parse error: parse error, unexpected '{' in /home2/edmonton/public_html/store/account_password_new.php on line 237 Sorry if any of these have been covered....I actually did read through about 20 pages, but my eyes hurt now. Quote Link to comment Share on other sites More sharing options...
nana Posted January 4, 2006 Author Share Posted January 4, 2006 froggy which create account are you using so i can look and the answer to your second question was answered in last page Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 4, 2006 Share Posted January 4, 2006 nana, Here is the line on the main page "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?" I followed the link that says create an account. Quote Link to comment Share on other sites More sharing options...
nana Posted January 4, 2006 Author Share Posted January 4, 2006 (edited) can you copy and paste what is in your browser address field it is better if you create a link but if you cannt then just change the domain name Edited January 4, 2006 by nana Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 4, 2006 Share Posted January 4, 2006 nana, I have found the problem. From the main page there is this "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?" If I follow the link that says "log yourself in" -then select I am a new customer -fill out the details and hit continue -it brings me to my shopping cart and says empty -hit continue and you're back to the main page -log off and try to log back in and nothing. If I follow the link that says "create an account" -the details page is different looking but it works. See my screenshots....there seems to be some uglyness on the page. Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 4, 2006 Share Posted January 4, 2006 If I follow the "log yourself in" and then select I am a new customer the continue button points to "/store/create_account.php?fromlogin=1 whereas if I just select from the main page "create account" it points to "/store/create_account.php" Quote Link to comment Share on other sites More sharing options...
nana Posted January 4, 2006 Author Share Posted January 4, 2006 i see the link on top i will take a look a little later i have made a test account email test1@seelily.com can you check what is the createaccount field for this entery in your db Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 4, 2006 Share Posted January 4, 2006 the create account field is "N" Quote Link to comment Share on other sites More sharing options...
nana Posted January 5, 2006 Author Share Posted January 5, 2006 can you try this as 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); $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']); } else{ //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']); $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; 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('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> <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> <?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('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'); ?> was missing an else{} also add to the includes/languages/english.php before closing ?> 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 track of the orders you have previously made.'); 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'); define('LOGINBOX_TEXT_PASSWORD', 'Password'); define('LOGINBOX_TEXT_PASSWORD', 'Password forgotten? Click.'); define('LOGINBOX__FORGOT_PASSWORD', 'Password forgotten? Click here.'); and any other missing language defines that you will find test and let me know if it works Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 5, 2006 Share Posted January 5, 2006 with your new create_account.php I get the following. "Warning: main(account_box.php): failed to open stream: No such file or directory in /home2/edmonton/public_html/store/create_account.php on line 604" I don't see this file anywhere else....am I missing somthing perhaps. Also if I select "create account" from the main page I now get. "Warning: main(login_box.php): failed to open stream: No such file or directory in /home2/edmonton/public_html/store/create_account.php on line 378" Obviously I'm missing some files? Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 5, 2006 Share Posted January 5, 2006 ok I found those 2 files in the includes/fec/ so I copied them to the root directory and it cleared those errors. However I tested a new account again and same problem. I checked the database and create account is still set to N Quote Link to comment Share on other sites More sharing options...
FROGGYJ Posted January 5, 2006 Share Posted January 5, 2006 (edited) oh and for the second problem....most of them were cleared up with the addition to english.php....however there are still 2 goofed for some reason. only two with problems are -LOGINBOX_PASSWORD -LOGINBOX_FORGOT_PASSWORD Edited January 5, 2006 by FROGGYJ Quote Link to comment Share on other sites More sharing options...
nana Posted January 5, 2006 Author Share Posted January 5, 2006 try this for 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); $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']); } else{ //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']); $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; 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('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, 'fromlogin='.$fromlogin, '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> <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> <?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('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'); ?> and this to english file also just look how this is done so you can change them as you want in create account file i made some changes to line 384 please make the same change to create account 3 if you want to use it define('HEADING_TITLE_2', 'Create Account'); define('LOGINBOX_PASSWORD', 'Password'); define('LOGINBOX_FORGOT_PASSWORD', 'Forgotten password?'); define('MY_PASSWORD_TITLE', 'Choose a Password to create an account'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.