Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

If your file is modified you cant go by line numbers... you just have to pay attention to the code while keeping tabs on where approximately it is/should be, based on previous mods... a pain. you can also try looking back to the default file to get a clearer picture of placement, then go at it... hope that helps.

 

Thanks Road Doctor, I didn't think about downloading the original file and using that as the reference. I did it without any problems. I'll upload the files on my server tonight, hopefully all will work. Thanks!

Link to comment
Share on other sites

RoadDoctor if you could give me a direct link to your shipping page I could possibly help you a little futher. PM me or post it on here

 

Did the code I give work or did you get it to work?

 

Woot - I think I got the PWA 1.1 / PaypalWPP merge to work. No parse error and seem to be working

 

EXCEPT for still no address showing up for with account logged in customers... :(

 

Here is the code, it might be totally wrong, if so all advice is appreciated.

 

				<td class="main" width="50%" valign="top">
<?php
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

// added for PWA1.1 begin // 
echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>':' ');
// added for PWA1.1 end //


} 
?>
</td>

 

now I need to fix this

PWA1_1_BrokenAddress.jpg

 

I have no clue where to look.

-Dave

Link to comment
Share on other sites

for reference this is the original code the above replaced

 

				<td class="main" width="50%" valign="top">
<?php 
echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br>'; 
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; 

} 
?>
</td>

 

matrix 2223 - to see the missing address(s) , go to my site and create an account, add 1 item to the cart, and proceed thru normal checkout, the address will be missing from the checkout_shipping and checkout_payment files, but will be visible on checkout_confirmation... shipping pricing is working fine too. Just seem to be not calling the billing or shipping addy onto the pages for the customer to see... use a name like Osc Tester so I know to delete the account later... Thanks for the help.

-Dave

Link to comment
Share on other sites

RoadDoc we are on the wrong page here the problem lyies within the define section notice on your source code that only a coma is shown as

 

<tr>

<td class="main" align="center" valign="top"><b>Shipping Address:</b><br><img src="images/arrow_south_east.gif" border="0" alt=""></td>

<td><img src="images/pixel_trans.gif" width="10" height="1" border="0" alt=""></td>

*********<td class="main" valign="top"> <br> <br> , <br> </td>********<---THIS LINE

<td><img src="images/pixel_trans.gif" width="10" height="1" border="0" alt=""></td>

</tr>

 

look in the lang/english/checkout_shipping.php for the define shipping address; also double check the rest of your code in catalog/checkout_shipping.php where it has the above stated code and correct it by takin the , out of there this should fix this error, also as a tripple check, check the shipping.php also

 

Hope this helps

Link to comment
Share on other sites

The code in catalog/checkout_payment and checkout_shipping appears to be correct... no extra comma to remove. I assume tep_address_label is the problem?? I'm lost.

 

<?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?>
			<td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
				<td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
			  </tr>
			</table></td>

-Dave

Link to comment
Share on other sites

Hi,

 

A couple of questions: I uploaded the new files, everything seems to run. I had an error in the catalog/create_account.php file which I fixed. Do I have to run the SQL statements again?

 

I can't find a link to purchase without an account. I defined the 'TEXT_GUEST_INTRODUCTION' variable in includes/languages/english/login.php but I don't see anything. What page am I supposed to see the option to "purchase without an account?" I removed the customer greeting. Is that why I can't see it? Please take a look at my website (check profile). I have a login box in the right column. Do I have to place a link here in order to make it work? If so, how do I do it?

 

Thanks!

Link to comment
Share on other sites

Hi,

 

A couple of questions: I uploaded the new files, everything seems to run. I had an error in the catalog/create_account.php file which I fixed. Do I have to run the SQL statements again?

 

I can't find a link to purchase without an account. I defined the 'TEXT_GUEST_INTRODUCTION' variable in includes/languages/english/login.php but I don't see anything. What page am I supposed to see the option to "purchase without an account?" I removed the customer greeting. Is that why I can't see it? Please take a look at my website (check profile). I have a login box in the right column. Do I have to place a link here in order to make it work? If so, how do I do it?

 

Thanks!

 

What should happen is that they select a product, add it to the shopping cart, click checkout, and 3 options are given (order depends on how you set it up)

login

create account

proceed directly to checkout

 

