Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Header for PWA, anyone?


bbx76

Recommended Posts

I just recently added PWA module to my test site, however, I stumbled into few problems:

1. The Heading on the PWA module says "HEADING_TITLE_PWA" and I can't change it even though I already updated the english.php with added line:

define('HEADER_TITLE_PWA', 'Purchase Without Account');

Anybody knows how to fix this?

2. I also found few out of place characters in my page also. I don't know which lines I should remove.

Does anybody know how?

 

Please see attached screen capture... Thanks!

http://s912.photobucket.com/albums/ac324/bbx76/?action=view&current=PWA_problem.jpg

Link to comment
Share on other sites

I just recently added PWA module to my test site, however, I stumbled into few problems:

1. The Heading on the PWA module says "HEADING_TITLE_PWA" and I can't change it even though I already updated the english.php with added line:

define('HEADER_TITLE_PWA', 'Purchase Without Account');

Anybody knows how to fix this?

2. I also found few out of place characters in my page also. I don't know which lines I should remove.

Does anybody know how?

 

Please see attached screen capture... Thanks!

http://s912.photobucket.com/albums/ac324/bbx76/?action=view&current=PWA_problem.jpg

 

Hello,

 

Post your code for that page, it's a PHP coding issue. the first '>' towards the top of the page appears to be a PHP closing prompt that's probably missing the ? before it. The Second } ?> appears to be the ending of a PHP If statement, perhaps the PHP section was prematurely ended. This may also be the culprit as to why your HEADING_TITLE_PWA isn't displaying correctly.

 

Frank

Link to comment
Share on other sites

Dear all,

Thanks for your prompt responses.

 

For George (multimixer), I have tried to use "HEADING" instead of header before, but to no avail. Same thing... and I saw all other definition is "HEADER" so I reverted back to HEADER (I thought that was the correct norm).

Can you advise where I did wrong? See attached code for english.php below. Thanks again.

 

<?php

