Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

@tigerlady1 : I also got the same error with the sql statement you've mentionned. There is a blank missing between TABLE_CUSTOMERS and "where". This is the line to put in create_account.php

 

$get_customer_info = tep_db_query("select customers_id, customers_email_address, purchased_without_account from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

 

Hope this helps, :D

 

Didier.

Share this post


Link to post
Share on other sites

I installed PWA7.1 on OSC2.2. Did everything according to instruction but I don't see the 3rd option at checkout. (Feature is turned on at "admin". Also when clicked "Continue" for New Customer I got this error message:

 

Parse error: parse error, unexpected $ in /.../catalog/create_account.php on line 556

 

 

PS -> Line 556: <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Can anyone give some light on this?

Share this post


Link to post
Share on other sites

I installed PWA and all is well except I am getting a Parse error (catalog/create_account.php line #543) when clicking on "create new account". "Sign In" and "Proceed to checkout" work great.

Thanks

d5

Share this post


Link to post
Share on other sites

Addition to the above post: The following is the end of my create_account php file:

 

<!-- body_eof //-->

 

<!-- footer //-->

<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

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

 

this ends at line 542! What am I missing?

d5

Share this post


Link to post
Share on other sites

Never mind it's fixed. I replaced the code from the install directions to the create_account file and all is well. Should have tried this first instead of banging my head against the wall for several hours! :)

Share this post


Link to post
Share on other sites

Hi all

 

Has anyone tried installing the "How did you hear about us" contribution on top of PWA?

 

It should be pretty simple to copy the same changes that were made to the create_account.php file into the Order_Info pages, but in fact PWA is structured very differently from the normal create account.

 

I'll probably get it going with a load of messing but if anyone has it done already it will save me some time.

 

Thanks

Tim

Share this post


Link to post
Share on other sites

Just realised it's not worth installing these 2 together. When you delete a customer (e.g. a PWA customer) the "how did you hear about us" information is also deleted.

 

Will need a major rewrite of the "how did you hear about us" mod.

 

Tim

Share this post


Link to post
Share on other sites

I have published v0.80 of the PWA contribution. No new fonctionnalities but only some bug fixing to all files.

 

Here is my changelog :

 

~~History v0.80 (by Didier Debbaut)

- added file /catalog/includes/header.php

-> "my account" and "logoff" will not be shown for a PWA customer

- added file /catalog/create_account.php

-> store name is now initialized with country of shop

-> "continu" button is shown on the right at bottom of page

- added file /catalog/includes/languages/english.php

- added file /catalog/includes/languages/english/login.php

- added file /catalog/admin/orders.php

- cleanup of Install_Instructions.txt file

- Order_Info_Check.php

-> must only be under "modules". File under "/catalog" deleted from package.

- checkout_success.php

-> no need of NAVBAR_TITLE_2

- login.php

-> no need of the second include of FILENAME_LOGIN

- Order_Info.php

-> localisation of NAV_ORDER_INFO

-> main table is displayed the same way as in "create_account.php"

- Order_Info_Process.php

-> 2 defines are moved to english.php

-> no need of NAVBAR_TITLE_2

-> add of right navigation

>- correction of missing "table" tag

- login_pwa.php

-> wrong text labels for returning client box and new client box

- Order_Info_Check.php

-> drop of all newsletter related code

 

;)

 

Didier.

Share this post


Link to post
Share on other sites

I want to see if this contribution functions like the account system on www.00inkjets.com its a PWA like system..it appears to always be PWA BUT allows for login to account it creates when you order the first time.

 

Will PWA create an account after the order is placed?

 

Also, if you REORDER without forcing the account, will PWA recognize the email as an already entered account and thus doesn't create a duplicate account

 

With the inkjets site, the customer is emailed the new account info to follow up on their order. But never FORCED to go back into existing account. This seems to be a big issue with folks I've surveyed....they even say they don' tlike giants like Amazon and Apple for forcing an account.

Share this post


Link to post
Share on other sites

PWA does not create an account but only an entry in the "order" table. No entry is created in the "customer" table as the PWA customer can not specify his password.

 

So when the customer comes back, as he has no account, he must login again. I use a rebate of 10% when clients open a customer account. This should incite them to create an account.

 

Also, PWA contribution does not email the client as it makes no sense : he has no access to the order history, newsletter subscription, etc. You could sent a small email saying "hello" but as the client does not want an account, I guess he also do not want commercial emails.

 

Didier.

Share this post


Link to post
Share on other sites

What I'm suggesting is that PWA consider having the ability to behave like the site I referenced. The approach is to get the customer to order in the first place, and if they feel forced into creating an account just to order they stop. However if we let them go through and place the order and THEN create the account (with newsletter off etc) and email them the account info to TRACK THE ORDER if they want, that seems like a good thing.

 

Now if they chose to REORDER, they again can go through without logging in (PWA) but the catalog detects they are that account and at least puts the order back under the same account and not creating a duplicate account. If they ever contact support staff, then there is a way of evaluating the account and orders and status.

 

I liked the process that the ink website used, PWA is very close to it so I was wondering if you'd consider in your next revision adopting a similar process?

 

Places like Amazon and Apple FORCE you back into the account, people don't like that even though it makes total sense.

Share this post


Link to post
Share on other sites

I think you have a point there. I installed this contibution as a lot of people just want to put products in their cart, go through shipping, etc but NOT ordering for the moment. I think we could create an account for them and send them an email with their new password needed for login.

 

For the reorder issue, I also noticed that if the same client wants to order something else, he has to fill in the order information again. Not so nice, but hey, he choose not to create a client account..hehe..

 

Now I'm not the author of this contribution. I have only a very small shop with few clients (for the moment) and the current behaviour is alright for me. But in case of a shop with repeating customers, a new improved version of this contribution could be helpful.

 

Someone interested in developing this ?

 

Didier.

Share this post


Link to post
Share on other sites

I am new to install this contribution, so please bear with me, so sorry :unsure:

 

I just started to install this contribution, but now i have run into this probelm, as i don't know how to modify it in order to work well with paypal ipn contribution

 

 

 

Part of code from Paypal ipn

 

//begin PayPal_Shopping_Cart_IPN

// tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

?  } else if ((isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'success')) {

? ?  $cart->reset(true);

? ?  // unregister session variables used during checkout

? ?  tep_session_unregister('sendto');

? ?  tep_session_unregister('billto');

? ?  tep_session_unregister('shipping');

? ?  tep_session_unregister('payment');

? ?  tep_session_unregister('comments');

? ?  tep_session_unregister('paypal_order_id');

?  }