It is on the login.php page, but only if you have gone to purchase without logging in or creating an account.

Link to comment
Share on other sites

What should happen is that they select a product, add it to the shopping cart, click checkout, and 3 options are given (order depends on how you set it up)

login

create account

proceed directly to checkout

 

It is on the login.php page, but only if you have gone to purchase without logging in or creating an account.

 

Thanks for the quick reply. Well, nothing is showing up on the main page and I have defined the TEXT_GUEST_INTRODUCTION variable which is not showing up on the catalog/login.php page. Is this supposed to show up above or below the new customer and returning customer boxes? Please help! Thanks.

Link to comment
Share on other sites

Thanks for the quick reply. Well, nothing is showing up on the main page and I have defined the TEXT_GUEST_INTRODUCTION variable which is not showing up on the catalog/login.php page. Is this supposed to show up above or below the new customer and returning customer boxes? Please help! Thanks.

Following the process I gave, the proceed directly to account is the last option.

 

I changed it to be first.

 

Here is my login.php page

 

<?php

/*

$Id: login.php,v 1.80 2003/06/05 23:28:24 hpdl Exp $

modified for PWA v0.910

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

 

Installed

 

PWA 0.91

Add Master Password

*/

 

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;

 

// Begin PWA

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

}

// end PWA

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

 

// Add Master Password Start

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

// $error = true;

// } else {

 

$mastpw_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MAST_PW'");

$mastpw = tep_db_fetch_array($mastpw_query);

 

$mastpw_pwd = $mastpw["configuration_value"];

$passwordgood = tep_validate_password($password, $check_customer['customers_password']);

if ($password == $mastpw_pwd) {

 

$passwordgood = 1;

} else {

$passwordgood = $passwordgood;

}

 