/*

$Id: english.php,v 1.114 2003/07/09 18:13:39 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// look in your $PATH_LOCALE/locale directory for available locales

// or type locale -a on the server.

// Examples:

// on RedHat try 'en_US'

// on FreeBSD try 'en_US.ISO_8859-1'

// on Windows try 'en', or 'English'

@setlocale(LC_TIME, 'en_US.ISO_8859-1');

 

define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()

define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

define('DATE_FORMAT', 'm/d/Y'); // this is used for date()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

////

// Return date in raw format

// $date should be in format mm/dd/yyyy

// raw date is in format YYYYMMDD, or DDMMYYYY

function tep_date_raw($date, $reverse = false) {

if ($reverse) {

return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);

}

}

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'USD');

 

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="en"');

 

// charset for web pages and emails

define('CHARSET', 'iso-8859-1');

 

// page title

define('TITLE', STORE_NAME);

 

// header text in includes/header.php

define('HEADER_TITLE_CREATE_ACCOUNT', 'Create an Account');

define('HEADER_TITLE_MY_ACCOUNT', 'My Account');

define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents');

define('HEADER_TITLE_CHECKOUT', 'Checkout');

define('HEADER_TITLE_TOP', 'Top');

define('HEADER_TITLE_CATALOG', 'Catalog');

define('HEADER_TITLE_PWA', 'Purchase Without Account');

define('HEADER_TITLE_LOGOFF', 'Log Off');

 

define('HEADING_TITLE_LOGIN', 'Log In');

 

// footer text in includes/footer.php

define('FOOTER_TEXT_REQUESTS_SINCE', 'requests since');

 

// text for gender

define('MALE', 'Male');

define('FEMALE', 'Female');

define('MALE_ADDRESS', 'Mr.');

define('FEMALE_ADDRESS', 'Ms.');

 

// text for date of birth example

define('DOB_FORMAT_STRING', 'mm/dd/yyyy');

 

// categories box text in includes/boxes/categories.php

define('BOX_HEADING_CATEGORIES', 'Categories');

 

// manufacturers box text in includes/boxes/manufacturers.php

define('BOX_HEADING_MANUFACTURERS', 'Brands');

 

// whats_new box text in includes/boxes/whats_new.php

define('BOX_HEADING_WHATS_NEW', 'New offers');

define('BOX_HEADING_WHATS_NEW2', 'What\'s New?');

 

// quick_find box text in includes/boxes/quick_find.php

define('BOX_HEADING_SEARCH', 'Quick Search');

define('BOX_SEARCH_TEXT', 'Use keywords to find the product you are looking for.');

define('BOX_SEARCH_ADVANCED_SEARCH', 'Advanced Search');

 

// specials box text in includes/boxes/specials.php

define('BOX_HEADING_SPECIALS', 'Specials');

 

// reviews box text in includes/boxes/reviews.php

define('BOX_HEADING_REVIEWS', 'Reviews');

define('BOX_REVIEWS_WRITE_REVIEW', 'Write a review on this product!');

define('BOX_REVIEWS_NO_REVIEWS', 'There are currently no product reviews');

define('BOX_REVIEWS_TEXT_OF_5_STARS', '%s of 5 Stars!');

 

// shopping_cart box text in includes/boxes/shopping_cart.php

define('BOX_HEADING_SHOPPING_CART', 'Shopping Cart');

define('BOX_SHOPPING_CART_EMPTY', ' items');

 

// order_history box text in includes/boxes/order_history.php

define('BOX_HEADING_CUSTOMER_ORDERS', 'Order History');

 

// best_sellers box text in includes/boxes/best_sellers.php

define('BOX_HEADING_BESTSELLERS', 'Bestsellers');

define('BOX_HEADING_BESTSELLERS_IN', 'Bestsellers in<br>  ');

 

// notifications box text in includes/boxes/products_notifications.php

define('BOX_HEADING_NOTIFICATIONS', 'Notifications');

define('BOX_NOTIFICATIONS_NOTIFY', 'Notify me of updates to <b>%s</b>');

define('BOX_NOTIFICATIONS_NOTIFY_REMOVE', 'Do not notify me of updates to <b>%s</b>');

 

// manufacturer box text

define('BOX_HEADING_MANUFACTURER_INFO', 'Manufacturer Info');

define('BOX_MANUFACTURER_INFO_HOMEPAGE', '%s Homepage');

define('BOX_MANUFACTURER_INFO_OTHER_PRODUCTS', 'Other products');

 

// languages box text in includes/boxes/languages.php

define('BOX_HEADING_LANGUAGES', 'Language:');

 

// currencies box text in includes/boxes/currencies.php

define('BOX_HEADING_CURRENCIES', 'Currencies');

 

// information box text in includes/boxes/information.php

define('BOX_HEADING_INFORMATION', 'Information');

define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');

define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

// tell a friend box text in includes/boxes/tell_a_friend.php

define('BOX_HEADING_TELL_A_FRIEND', 'Tell A Friend');

define('BOX_TELL_A_FRIEND_TEXT', 'Tell someone you know about this product.');

 

// checkout procedure text

define('CHECKOUT_BAR_DELIVERY', 'Delivery Information');

define('CHECKOUT_BAR_PAYMENT', 'Payment Information');

define('CHECKOUT_BAR_CONFIRMATION', 'Confirmation');

define('CHECKOUT_BAR_FINISHED', 'Finished!');

 

// pull down default text

define('PULL_DOWN_DEFAULT', 'Please Select');

define('TYPE_BELOW', 'Type Below');

 

// javascript messages

define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n');

 

define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.\n');

define('JS_REVIEW_RATING', '* You must rate the product for your review.\n');

 

define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please select a payment method for your order.\n');

 

define('JS_ERROR_SUBMITTED', 'This form has already been submitted. Please press Ok and wait for this process to be completed.');

 

define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Please select a payment method for your order.');

 

define('CATEGORY_COMPANY', 'Company Details');

define('CATEGORY_PERSONAL', 'Your Personal Details');

define('CATEGORY_ADDRESS', 'Your Address');

define('CATEGORY_CONTACT', 'Your Contact Information');

define('CATEGORY_OPTIONS', 'Options');

define('CATEGORY_PASSWORD', 'Your Password');

 

define('ENTRY_COMPANY', 'Company Name:');

define('ENTRY_COMPANY_ERROR', '');

define('ENTRY_COMPANY_TEXT', '');

define('ENTRY_GENDER', 'Gender:');

define('ENTRY_GENDER_ERROR', 'Please select your Gender.');

define('ENTRY_GENDER_TEXT', '*');

define('ENTRY_FIRST_NAME', 'First Name:');

define('ENTRY_FIRST_NAME_ERROR', 'Your First Name must contain a minimum of ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.');

define('ENTRY_FIRST_NAME_TEXT', '*');

define('ENTRY_LAST_NAME', 'Last Name:');

define('ENTRY_LAST_NAME_ERROR', 'Your Last Name must contain a minimum of ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters.');

define('ENTRY_LAST_NAME_TEXT', '*');

define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:');

define('ENTRY_DATE_OF_BIRTH_ERROR', 'Your Date of Birth must be in this format: MM/DD/YYYY (eg 05/21/1970)');

define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)');

define('ENTRY_EMAIL_ADDRESS', 'E-Mail Address:');

define('ENTRY_EMAIL_ADDRESS_ERROR', 'Your E-Mail Address must contain a minimum of ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' characters.');

define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', 'Your E-Mail Address does not appear to be valid - please make any necessary corrections.');

define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', 'Your E-Mail Address already exists in our records - please log in with the e-mail address or create an account with a different address.');

define('ENTRY_EMAIL_ADDRESS_TEXT', '*');

define('ENTRY_STREET_ADDRESS', 'Street Address:');

define('ENTRY_STREET_ADDRESS_ERROR', 'Your Street Address must contain a minimum of ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.');

define('ENTRY_STREET_ADDRESS_TEXT', '*');

define('ENTRY_SUBURB', 'Suburb:');

define('ENTRY_SUBURB_ERROR', '');

define('ENTRY_SUBURB_TEXT', '');

define('ENTRY_POST_CODE', 'Post Code:');

define('ENTRY_POST_CODE_ERROR', 'Your Post Code must contain a minimum of ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.');

define('ENTRY_POST_CODE_TEXT', '*');

define('ENTRY_CITY', 'City:');

define('ENTRY_CITY_ERROR', 'Your City must contain a minimum of ' . ENTRY_CITY_MIN_LENGTH . ' characters.');

define('ENTRY_CITY_TEXT', '*');

define('ENTRY_STATE', 'State/Province:');

define('ENTRY_STATE_ERROR', 'Your State must contain a minimum of ' . ENTRY_STATE_MIN_LENGTH . ' characters.');

define('ENTRY_STATE_ERROR_SELECT', 'Please select a state from the States pull down menu.');

define('ENTRY_STATE_TEXT', '*');

define('ENTRY_COUNTRY', 'Country:');

define('ENTRY_COUNTRY_ERROR', 'You must select a country from the Countries pull down menu.');

define('ENTRY_COUNTRY_TEXT', '*');

define('ENTRY_TELEPHONE_NUMBER', 'Telephone Number:');

define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your Telephone Number must contain a minimum of ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.');

define('ENTRY_TELEPHONE_NUMBER_TEXT', '*');

define('ENTRY_FAX_NUMBER', 'Fax Number:');

define('ENTRY_FAX_NUMBER_ERROR', '');

define('ENTRY_FAX_NUMBER_TEXT', '');

define('ENTRY_NEWSLETTER', 'Newsletter:');

define('ENTRY_NEWSLETTER_TEXT', '');

define('ENTRY_NEWSLETTER_YES', 'Subscribed');

define('ENTRY_NEWSLETTER_NO', 'Unsubscribed');

define('ENTRY_NEWSLETTER_ERROR', '');

define('ENTRY_PASSWORD', 'Password:');

define('ENTRY_PASSWORD_ERROR', 'Your Password must contain a minimum of ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.');

define('ENTRY_PASSWORD_ERROR_NOT_MATCHING', 'The Password Confirmation must match your Password.');

define('ENTRY_PASSWORD_TEXT', '*');

define('ENTRY_PASSWORD_CONFIRMATION', 'Password Confirmation:');

define('ENTRY_PASSWORD_CONFIRMATION_TEXT', '*');

define('ENTRY_PASSWORD_CURRENT', 'Current Password:');

define('ENTRY_PASSWORD_CURRENT_TEXT', '*');

define('ENTRY_PASSWORD_CURRENT_ERROR', 'Your Password must contain a minimum of ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.');

define('ENTRY_PASSWORD_NEW', 'New Password:');

define('ENTRY_PASSWORD_NEW_TEXT', '*');

define('ENTRY_PASSWORD_NEW_ERROR', 'Your new Password must contain a minimum of ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.');

define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING', 'The Password Confirmation must match your new Password.');

define('PASSWORD_HIDDEN', '--HIDDEN--');

 

define('FORM_REQUIRED_INFORMATION', '* Required information');

 

// constants for use in tep_prev_next_display function

define('TEXT_RESULT_PAGE', 'Result Pages:');

define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> products)');

define('TEXT_DISPLAY_NUMBER_OF_ORDERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> orders)');

define('TEXT_DISPLAY_NUMBER_OF_REVIEWS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> reviews)');

define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> new products)');

define('TEXT_DISPLAY_NUMBER_OF_SPECIALS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> specials)');

 

define('PREVNEXT_TITLE_FIRST_PAGE', 'First Page');

define('PREVNEXT_TITLE_PREVIOUS_PAGE', 'Previous Page');

define('PREVNEXT_TITLE_NEXT_PAGE', 'Next Page');

define('PREVNEXT_TITLE_LAST_PAGE', 'Last Page');

define('PREVNEXT_TITLE_PAGE_NO', 'Page %d');

define('PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE', 'Previous Set of %d Pages');

define('PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE', 'Next Set of %d Pages');

define('PREVNEXT_BUTTON_FIRST', '<<FIRST');

define('PREVNEXT_BUTTON_PREV', '[<< Prev]');

define('PREVNEXT_BUTTON_NEXT', '[Next >>]');

define('PREVNEXT_BUTTON_LAST', 'LAST>>');

 

define('IMAGE_BUTTON_ADD_ADDRESS', 'Add Address');

define('IMAGE_BUTTON_ADDRESS_BOOK', 'Address Book');

define('IMAGE_BUTTON_BACK', 'Back');

define('IMAGE_BUTTON_BUY_NOW', 'Buy Now');

define('IMAGE_BUTTON_CHANGE_ADDRESS', 'Change Address');

define('IMAGE_BUTTON_CHECKOUT', 'Checkout');

define('IMAGE_BUTTON_CONFIRM_ORDER', 'Confirm Order');

define('IMAGE_BUTTON_CONTINUE', 'Continue');

define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Continue Shopping');

define('IMAGE_BUTTON_DELETE', 'Delete');

define('IMAGE_BUTTON_EDIT_ACCOUNT', 'Edit Account');

define('IMAGE_BUTTON_HISTORY', 'Order History');

define('IMAGE_BUTTON_LOGIN', 'Sign In');

define('IMAGE_BUTTON_IN_CART', 'Add to Cart');

define('IMAGE_BUTTON_NOTIFICATIONS', 'Notifications');

define('IMAGE_BUTTON_QUICK_FIND', 'Quick Find');

define('IMAGE_BUTTON_REMOVE_NOTIFICATIONS', 'Remove Notifications');

define('IMAGE_BUTTON_REVIEWS', 'Reviews');

define('IMAGE_BUTTON_SEARCH', 'Search');

define('IMAGE_BUTTON_SHIPPING_OPTIONS', 'Shipping Options');

define('IMAGE_BUTTON_TELL_A_FRIEND', 'Tell a Friend');

define('IMAGE_BUTTON_UPDATE', 'Update');

define('IMAGE_BUTTON_UPDATE_CART', 'Update Cart');

define('IMAGE_BUTTON_WRITE_REVIEW', 'Write Review');

 

define('SMALL_IMAGE_BUTTON_DELETE', 'Delete');

define('SMALL_IMAGE_BUTTON_EDIT', 'Edit');

define('SMALL_IMAGE_BUTTON_VIEW', 'View');

 

define('ICON_ARROW_RIGHT', 'more');

define('ICON_CART', 'In Cart');

define('ICON_ERROR', 'Error');

define('ICON_SUCCESS', 'Success');

define('ICON_WARNING', 'Warning');

 

define('TEXT_GREETING_PERSONAL', 'Welcome <span class="greetUser">%s!</span>');

define('TEXT_GREETING_PERSONAL_RELOGON', 'Welcome <span class="greetUser">%s!</span>');

define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span>');

 

define('TEXT_SORT_PRODUCTS', 'Sort products ');

define('TEXT_DESCENDINGLY', 'descendingly');

define('TEXT_ASCENDINGLY', 'ascendingly');

define('TEXT_BY', ' by ');

 

define('TEXT_REVIEW_BY', 'by %s');

define('TEXT_REVIEW_WORD_COUNT', '%s words');

define('TEXT_REVIEW_RATING', 'Rating: %s [%s]');

define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');

define('TEXT_NO_REVIEWS', 'There are currently no product reviews.');

 

define('TEXT_NO_NEW_PRODUCTS', 'There are currently no products.');

 

define('TEXT_UNKNOWN_TAX_RATE', 'Unknown tax rate');

 

define('TEXT_REQUIRED', '<span class="errorText">Required</span>');

 

define('ERROR_TEP_MAIL', '<font face="Verdana, Arial" size="2" color="#ff0000"><b><small>TEP ERROR:</small> Cannot send the email through the specified SMTP server. Please check your php.ini setting and correct the SMTP server if necessary.</b></font>');

define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warning: Installation directory exists at: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install. Please remove this directory for security reasons.');

define('WARNING_CONFIG_FILE_WRITEABLE', 'Warning: I am able to write to the configuration file: ' . dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.');

define('WARNING_SESSION_DIRECTORY_NON_EXISTENT', 'Warning: The sessions directory does not exist: ' . tep_session_save_path() . '. Sessions will not work until this directory is created.');

define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Warning: I am not able to write to the sessions directory: ' . tep_session_save_path() . '. Sessions will not work until the right user permissions are set.');

define('WARNING_SESSION_AUTO_START', 'Warning: session.auto_start is enabled - please disable this php feature in php.ini and restart the web server.');

define('WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT', 'Warning: The downloadable products directory does not exist: ' . DIR_FS_DOWNLOAD . '. Downloadable products will not work until this directory is valid.');

 

define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid.<br>Please check the date and try again.');

define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid.<br>Please check the number and try again.');

define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'The first four digits of the number entered are: %s<br>If that number is correct, we do not accept that type of credit card.<br>If it is wrong, please try again.');

 

define('FOOTER_TEXT_BODY', '© ' . date('Y') .' ' . STORE_NAME . ' All rights reserved.');

 

define('SSSC001', 'home');

define('SSSC002', 'sitemap');

define('SSSC003', 'email us');

 

define('HF1', 'Home page');

define('HF2', 'My Account');

define('HF3', 'New Products');

define('HF4', 'Contact Us');

 

define('AA01', 'welcome to our DoXa ADV Packaging store');

define('AA02', 'we work hard to save you money');

define('AA03', 'more about us');

?>

Link to comment
Share on other sites

Dear Frank (rescuestat),

 

Here is my code for create account.php.

Let me know where I made mistakes. Thanks in advance.

 

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

*/

 