//end PayPal_Shopping_Cart_IPN

 

 

 

part of code from this contribution on checkout_success.php

 

// Added a check for a Guest checkout and cleared the session - 030411

if (tep_session_is_registered('noaccount')) {

tep_session_destroy();

tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'));

}

else {

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string, 'SSL'));

}

? }

 

I am trying it myself now...

Yikes!!! Please help!! :(

Edited by markchiu

OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Share this post


Link to post
Share on other sites

..REally need help!!! ;)

 

Please thank you!!


OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Share this post


Link to post
Share on other sites

really really really weird....I got this problem

 

Parse error: parse error in /home/yadyshop/public_html/login.php on line 275

 

but i can't find where is the language problem :lol:

 

 

Please help...here is my login.php

 

<?php

/*

  $Id: login.php,v 1.80 2003/06/05 23:28:24 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');

 

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)

  if ($session_started == false) {

    tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

  }

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

 

  $error = false;

  // PWA 0.70 Begin:

  if($HTTP_GET_VARS['login'] == 'fail') {

  $fail_reason = (!empty($HTTP_GET_VARS['reason'])) ? urldecode($HTTP_GET_VARS['reason']): TEXT_LOGIN_ERROR;

  $messageStack->add('login', $fail_reason);

  }

  if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

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

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

 

// Check if email exists

    $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

    if (!tep_db_num_rows($check_customer_query)) {

      $error = true;

    } else {

      $check_customer = tep_db_fetch_array($check_customer_query);

// Check that password is good

      if (!tep_validate_password($password, $check_customer['customers_password'])) {

        $error = true;

      } else {

        if (SESSION_RECREATE == 'True') {

          tep_session_recreate();

        }

 

        $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");

        $check_country = tep_db_fetch_array($check_country_query);

 

        $customer_id = $check_customer['customers_id'];

        $customer_default_address_id = $check_customer['customers_default_address_id'];

        $customer_first_name = $check_customer['customers_firstname'];

        $customer_country_id = $check_country['entry_country_id'];

        $customer_zone_id = $check_country['entry_zone_id'];

        tep_session_register('customer_id');

        tep_session_register('customer_default_address_id');

        tep_session_register('customer_first_name');

        tep_session_register('customer_country_id');

        tep_session_register('customer_zone_id');

 

// HMCS: Begin Autologon **********************************************************

  $cookie_url_array = parse_url((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . substr(DIR_WS_CATALOG, 0, -1));

  $cookie_path = $cookie_url_array['path'];

 

            if ((ALLOW_AUTOLOGONLOGON == 'false') || ($HTTP_POST_VARS['remember_me'] == '')) {

              setcookie("email_address", "", time() - 3600, $cookie_path);  // Delete email_address cookie

              setcookie("password", "", time() - 3600, $cookie_path);        // Delete password cookie

  }

            else {

              setcookie('email_address', $email_address, time()+ (365 * 24 * 3600), $cookie_path, '', ((getenv('HTTPS') == 'on') ? 1 : 0));

              setcookie('password', $check_customer['customers_password'], time()+ (365 * 24 * 3600), $cookie_path, '', ((getenv('HTTPS') == 'on') ? 1 : 0));

  }

// HMCS: End Autologon **********************************************************

 

        tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

 

// restore cart contents

        $cart->restore_contents();

 

        if (sizeof($navigation->snapshot) > 0) {

          $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

          $navigation->clear_snapshot();

          tep_redirect($origin_href);

        } else {

          tep_redirect(tep_href_link(FILENAME_DEFAULT));

        }

      }

    }

  }

 

  if ($error == true) {

    $messageStack->add('login', TEXT_LOGIN_ERROR);

  }

 

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

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

function session_win() {

  window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();

}

//--></script>

<?php // HMCS: Begin Autologon **********************************************************

?>

<script language="javascript"><!--

function win_autologon() {

  window.open("<?php echo FILENAME_INFO_AUTOLOGON; ?>","info_autologon","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();

}

//--></script>

<?php // HMCS: End Autologon **********************************************************

?>

</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" bgcolor=""><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

    </table></td>

<!-- body_text //-->

    <td width="100%" valign="top"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

      <tr>

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

          <tr>

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

          <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

          </tr>

        </table></td>

      </tr>

      <tr>

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

      </tr>

<?php

  if ($messageStack->size('login') > 0) {

?>

      <tr>

        <td><?php echo $messageStack->output('login'); ?></td>

      </tr>

      <tr>

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

      </tr>

<?php

  }

 

  if ($cart->count_contents() > 0) {

?>

      <tr>

        <td class="smallText"><?php echo TEXT_VISITORS_CART; ?></td>

      </tr>

      <tr>

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

      </tr>

<?php

  }

?>

      <tr>

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

          <tr>

            <td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td>

            <td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_CUSTOMER; ?></b></td>

          </tr>

          <tr>

            <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">

              <tr class="infoBoxContents">

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

                  <tr>

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

                  </tr>

                  <tr>

                    <td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>' . TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td>

                  </tr>

                  <tr>

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

                  </tr>

                  <tr>

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

                      <tr>

                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                        <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                      </tr>

                    </table></td>

                  </tr>

                </table></td>

              </tr>

            </table></td>

            <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">

              <tr class="infoBoxContents">

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

                  <tr>

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

                  </tr>

                  <tr>

                    <td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td>

                  </tr>

                  <tr>

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

                  </tr>

                  <tr>

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

                    <td class="main"><?php echo tep_draw_input_field('email_address'); ?></td>

                  </tr>

                  <tr>

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

                    <td class="main"><?php echo tep_draw_password_field('password'); ?></td>

                  </tr>

                 

<?php // HMCS: Begin Autologon

if(ALLOW_AUTOLOGON != 'false') {

?>

  <tr>

    <td>

    </td>

      <td align="left" class="smalltext"><?php echo tep_draw_checkbox_field('remember_me','on', (($password == '') ? false : true)) . ' ' . ENTRY_REMEMBER_ME; ?>

      </td>

  </tr>

<?php

if (PWA_ON == 'false') {

require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN);

} else {

require(DIR_WS_INCLUDES . FILENAME_PWA_PWA_LOGIN);

}

// HMCS: End of Autologon

?>

                  <tr>

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

                  </tr>

                  <tr>

                    <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>

                  </tr>

                  <tr>

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

                  </tr>

                  <tr>

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

                      <tr>

                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                        <td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>

                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                      </tr>

                    </table></td>

                  </tr>

                </table></td>

              </tr>

            </table></td>

          </tr>

        </table></td>

      </tr>

    </table></form></td>

<!-- body_text_eof //-->

    <td width="<?php echo BOX_WIDTH; ?>" valign="top" bgcolor=""><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

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

<!-- right_navigation_eof //-->

    </table></td>

  </tr>

</table>

<!-- body_eof //-->

<!-- footer //-->

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

<!-- footer_eof //-->

</body>

</html>

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

 

 

Thank you for any kind help :rolleyes:


OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Share this post


Link to post
Share on other sites

I just got it...sorry for this stupid post... ;)


OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Share this post


Link to post
Share on other sites

I do really need help this time...

 

how can i put this code into login_pwa.php....and would like to put it with

 

returning customer

 

Here is the code

<?php

// HMCS: Begin Autologon

if(ALLOW_AUTOLOGON != 'false') {

?>

  <tr>

      <td align="left" class="smalltext"><?php echo tep_draw_checkbox_field('remember_me','on', (($password == '') ? false : true)) . ' ' . ENTRY_REMEMBER_ME; ?>

      </td>

  </tr>

<?php }

// HMCS: End of Autologon

?>

 

Thank you so much! :rolleyes:


OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Share this post


Link to post
Share on other sites

Where do you change the PWA form sign-up background and boxes to made it consistance with the stock OSCMS2.2 created account form?. Any idea?

Share this post


Link to post
Share on other sites

yip..in /catalog/includes/modules/Order_Info_Check.php. I also had to change all the classes to use the new MS2 CSS classes.

 

It rather simple : compare this file with the /catalog/create_account.php file. There are almost identical. It's a pitty that we now have to maintain 2 files cf. account creation.

 

Didier.

Share this post


Link to post
Share on other sites

Spaceboy, If you don't mind can you post your code for the Order_info_check.php here?. Thanks.

Share this post


Link to post
Share on other sites

hi,

 

great contribution, works like a charm!

 

i would like to remove all login info, anyone has a list of files to alter?

 

thanks!

Share this post


Link to post
Share on other sites
Spaceboy, If you don't mind can you post your code for the Order_info_check.php here?. Thanks.

Here is my file /catalog/includes/modules/Order_Info_Check.php that should behave exactly the same as create_account.php. Do not use this file *like it is* on your system (it has been a bit customised) but you can use if together with a comparaison tool to see what lines to alter to make look the same as the Create Account page.

 

It should also be very easy to do a new version of this contribution to add these changes. I won't have time for it :-(

 

My file :

 

<?php

/*

$Id: Order_Info_Check.php,v 0.52 2002/09/21 hpdl Exp $

by Cheng

 

OSCommerce v2.2 CVS (09/17/02)

 

Modified versions of create_account.php and related

files. Allowing 'purchase without account'.

 

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

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

<tr>

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

<td align="right" class="inputRequirement"><?php echo FORM_REQUIRED_INFORMATION; ?></td>

</tr>

</table>

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

$male = ($account['customers_gender'] == 'm') ? true : false;

$female = ($account['customers_gender'] == 'f') ? true : false;

?>

<tr>

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

<td class="main">

<?php

if ($is_read_only) {

echo ($account['customers_gender'] == 'm') ? MALE : FEMALE;

} elseif ($error) {

if ($entry_gender_error) {

echo tep_draw_radio_field('gender', 'm', $male) . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f', $female) . '  ' . FEMALE . ' ' . ENTRY_GENDER_ERROR;

} else {

echo ($gender == 'm') ? MALE : FEMALE;

echo tep_draw_hidden_field('gender');

}

} else {

echo tep_draw_radio_field('gender', 'm', $male) . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f', $female) . '  ' . FEMALE . ' ' . ENTRY_GENDER_TEXT;

}

?></td>

</tr>

<?php

}

?>

<tr>

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

<td class="main">

<?php

if ($is_read_only) {

echo $account['customers_firstname'];

} elseif ($error) {

if ($entry_firstname_error) {

echo tep_draw_input_field('firstname') . ' ' . ENTRY_FIRST_NAME_ERROR;

} else {

echo $firstname . tep_draw_hidden_field('firstname');

}

} else {

echo tep_draw_input_field('firstname', $account['customers_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

if ($is_read_only) {

echo $account['customers_lastname'];

} elseif ($error) {

if ($entry_lastname_error) {

echo tep_draw_input_field('lastname') . ' ' . ENTRY_LAST_NAME_ERROR;

} else {

echo $lastname . tep_draw_hidden_field('lastname');

}

} else {

echo tep_draw_input_field('lastname', $account['customers_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

if ($is_read_only) {

echo tep_date_short($account['customers_dob']);

} elseif ($error) {

if ($entry_date_of_birth_error) {

echo tep_draw_input_field('dob') . ' ' . ENTRY_DATE_OF_BIRTH_ERROR;

} else {

echo $dob . tep_draw_hidden_field('dob');

}

} else {

echo tep_draw_input_field('dob', tep_date_short($account['customers_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

if ($is_read_only) {

echo $account['customers_email_address'];

} elseif ($error) {

if ($entry_email_address_error) {

echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR;

} elseif ($entry_email_address_check_error) {

echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;

} elseif ($entry_email_address_exists) {

echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;

} else {

echo $email_address . tep_draw_hidden_field('email_address');

}

} else {

echo tep_draw_input_field('email_address', $account['customers_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 class="main"><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

if ($is_read_only) {

echo $account['entry_company'];

} elseif ($error) {

if ($entry_company_error) {

echo tep_draw_input_field('company') . ' ' . ENTRY_COMPANY_ERROR;

} else {

echo $company . tep_draw_hidden_field('company');

}

} else {

echo tep_draw_input_field('company', $account['entry_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

if ($is_read_only) {

echo $account['entry_street_address'];

} elseif ($error) {

if ($entry_street_address_error) {

echo tep_draw_input_field('street_address') . ' ' . ENTRY_STREET_ADDRESS_ERROR;

} else {

echo $street_address . tep_draw_hidden_field('street_address');

}

} else {

echo tep_draw_input_field('street_address', $account['entry_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

if ($is_read_only) {

echo $account['entry_suburb'];

} elseif ($error) {

if ($entry_suburb_error) {

echo tep_draw_input_field('suburb') . ' ' . ENTRY_SUBURB_ERROR;

} else {

echo $suburb . tep_draw_hidden_field('suburb');

}

} else {

echo tep_draw_input_field('suburb', $account['entry_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

if ($is_read_only) {

echo $account['entry_postcode'];

} elseif ($error) {

if ($entry_post_code_error) {

echo tep_draw_input_field('postcode') . ' ' . ENTRY_POST_CODE_ERROR;

} else {

echo $postcode . tep_draw_hidden_field('postcode');

}

} else {

echo tep_draw_input_field('postcode', $account['entry_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

if ($is_read_only) {

echo $account['entry_city'];

} elseif ($error) {

if ($entry_city_error) {

echo tep_draw_input_field('city') . ' ' . ENTRY_CITY_ERROR;

} else {

echo $city . tep_draw_hidden_field('city');

}

} else {

echo tep_draw_input_field('city', $account['entry_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

$state = tep_get_zone_name($country, $zone_id, $state);

if ($is_read_only) {

echo tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state']);

} elseif ($error) {

if ($entry_state_error) {

if ($entry_state_has_zones) {

$zones_array = array();

$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($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) . ' ' . ENTRY_STATE_ERROR;

} else {

echo tep_draw_input_field('state') . ' ' . ENTRY_STATE_ERROR;

}

} else {

echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state');

}

} else {

echo tep_draw_input_field('state', tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;

}

?></td>

</tr>

<?php

}

?>

 

<tr>

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

<td class="main">

<?php

if ($is_read_only) {

echo tep_get_country_name($account['entry_country_id']);

} elseif ($error) {

if ($entry_country_error) {

echo tep_get_country_list('country') . ' ' . ENTRY_COUNTRY_ERROR;

} else {

echo tep_get_country_name($country) . tep_draw_hidden_field('country');

}

} else {

echo tep_get_country_list('country', $account['entry_country_id']) . ' ' . (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

if ($is_read_only) {

echo $account['customers_telephone'];

} elseif ($error) {

if ($entry_telephone_error) {

echo tep_draw_input_field('telephone') . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR;

} else {

echo $telephone . tep_draw_hidden_field('telephone');

}

} else {

echo tep_draw_input_field('telephone', $account['customers_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

if ($is_read_only) {

echo $account['customers_fax'];

} elseif ($processed) {

echo $fax . tep_draw_hidden_field('fax');

} else {

echo tep_draw_input_field('fax', $account['customers_fax']) . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': '');

}

?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

Share this post


Link to post
Share on other sites
hi,

 

great contribution, works like a charm!

 

i would like to remove all login info, anyone has a list of files to alter?

 

thanks!

@late : what do you mean with "login info" ? For me there is nothing that can be dropped. Can you be a bit more precise please ?

 

Thanks,

 

Didier.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×