if (!$passwordgood) {

$error = true;

} else {

 

// Add Master Password End

 

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

 

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>

</head>

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

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

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

<tr>

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

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('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="70%" cellspacing="0" cellpadding="2">

 

<!-- this is where PWA mods begin -->

 

<?php

if (PWA_ON == 'true') {

if (($cart->count_contents() > 0) && (!isset($HTTP_GET_VARS['my_account_f']) || $HTTP_GET_VARS['my_account_f'] !=1)) // only display of box if something in cart

{

 

?>

<tr class="infoBoxContents">

<!-- this for PWA -->

<td>

<table>

<tr>

<td class="infoboxHeading">

<?php echo HEADING_CHECKOUT; ?>

</td></tr>

<tr>

<td width="100%" class="main" colspan="3"><?php echo TEXT_CHECKOUT_INTRODUCTION; ?></td>

</tr>

<tr>

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

</tr>

<tr>

 

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDER_INFO, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?>

</td>

</tr>

 

</table>

 

</td>

 

</tr>

<?php } ?>

<!-- this is the end of the PWA code for this column -->

 

<tr class="infoBoxContents">

<!-- this row has two columns, one for new customer and one for returning customer -->

 

 

<td valign="top"><!-- this column for New Customer -->

 

<table><tr><td class="infoboxHeading">

<?php echo HEADING_NEW_CUSTOMER; ?></td></tr>

<tr><td class="main">

<?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 align="right">

<?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_create_account.gif', IMAGE_BUTTON_CREATE_ACCOUNT) . '</a>'; ?>

</td></tr></table>

 

</td> </tr><!-- end of column for New Customer -->

 

 

<tr class="infoBoxContents"><td valign="top"><!-- this column for Returning Customer-->

<table width="100%">

 

<tr>

<td class="infoboxHeading"><?php echo HEADING_RETURNING_CUSTOMER; ?>

</td></tr>

 

<tr><td class="main"><?php echo TEXT_RETURNING_CUSTOMER; ?>

</td></tr>

 

 

<tr><td>

 

<table>

<tr>

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

</tr>

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

<td><?php echo tep_draw_input_field('email_address'); ?></td>

</tr>

<tr>

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

</tr>

<tr>

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

<td><?php echo tep_draw_password_field('password'); ?>

</td></tr>

 

</table>

 

</td></tr>

<tr>

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

</tr>

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

</td></tr>

<tr>

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

</tr>

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

</td></tr>

</table>

</td> <!-- end of column for Returning Customer-->

</tr>

<?php }

 

else {

 

if (PWA_ON == 'false')

 

?>

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

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

<?php } ?>

</table>

<!-- this is where PWA mods end -->

 

</td>

</tr>

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

<!-- body_text_eof //-->

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

<!-- right_navigation //-->

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

<br>

</body>

</html>

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

 

You will need to check this against yours.

Link to comment
Share on other sites

Following the process I gave, the proceed directly to account is the last option.

 

I changed it to be first.

 

Here is my login.php page

 

Hi,

 

My file has some differences. I just followed the instructions, so I am not sure what is wrong with mine. Any ideas?

 

Here is my catalog/login.php file:

 

<?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 (c) 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;
 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');

	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>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<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>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('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>
			  <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>
  <?php
 // Ingo PWA Beginn
 if (defined('PURCHASE_WITHOUT_ACCOUNT') && (PURCHASE_WITHOUT_ACCOUNT == 'ja' || PURCHASE_WITHOUT_ACCOUNT == 'yes')) {
?>
	  <tr>
		<td colspan="2" width="100%"><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"><?php echo TEXT_GUEST_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, 'guest=guest', 'SSL') . '">' . tep_image_button('button_checkout.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>
	  </tr>
<?php
 }
 // Ingo PWA Ende
?>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php 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 //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks, I appreciate your help!

Link to comment
Share on other sites

Hi,

 

My file has some differences. I just followed the instructions, so I am not sure what is wrong with mine. Any ideas?

 

Here is my catalog/login.php file:

 

<?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 (c) 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;
 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');

	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>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<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>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('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>
			  <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>
  <?php
 // Ingo PWA Beginn
 if (defined('PURCHASE_WITHOUT_ACCOUNT') && (PURCHASE_WITHOUT_ACCOUNT == 'ja' || PURCHASE_WITHOUT_ACCOUNT == 'yes')) {
?>
	  <tr>
		<td colspan="2" width="100%"><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"><?php echo TEXT_GUEST_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, 'guest=guest', 'SSL') . '">' . tep_image_button('button_checkout.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>
	  </tr>
<?php
 }
 // Ingo PWA Ende
?>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php 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 //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks, I appreciate your help!

The first thing that I found was

 

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

 

$error = false;

 

// Begin PWA

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

}

// end PWA

 

was not in your file.

 

You need to check that all of the required edits have been done and uploaded to your site.

 

I have to go go to bed.

Link to comment
Share on other sites

The first thing that I found was

 

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

 

$error = false;

 

// Begin PWA

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

}

// end PWA

 

was not in your file.

 

You need to check that all of the required edits have been done and uploaded to your site.

 

I have to go go to bed.

 

I don't see where you are supposed to add that in the installation file. I am installing the 1.1.1 version (updated March 20). Can anybody help me out please?

Link to comment
Share on other sites

I don't see where you are supposed to add that in the installation file. I am installing the 1.1.1 version (updated March 20). Can anybody help me out please?

Version 1.1 is a text file in German. Good luck.

Link to comment
Share on other sites

Coopco,

 

The 1.1.1 is in german and english example:

 

create_account.php

 

Zeile 510:(Which means line 510)

 

and

 

davor einf?gen:

insert before:<<<<<----------ENGLISH

 

If you need more help I will email you all of the changed files.

Link to comment
Share on other sites

Coopco,

 

The 1.1.1 is in german and english example:

 

create_account.php

 

Zeile 510:(Which means line 510)

 

and

 

davor einf?gen:

insert before:<<<<<----------ENGLISH

 

If you need more help I will email you all of the changed files.

 

Matrix,

 

Could you check out my login.php file? I posted it a few posts ago. Thanks!

Link to comment
Share on other sites

Yea!

Both my issues resolved now. The new 1.1.1 version fixes the missing address fields issue. A typo missing "s"... argh :) Thank you ingophisto and matrix2223...

 

in includes/functions/general.php

 

if ($customer_id == 0) {

 

changed to

if ($customers_id == 0) {

 

PWA is working perfectly now. Thanks!

 

I would still be interested in confirmation regarding the code below (from checkout_shipping) whether or not it is a correct merge of PWA 1.1 and the paypalWPP modified file.

 

 

Woot - I think I got the PWA 1.1 / PaypalWPP merge to work. No parse error and seem to be working

 

EXCEPT for still no address showing up for with account logged in customers... :(

 

Here is the code, it might be totally wrong, if so all advice is appreciated.

 

				<td class="main" width="50%" valign="top">
<?php
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

// added for PWA1.1 begin // 
echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>':'?');
// added for PWA1.1 end //
} 
?>
</td>

 

now I need to fix this

PWA1_1_BrokenAddress.jpg

 

I have no clue where to look.

-Dave

Link to comment
Share on other sites

Zalik22,

 

If you have fallowed the install instructions and it is then that it is not working email me or send me a personal message with your page code. Please do not post your whole page code on the forums. The reason why I am saying this is one it takes up to much room for people who are looking for specific answers and two it compresses the lines.

 

If you need help I will help you just be more specific and dont post all of your page code.

Link to comment
Share on other sites

RoadDoc,

 

You have a coma (,) that is out of place somewhere did you check files that I mentioned earlier.

 

actually its fixed. Version 1.1.1 fixed the tep_address_label. see my post above. The comma belongs there to seperate city / state.

-Dave

Link to comment
Share on other sites

RoadDoc If you would like I can futher help you. Email me the fallowing: checkout_shipping.php (catalog and lang/english). This way I can put is my test site and futher check for errors. I then can send the correct ones back to you.

 

This is what I am thinkin I think I should make all of the changes and have all files necessary for a complete package this way for new installs one could quickly have it done. Instead of find this line find that line. Frankly after the 10 find I got tired of it. What do you think? Also if people have other mods already done the can use a simple merge program like WinMerge or Beyond Compare.

Link to comment
Share on other sites

Coopco,

 

The 1.1.1 is in german and english example:

 

create_account.php

 

Zeile 510:(Which means line 510)

 

and

 

davor einf?gen:

insert before:<<<<<----------ENGLISH

 

If you need more help I will email you all of the changed files.

includes/languages/german/login.php

(other languages please translate by yourself)

 

vor der ersten Zeile, die mit "define..." beginnt, einf?gen:

before the first line like "define..." begins, insert:

 

// Ingo PWA

define('TEXT_GUEST_INTRODUCTION', '<b>Sofort zur Kasse?</b><br><br>Sie möchten bei uns einkaufen, ohne ein Kundenkonto zu erstellen? Auch das ist möglich. Doch beachten Sie, da? Ihnen dann nicht alle Leistungen und Optionen unseres Shops zur Verfügung stehen können.<br>Unter anderem können Sie den Bearbeitungsstand Ihres Auftrags nicht verfolgen und müssen bei einem weiteren Einkauf alle Ihre Daten neu eintragen.');

 

Thanks for the offer, but I am happy with the version I have instralled.

Link to comment
Share on other sites

I installed the 1.1.1 release today and everything works except when the user purchases without an account.

 

The user goes to the initial create_account.php?guest=guest to enter their address information. Unfortunately, the address information is not sent to the following checkout forms resulting in an error.

 

Any suggestions or solutions?

Link to comment
Share on other sites

I tested this on my test site and it seemed to work fine. I simply used the stock osc platform and the only mod done was PWA. I will test it again and make sure that I didnt miss something. It was 2 AM anything could have happened. Anyhow I went right down the install list. But Ill check right now and post back in a few.

Link to comment
Share on other sites

ok check the new one out

 

http://www.oscommerce.com/community/contri.../download,12735

 

I renamed one of the file called ClassesOrder.php this should be order.php in the includes/classes/

 

the form_check.js.php should be in the catalog/includes/ dir.

 

the ckeckout_shipping had an extra } on line 50 this was deleted.

 

I have tested this on my test site which is an out of the box OSC with the only contrib being PWA.

 

I tested this going straight through checkout and by changing the address then checking out.

 

Sorry for mix up like I said it was 2AM.

Link to comment
Share on other sites

With further testing I found one issue durring checkout you could change your address on the first page of the checkout the rest you could.

 

So to fix this go to catalog/checkout_shipping.php on line 46 delete the fallowing:

 

if ($check_address['total'] != '1') {

$sendto = $customer_default_address_id;

if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');

}

}

 

this was added twice durring installation and this causes the error that koacamper posted

 

ALL IS GOOD have fun with it. :thumbsup:

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