require('includes/application_top.php');

 

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) && $cart->count_contents() < 1) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

// PWA EOF

 

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

 

// PWA BOF 2b

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

 

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

}

 

 

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

// PWA EOF

 

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

}

// PWA BOF

}

// PWA EOF

 

if ($error == false) {

// PWA BOF 2b

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest']))

{

$dbPass = tep_encrypt_password($password);

$guestaccount = '0';

}else{

$dbPass = 'null';

$guestaccount = '1';

}

// PWA EOF 2b

 

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

// PWA BOF 2b

'customers_password' => $dbPass,

'guest_account' => $guestaccount);

// PWA EOF 2b

 

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;

}

}

 

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) or isset($HTTP_POST_VARS['guest']))

tep_session_register('customer_is_guest');

// PWA EOF

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

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) or isset($HTTP_POST_VARS['guest'])) tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

// PWA EOF

 

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

}

}

 

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){

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

}else{

$breadcrumb->add(NAVBAR_TITLE_PWA, tep_href_link(FILENAME_CREATE_ACCOUNT, 'guest=guest', 'SSL'));

}

// PWA EOF

 

?>

<!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">

<center>

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

<table width="1000" border="0" cellspacing="0" cellpadding="0" style="background-image:url(images/body/bg001.jpg); background-position:center; background-repeat:repeat-y ">

<tr>

<td>

<table border="0" width="1000" cellspacing="0" cellpadding="0" style="background-image:url(images/body/madam.jpg); background-position:left top; background-repeat:no-repeat ">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</td>

<!-- body_text //-->

<!-- PWA BOF -->

<td width="100%" valign="top" style="padding:260px 0px 0px 0px " > ><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, (isset($HTTP_GET_VARS['guest'])? 'guest=guest':''), 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<!-- PWA EOF -->

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" style="height:45px;">

<tr>

<?php

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){

?>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<?php }else{ ?>

<td class="pageHeading"><?php echo HEADING_TITLE_PWA; ?></td>

<?php }

// PWA EOF

?>

<td class="pageHeading" align="right"> </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="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<?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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

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

<?php

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

// PWA EOF

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

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

<?php

// PWA BOF

}

else

{ // Ingo PWA Ende

?>

<tr>

<td><?php echo tep_draw_hidden_field('guest', 'guest'); ?></td>

</tr>

<?php }

// PWA EOF

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<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="0">

<!-- 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>

</center>

</body>

</html>

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

Link to comment
Share on other sites

From the install directions:

 

#############################

6. in catalog/includes/languages/english/create_account.php(and any other languages you use)

***FIND:

define('NAVBAR_TITLE', 'Create an Account');

***ADD AFTER:

define('NAVBAR_TITLE_PWA', 'Enter Billing & Shipping Information');

define('HEADING_TITLE_PWA', 'Billing & Shipping Information');

 

#############################

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Dear Jim (germ), I could not find the line "define('NAVBAR_TITLE', 'Create an Account');"

should I just add those lines anywhere?

Add them just before the closing PHP tag at the bottom of the file.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hello,

 

As Mulitmixer said, first change in the create_account.php from HEADING_TITLE_PWA to HEADER_TITLE_PWA <-this is what you have define'd in your english.php.

 

Next find:

<!-- PWA BOF -->

<td width="100%" valign="top" style="padding:260px 0px 0px 0px " > ><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, (isset($HTTP_GET_VARS['guest'])? 'guest=guest':''), 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<!-- PWA EOF -->

 

You have two '>''s in front of your echo_tep_draw_form('create_account'.... delete the second >

 

As for the } ?> appearing between 'Your Address' and 'Street Address:', you've got me stumped. Looking at the source code for create_account.php there is nothing there that would print those characters. I don't know if seeing the parsed code for the page would help or not.

 

Best of luck,

Frank

Link to comment
Share on other sites

Hello,

 

As Mulitmixer said, first change in the create_account.php from HEADING_TITLE_PWA to HEADER_TITLE_PWA <-this is what you have define'd in your english.php.

 

Next find:

<!-- PWA BOF -->

<td width="100%" valign="top" style="padding:260px 0px 0px 0px " > ><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, (isset($HTTP_GET_VARS['guest'])? 'guest=guest':''), 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<!-- PWA EOF -->

 

You have two '>''s in front of your echo_tep_draw_form('create_account'.... delete the second >

 

As for the } ?> appearing between 'Your Address' and 'Street Address:', you've got me stumped. Looking at the source code for create_account.php there is nothing there that would print those characters. I don't know if seeing the parsed code for the page would help or not.

 

Best of luck,

Frank

Link to comment
Share on other sites

Frank,

Thanks, that code helps taking of the extra ">" but I still don't know what caused the extra "} ?>"

I found that the code was OK when I reverted back to the old file where sequences of the address is Post Code>City>State>Country, but the problem arises when I moved the codes around to make it City>Country>State>Post Code.

 

Here is the create account.php for the original Post Code>City>State>Country:

 

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

*/

 

require('includes/application_top.php');

 

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) && $cart->count_contents() < 1) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

// PWA EOF

 

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

 

// PWA BOF 2b

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

 

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

}

 

 

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

// PWA EOF

 

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

}

// PWA BOF

}

// PWA EOF

 

if ($error == false) {

// PWA BOF 2b

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest']))

{

$dbPass = tep_encrypt_password($password);

$guestaccount = '0';

}else{

$dbPass = 'null';

$guestaccount = '1';

}

// PWA EOF 2b

 

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

// PWA BOF 2b

'customers_password' => $dbPass,

'guest_account' => $guestaccount);

// PWA EOF 2b

 

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;

}

}

 

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) or isset($HTTP_POST_VARS['guest']))

tep_session_register('customer_is_guest');

// PWA EOF

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

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) or isset($HTTP_POST_VARS['guest'])) tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

// PWA EOF

 

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

}

}

 

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){

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

}else{

$breadcrumb->add(NAVBAR_TITLE_PWA, tep_href_link(FILENAME_CREATE_ACCOUNT, 'guest=guest', 'SSL'));

}

// PWA EOF

 

?>

<!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">

<center>

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

<table width="1000" border="0" cellspacing="0" cellpadding="0" style="background-image:url(images/body/bg001.jpg); background-position:center; background-repeat:repeat-y ">

<tr>

<td>

<table border="0" width="1000" cellspacing="0" cellpadding="0" style="background-image:url(images/body/madam.jpg); background-position:left top; background-repeat:no-repeat ">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</td>

<!-- body_text //-->

<!-- PWA BOF -->

<td width="100%" valign="top" style="padding:260px 0px 0px 0px " > <?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, (isset($HTTP_GET_VARS['guest'])? 'guest=guest':''), 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<!-- PWA EOF -->

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" style="height:45px;">

<tr>

<?php

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){

?>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<?php }else{ ?>

<td class="pageHeading"><?php echo HEADING_TITLE_PWA; ?></td>

<?php }

// PWA EOF

?>

<td class="pageHeading" align="right"> </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="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<?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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

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

<td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>

</tr>

<?php

if (ACCOUNT_SUBURB == 'true') {

?>

<tr>

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

<td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>

</tr>

<?php

}

?>

<tr>

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

<td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>

</tr>

<?php

if (ACCOUNT_STATE == 'true') {

?>

<tr>

<td class="main"><?php echo ENTRY_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>

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

</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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

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

<?php

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

// PWA EOF

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

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

<?php

// PWA BOF

}

else

{ // Ingo PWA Ende

?>

<tr>

<td><?php echo tep_draw_hidden_field('guest', 'guest'); ?></td>

</tr>

<?php }

// PWA EOF

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<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="0">

<!-- 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>

</center>

</body>

</html>

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

 

 

========================

Btw, for the heading title issue, I did change it both ways.. change english.php text from HEADER to HEADING or the create account.php from HEADING to HEADER to no avail. I have no idea how to fix this yet.

Any idea? multimixer? Anyone?

Link to comment
Share on other sites

Hello,

 

I hadn't noticed it before, but the orginal code you posted is suburb-> post code-> city-> state-> country. The code you just now posted(what you said is the original code that works) is suburb-> city-> country -> state -> post code which matches the picture link you had originally posted(of the code you said has the extra characters). Which code is which? Can you send a link to this page that shows what you are talking about or is this on a testing server?

 

Frank

Link to comment
Share on other sites

Frank, the page can be found online

http://www.doxa-adv.com/

 

Don't laugh at it, it's still pretty much a work in progress.

You can see, there I put back the old code without the country-state modification, which does not show any extra characters (but still show HEADING_TITLE_PWA), but I don't like the sequence and I am trying to find out how to do the Country_State mod later.

 

I also am still trying to figure out how to change the banner on right hand side. I replaced the images on images/banners but it did not show up correctly. I believe the problem can be corrected from column_right, but I still don't know which is which. Later I got to work on redirect.php to correct the link for those banners also.

 

So, it's still a long process... Thanks for your help.

Link to comment
Share on other sites

Frank, the page can be found online

http://www.doxa-adv.com/

 

Don't laugh at it, it's still pretty much a work in progress.

You can see, there I put back the old code without the country-state modification, which does not show any extra characters (but still show HEADING_TITLE_PWA), but I don't like the sequence and I am trying to find out how to do the Country_State mod later.

 

I also am still trying to figure out how to change the banner on right hand side. I replaced the images on images/banners but it did not show up correctly. I believe the problem can be corrected from column_right, but I still don't know which is which. Later I got to work on redirect.php to correct the link for those banners also.

 

So, it's still a long process... Thanks for your help.

 

Hello,

 

If you can put the new version up on the net, maybe just call it something like http://www.doxa-adv.com/create_account_new.php so I can see the new code without forcing new customers to see it I may be able to locate the problem for you.

 

Frank

Link to comment
Share on other sites

Frank,

Here what is happening when I tried to combine PWA and CSS module. I don't know why.

With this new PHP file, the error shows as follows:

Parse error: syntax error, unexpected '}' in /home/doxaadv/public_html/create_account-new.php on line 606

 

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

*/

 

require('includes/application_top.php');

 

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) && $cart->count_contents() < 1) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

// PWA EOF

 

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

 

// PWA BOF 2b

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

 

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

// +Country-State Selector

if ($zone_id == 0) {

// -Country-State Selector

 

if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {

$error = true;

 

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

}

}

}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {

$error = true;

 

$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);

}

 

 

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

// PWA EOF

 

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

}

// PWA BOF

}

// PWA EOF

 

if ($error == false) {

// PWA BOF 2b

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest']))

{

$dbPass = tep_encrypt_password($password);

$guestaccount = '0';

}else{

$dbPass = 'null';

$guestaccount = '1';

}

// PWA EOF 2b

 

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

// PWA BOF 2b

'customers_password' => $dbPass,

'guest_account' => $guestaccount);

// PWA EOF 2b

 

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;

}

}

 

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) or isset($HTTP_POST_VARS['guest']))

tep_session_register('customer_is_guest');

// PWA EOF

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

// PWA BOF

if (isset($HTTP_GET_VARS['guest']) or isset($HTTP_POST_VARS['guest'])) tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

// PWA EOF

 

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

}

}

// +Country-State Selector

 

if (!isset($country)) $country = DEFAULT_COUNTRY;

// -Country-State Selector

 

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

 

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){

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

}else{

$breadcrumb->add(NAVBAR_TITLE_PWA, tep_href_link(FILENAME_CREATE_ACCOUNT, 'guest=guest', 'SSL'));

}

// PWA EOF

 

?>

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

require(DIR_WS_INCLUDES . 'ajax.js.php');

?>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<center>

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

<table width="1000" border="0" cellspacing="0" cellpadding="0" style="background-image:url(images/body/bg001.jpg); background-position:center; background-repeat:repeat-y ">

<tr>

<td>

<table border="0" width="1000" cellspacing="0" cellpadding="0" style="background-image:url(images/body/madam.jpg); background-position:left top; background-repeat:no-repeat ">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</td>

<!-- body_text //-->

<!-- PWA BOF -->

<td width="100%" valign="top" style="padding:260px 0px 0px 0px " > <?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, (isset($HTTP_GET_VARS['guest'])? 'guest=guest':''), 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?>

<div id="indicator"><?php echo tep_image(DIR_WS_IMAGES . 'indicator.gif'); ?></div>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<!-- PWA EOF -->

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" style="height:45px;">

<tr>

<?php

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])){

?>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<?php }else{ ?>

<td class="pageHeading"><?php echo HEADING_TITLE_PWA; ?></td>

<?php }

// PWA EOF

?>

<td class="pageHeading" align="right"> </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="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<?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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

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

<td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>

</tr>

<?php

if (ACCOUNT_SUBURB == 'true') {

?>

<tr>

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

<td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>

</tr>

<?php

}

?>

<tr>

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

<td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>

</tr>

<?php

if (ACCOUNT_STATE == 'true') {

?>

<tr>

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

<td class="main">

<div id="states">

<?php

// +Country-State Selector

echo ajax_get_zones_html($country,'',false);

// -Country-State Selector

?>

</div>

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

</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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

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

<?php

// PWA BOF

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

// PWA EOF

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

<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="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="0" cellpadding="0">

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

<?php

// PWA BOF

}

else

{ // Ingo PWA Ende

?>

<tr>

<td><?php echo tep_draw_hidden_field('guest', 'guest'); ?></td>

</tr>

<?php }

// PWA EOF

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<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="0">

<!-- 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>

</center>

</body>

</html>

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

<?php

// +Country-State Selector

}

// -Country-State Selector

?>

Link to comment
Share on other sites

Frank,

Here what is happening when I tried to combine PWA and CSS module. I don't know why.

With this new PHP file, the error shows as follows:

Parse error: syntax error, unexpected '}' in /home/doxaadv/public_html/create_account-new.php on line 606

 

 

What PHP IF statement does that belong to? It appears to be an extra closing bracket. If you know for sure that it is supposed to be there start looking between the IF statement and the closing bracket for another closing bracket that ends the IF statement prematurely. If not, try removing it and see if you still get the error.

 

Frank

Link to comment
Share on other sites

Frank, I think that statement was part of the line after

require('includes/application_top.php');

 

I tried to remove the bracket but it shows another error message (the error message moves up line by line).

I believe I followed the instruction of Country State Selector step-by-step but I still could not figure this out.

Link to comment
Share on other sites

Join the conversation

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

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...