Jump to content
Sign in to follow this  
nana

fast easy checkout

Recommended Posts

It seems to completely igore the fact that no account was created when

in function notifyCustomer(&$order) executing this bit of code in Order.class.php:

  
// Add test for no account : no display of invoice URL if no account customer
if (!tep_session_is_registered('createaccount'))
{

and just continues to process the email in the normal way.

Share this post


Link to post
Share on other sites

i am working on this it seems that in the new version he has moved everything to his own folder and he might not be using the application_top.

i have to comeup with an alternetive which should not be that difficult

i am thinking of checking in the customers table to see if this is a non_account and then use that info

but i am at work and my boss is here so it might take a liitle time

i should have a solution today

Share this post


Link to post
Share on other sites

Hi Frank.

 

How do overseas orders make it past the State and Zip Code requirement?

 

Currently, it returns a message saying "Your Zip Code must contain a minimum of 4 characters." and "Your State must contain a minimum of 2 characters."

Share this post


Link to post
Share on other sites
otto you can set those values in the admin section

 

Oh, ok. So there's a setting in admin to turn on international shipping addresses to work without making Zip Code and State fields required?

 

Just to clarify, I meant that overseas customers are currently being required to fill in zip code and state and I wanted some way to remove that requirement for them.

 

Apologies if it's an obvious setting in the admin. I just can't seem to find where to look... And I realize this may not be directly related to fast easy checkout. I just wasn't sure... Thanks for all your help.

Share this post


Link to post
Share on other sites

in admin you can set the minimum lenght of each field i think in configuration as far as these values be diffrent for international or domestic

Share this post


Link to post
Share on other sites
in admin you can set the minimum lenght of each field i think in configuration as far as these values be diffrent for international or domestic

Ah. I see it now. I guess what I really need might be to have the Zip Code and State fields not be mandatory fields... Because neither "zip code" nor "state" makes sense for international addresses.

 

Or am I missing something here? How does osCommerce process international credit card ordrers? Or do people just use paypal for international orders?

Share this post


Link to post
Share on other sites

otto i do not remember if zip and state were mandatory or not in the oscommerce originally. you might be able to set the minimum value to 0 or -1 as a trick :blush: but i do not think i changed this if that don't work then

look in the original create account and try to remove the error checking for the minimum lenght of the to field in both shipping and billing section

or let me know and i take a look

 

david and whoever else might be intrestes this is the changes i think is necessary to change the link in email for paypalipn contribution of greg

i have this little code that i think would solve the problem but i can not test it i have explained what i did it is pretty simple just two things

1-$order->customer['email_address'] i do not know if it exist if not use the variable as it used in tep_mail function . we use this in two diffrent place

2- ($check_status['createaccount']!='Y') use with N or Y as best fit your set up

//fast easy checkout start
//dded the next to line to check type of account
//$order->customer['email_address'] or anything that represent customers email address

$check_status_query = tep_db_query("select customers_id, customers_email_address, createaccount from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $order->customer['email_address']  . "'");
$check_status = tep_db_fetch_array($check_status_query);

// Add test for no account : no display of invoice URL if no account customer
if ($check_status['createaccount']!='N')
{
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $this->orderID . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . $this->accountHistoryInfoURL . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

$customerComments = $this->getCustomerComments();

if ($CustomerComments) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
}
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
EMAIL_SEPARATOR . "\n" .
$products_ordered .
EMAIL_SEPARATOR . "\n";
} else {
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $this->orderID . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
//removed this querry since all the info would already be available now also changed the next few lines  from $check_customer to $check_status
//$check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_password, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $order->customer['email_address'] . "' AND createaccount='N'");

//$check_customer = tep_db_fetch_array($check_customer_query);
$new_password = tep_create_random_value(15);
$crypted_password = tep_encrypt_password($new_password);

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . $crypted_password . "' where customers_id = '" . (int)$check_status['customers_id'] . "'");

$email_order .= EMAIL_TEXT_INVOICE_PASSWORD . ' ' . tep_href_link('account_password_new.php', 'confirmation_password=' . $new_password.'&customers_id='.$check_status['customers_id'], 'SSL', true) . "\n";
$email_order .= EMAIL_TEXT_INVOICE_PASSWORD_NOLINK. $new_password . "\n";

if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
}
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
EMAIL_SEPARATOR . "\n" .
$products_ordered .
EMAIL_SEPARATOR . "\n";
}

Share this post


Link to post
Share on other sites

Help - I need that! My Paypal is all messed up - I don't have a Oscommerce programmer right now and I need help please - I had a sale notification go out to thousands of people today and my Paypal isn't working for express checkout - it only works for people with Paypal accounts - I'm losing sales! Can anyone recommend someone that does this?

Thanks,

Lori

 

 

 

this combines shipping and payment pages in checkout process also login-create account with purchase without account combination

see demo at http://seelily.com/

Share this post


Link to post
Share on other sites

Freeman,

Do you have is set up in Paypal itself to allow people without PayPal accounts to buy from you?

 

My Account -> Profile -> Website Payment Preferences ->PayPal Account ->Optional Y

Share this post


Link to post
Share on other sites

Thanks for the new code Frank. Unfortunately I don't have any way of testing it either at the moment as I can only send emails from my live system not from the test system. I'll see if I can work around it

Share this post


Link to post
Share on other sites

Yes,

It is set up that way - it was working and now it's not working at all - has there been a paypal change or an oscommerce update or anything like that?

 

Thanks so much!

Lori

 

Freeman,

Do you have is set up in Paypal itself to allow people without PayPal accounts to buy from you?

 

My Account -> Profile -> Website Payment Preferences ->PayPal Account ->Optional Y

Share this post


Link to post
Share on other sites
Is there an easy way to install this. The instructions aren't that great.

no not at the moment. i will try to make a new instruction next week sometimes. in the mean time why don't you go ahead and try to make other modifications that are more necessary for functionality of your shop

mine does not add any functionality so it can wait

 

LStellar what paypal contribution you are using. if you are using the paypal pro that contribution seems to have some problems and was removed from the contribution section.

 

david i am trying to upgrade my own ipn also i will let you know as soon as i install it

Share this post


Link to post
Share on other sites

I'm not using paypal pro - just paypal. Everything was working fine and over the past few days I've had people contact me that they are not able to checkout without a paypal account. I've even tried to put it through for people and it just goes to that paypal login page. Any suggestions?

 

thanks,

Lori

 

no not at the moment. i will try to make a new instruction next week sometimes. in the mean time why don't you go ahead and try to make other modifications that are more necessary for functionality of your shop

mine does not add any functionality so it can wait

 

LStellar what paypal contribution you are using. if you are using the paypal pro that contribution seems to have some problems and was removed from the contribution section.

 

david i am trying to upgrade my own ipn also i will let you know as soon as i install it

Share this post


Link to post
Share on other sites

i think in paypal login page there is a link that say if you don't have an account click here. i have not changed any info as it goes to paypal so i don't see how this could happen

are you using any ipn contribution or chabged anything else

could you revert back to the original checkout and see if you still have the same problem

Share this post


Link to post
Share on other sites

zuncan have found a bug in the checkout_shipping.php

this bug causes that when a customer adds a secondary address and then erases is the shop does not choose the default addres and causes an error

in checkout_shipping.php around like 25 or a little after that

change everything between

// if there is nothing in the customers cart, redirect them to the shopping cart page
 if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

and around line 65

// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

to this block of code

 
// if no shipping destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
 } else {
// verify the selected shipping address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
  $sendto = $customer_default_address_id;
  if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
}
 }
// if no billing destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('billto')) {
tep_session_register('billto');
$billto = $customer_default_address_id;
 } else {
// verify the selected billing address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
  $billto = $customer_default_address_id;
  if (tep_session_is_registered('payment')) tep_session_unregister('payment');
}
 }

or simply use this checkout_shipping.php

<?php
/*
 $Id: checkout_shipping.php,v 1.16 2003/06/09 23:03:53 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');
 require('includes/classes/http_client.php');
 //the next 4 lines are for ccgv
/* require(DIR_WS_CLASSES . 'order_total.php');

 $order_total_modules = new order_total;
 $order_total_modules->collect_posts();
 $order_total_modules->pre_confirmation_check(); */
// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
 //  tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));
tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
 }

// if there is nothing in the customers cart, redirect them to the shopping cart page
 if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }
// if no shipping destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
 } else {
// verify the selected shipping address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
  $sendto = $customer_default_address_id;
  if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
}
 }
// if no billing destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('billto')) {
tep_session_register('billto');
$billto = $customer_default_address_id;
 } else {
// verify the selected billing address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
  $billto = $customer_default_address_id;
  if (tep_session_is_registered('payment')) tep_session_unregister('payment');
}
 }


// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }
 tep_session_unregister('billing');
tep_session_unregister('payment');
 if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];
 if (!tep_session_is_registered('payment')) tep_session_register('payment');
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment;
 require(DIR_WS_CLASSES . 'order.php');
$order = new order;



if($n==1){
if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

tep_session_unregister('payment');
  $payment_modules->update_status();
}
 if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
 }
}
while (list($key, $value) = each($_POST))
  {
	  tep_session_register($key);
  }

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();


 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping;

 if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
  case 'national':
	if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'international':
	if ($order->delivery['country_id'] != STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'both':
	$pass = true;
	break;
}

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
  $free_shipping = true;

  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
 } else {
$free_shipping = false;
 }

// process the selected shipping method
 if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
  $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
  if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
	$shipping = $HTTP_POST_VARS['shipping'];

	list($module, $method) = explode('_', $shipping);
	if ( is_object($$module) || ($shipping == 'free_free') ) {
	  if ($shipping == 'free_free') {
		$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
		$quote[0]['methods'][0]['cost'] = '0';
	  } else {
		$quote = $shipping_modules->quote($method, $module);
	  }
	  if (isset($quote['error'])) {
		tep_session_unregister('shipping');
	  } else {
		if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		  $shipping = array('id' => $shipping,
							'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
							'cost' => $quote[0]['methods'][0]['cost']);

	  tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION,'', 'SSL'));
		}
	  }
	} else {
	  tep_session_unregister('shipping');
	}
  }
} else {
  $shipping = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION,  '', 'SSL'));
}
 }

// get all available shipping quotes
 $quotes = $shipping_modules->quote();

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
 if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

<?php echo $payment_modules->javascript_validation(); ?>
<script language="javascript"><!--
var selected;

function selectRowEffect2(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected2';
 selected = object;

// one button is not an array
 if (document.checkout_payment.shipping[0]) {
document.checkout_payment.shipping[buttonSelect].checked=true;
 } else {
document.checkout_payment.shipping.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
<script language="javascript"><!--
var selected;
<?php//rmh M-S_ccgv begin ?>
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
<?php//rmh M-S_ccgv end ?>
function selectRowEffect(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
document.checkout_payment.payment.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></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 //-->
  <!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'n=1', 'SSL'), 'post', 'onsubmit="return check_form();"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE;
//echo $ZETA; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_payment.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 (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td>
	<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
	  <tr class="infoBoxNoticeContents">
		<td>
		<table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table>
   </td>
	  </tr>
	</table>
<?php
 }
?>
  </td>
	<td>
	<table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		   </tr>
	</table></td>
  </tr>
<?php

 if (!tep_session_is_registered('registered_now')) {

?>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td>
		<table border="0" width="50%" cellspacing="0" cellpadding="2">
		  <tr>

		   <td align="left" valign="top">
		   <table border="0" cellspacing="0" cellpadding="2">
			  <tr>
			  <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
			  </tr>
			  <tr>
			   <td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
			   </tr><tr>
			  <td class="main"  valign="top"><?php echo  '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
			  </tr>
			</table>
			</td> </tr>
			</table>
			</td>
			<td>
			<table border="0" width="50%" cellspacing="0" cellpadding="2">
		  <tr>
		   <td align="right"  valign="top">
		   <table border="0" cellspacing="0" cellpadding="2">
			  <tr>
			 <td class="main"><b><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></b></td>
			 </tr>
			 <tr>
			  <td class="main" valign="top"><?php echo tep_address_label($customer_id, $billto, true, ' ', '<br>'); ?></td></tr>
				<tr>
			  <td class="main"  valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
		  </tr>

			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php

}

?>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 $selection = $payment_modules->selection();

 if (sizeof($selection) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 } else {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 }

 $radio_buttons = 0;
 for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
				<td class="main" align="right">
<?php
if (sizeof($selection) > 1) {
  echo tep_draw_radio_field('payment', $selection[$i]['id']);
} else {
  echo tep_draw_hidden_field('payment', $selection[$i]['id']);
}
?>
				</td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
if (isset($selection[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
  for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
				  <tr>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
<?php
  }
?>
				</table></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
$radio_buttons++;
 }
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>

   <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (tep_count_shipping_modules() > 0) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} elseif ($free_shipping == false) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
}

if ($free_shipping == true) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2" width="100%"><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 class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b> <?php echo $quotes[$i]['icon']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} else {
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<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 class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	if (isset($quotes[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	} else {
	  for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
		$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

		if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect2(this, ' . $radio_buttons . ')">' . "\n";
		} else {
		  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect2(this, ' . $radio_buttons . ')">' . "\n";
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
<?php
		if ( ($n > 1) || ($n2 > 1) ) {
?>
				<td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
				<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>
<?php
		} else {
?>
				<td class="main" align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
		$radio_buttons++;
	  }
	}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
  }
}
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
<?php
// echo $order_total_modules->credit_selection();//rmh M-S_ccgv
?>
  <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 class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?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>
  <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">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php 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'); ?>



			
		

Share this post


Link to post
Share on other sites

david i have found a solution to paypalipn it is a little more complicated than i thought since this version is completly diffrent than the one i used before and frankly i liked the old version better

any how in order to get this to work proparly small changes has to be done to four files and a new field has to be added to customers table

i will post in a few hours i just need to do a little live test

i have read the ipn modifications for pwa and they do not resolve the issue that we ar talking about for pwa

it seems that for some reason ipn can not get the address when pwa is used.

i am not experiencing this but i can not be sure why it happends with pwa

if this problem exist for you then the same solution that gregory suggest for pwa should work here also

his solution simply gets the address from orders table

but it still displays the LINK

Share this post


Link to post
Share on other sites

Frank,

I uninstalled and reinstalled the paypal module and it's working great!

 

Task for the weekend - switching from Paypal to Authorize.net. Wish me luck!

 

Thanks for your help!

 

Lori

 

 

I'm not using paypal pro - just paypal. Everything was working fine and over the past few days I've had people contact me that they are not able to checkout without a paypal account. I've even tried to put it through for people and it just goes to that paypal login page. Any suggestions?

 

thanks,

Lori

Share this post


Link to post
Share on other sites

david i found the easiest way of doing this for me was to do these

first i create a new field in the customers table

ALTER TABLE `customers` ADD `confirmation_key `VARCHAR( 40) DEFAULT 'tempemptyconfirm' NOT NULL;

then i create a random password if createaccount is set to N and enter this value in the field just created

in create _account.php

change

  if ($error == false) {
if($password==''){
$password=TEMP_PASSWORD;
$confirmation=TEMP_PASSWORD;}
  $sql_data_array = array('customers_firstname' => $firstname,
						  'customers_lastname' => $lastname,
						  'customers_email_address' => $email_address,
						  'customers_telephone' => $telephone,
						  'customers_fax' => $fax,
						  'customers_newsletter' => $newsletter,
						   'createaccount' => $createaccount,
						  'customers_password' => tep_encrypt_password($password));

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

  tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

to

  if ($error == false) {
//changed to a random value
if($createaccount == 'N'){
$password=tep_create_random_value(15);
$confirmation=$password;}
  $sql_data_array = array('customers_firstname' => $firstname,
						  'customers_lastname' => $lastname,
						  'customers_email_address' => $email_address,
						  'customers_telephone' => $telephone,
						  'customers_fax' => $fax,
						  'customers_newsletter' => $newsletter,
						   'createaccount' => $createaccount,
'confirmation_key' => $confirmation, //added for ipn
						  'customers_password' => tep_encrypt_password($password));

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

  tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

then in checkout process for simplicity i changed some of our old modifications and use this value as the password_confirmation rather than creating a new password

//fast easy checkout start
//  Add test for no account : no display of invoice URL if no account customer
if (!tep_session_is_registered('createaccount'))
{
 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
			 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments'])
 {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  $products_ordered .
			  EMAIL_SEPARATOR . "\n";
} else {
 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 $check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_password, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $order->customer['email_address'] . "' AND createaccount='N'");

  $check_customer = tep_db_fetch_array($check_customer_query);

  $new_password = tep_create_random_value(15);
  $crypted_password = tep_encrypt_password($new_password);

  tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . $crypted_password . "' where customers_id = '" . (int)$check_customer['customers_id'] . "'");

$email_order .= EMAIL_TEXT_INVOICE_PASSWORD . ' ' . tep_href_link('account_password_new.php', 'confirmation_password=' . $new_password.'&customers_id='.$check_customer['customers_id'], 'SSL', true) . "\n";
$email_order .= EMAIL_TEXT_INVOICE_PASSWORD_NOLINK. $new_password . "\n";		

 if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  $products_ordered .
			  EMAIL_SEPARATOR . "\n";
 }
//fast easy checkout end

to

//fast easy checkout start
//  Add test for no account : no display of invoice URL if no account customer
if (!tep_session_is_registered('createaccount'))
{
 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
			 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments'])
 {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  $products_ordered .
			  EMAIL_SEPARATOR . "\n";
} else {
 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 $check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_password, customers_id ,confirmation_key from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $order->customer['email_address'] . "' AND createaccount='N'");

  $check_customer = tep_db_fetch_array($check_customer_query);

  $new_password = $check_customer['confirmation_key'];


$email_order .= EMAIL_TEXT_INVOICE_PASSWORD . ' ' . tep_href_link('account_password_new.php', 'confirmation_password=' . $new_password.'&customers_id='.$check_customer['customers_id'], 'SSL', true) . "\n";
$email_order .= EMAIL_TEXT_INVOICE_PASSWORD_NOLINK. "\n";		

 if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  $products_ordered .
			  EMAIL_SEPARATOR . "\n";
 }
//fast easy checkout end

now in /includes/modules/payment/paypal/classes/osC/Order.class.php i find out if the customer has an account and value of this new field so i put this value as newpassword and send it in email

i added

//lets get account status
$check_status_query = tep_db_query("select customers_id, customers_email_address, createaccount,confirmation_key from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $order->customer['email_address']. "'");
$check_status = tep_db_fetch_array($check_status_query);

before

 // lets start with the email confirmation

and

//fast easy checkout start
// Add test for no account : no display of invoice URL if no account customer
if ($check_status['createaccount']=='Y')
{
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $this->orderID . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . $this->accountHistoryInfoURL . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

$customerComments = $this->getCustomerComments();

if ($CustomerComments) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
}
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
EMAIL_SEPARATOR . "\n" .
$products_ordered .
EMAIL_SEPARATOR . "\n";
} else {
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $this->orderID . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";



$new_password = $check_status['confirmation_key'];



$email_order .= EMAIL_TEXT_INVOICE_PASSWORD . ' ' . tep_href_link('account_password_new.php', 'confirmation_password=' . $new_password.'&customers_id='.$check_customer['customers_id'], 'SSL', true) . "\n";
$email_order .= EMAIL_TEXT_INVOICE_PASSWORD_NOLINK. $new_password . "\n";

if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
}
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
EMAIL_SEPARATOR . "\n" .
$products_ordered .
EMAIL_SEPARATOR . "\n";
}
//fast easy checkout end

added the language defenitions to includes/modules/payment/paypal/languages/english/ipn.lng.php

and change the account_password_new to

here again i search custome table to find the same values and use this password for verification of customer

<?php
/*
$Id: account_password_new.php,v 1.1 2003/05/19 19:55:45 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');
// needs to be included earlier to set the success message in the messageStack
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_PASSWORD);

if (($HTTP_GET_VARS['customers_id']) || ($HTTP_POST_VARS['customers_id'])) {
if ($HTTP_GET_VARS['customers_id']){ $customers_id = $HTTP_GET_VARS['customers_id'];}
if ($HTTP_POST_VARS['customers_id']) {$customers_id = $HTTP_POST_VARS['customers_id'];}
} else{
if (tep_session_is_registered('customer_id')){$customers_id=$HTTP_SESSION_VARS['customer_id'];
} 
}
  $check_customer_query2 = tep_db_query("select customers_password,customers_firstname,customers_lastname,customers_gender,confi
rmation_key,customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $customers_id . "'");
  $check_customer2 = tep_db_fetch_array($check_customer_query2);
if (($HTTP_GET_VARS['confirmation_password']) || ($HTTP_POST_VARS['confirmation_password'])) {
if ($HTTP_GET_VARS['confirmation_password']){ $password_current = $HTTP_GET_VARS['confirmation_password'];}
if ($HTTP_POST_VARS['confirmation_password']) {$password_current = $HTTP_POST_VARS['confirmation_password'];}
}else{
if (tep_session_is_registered('customer_id')) $password_current=$check_customer2['confirmation_key'];
if (tep_session_is_registered('confirmation')) $password_current=$HTTP_SESSION_VARS['confirmation'];
if (!tep_session_is_registered('customer_id'))$password_current = tep_db_prepare_input($HTTP_POST_VARS['password_current']);
}
if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
$password_new = tep_db_prepare_input($HTTP_POST_VARS['password_new']);
$password_confirmation = tep_db_prepare_input($HTTP_POST_VARS['password_confirmation']);

$error = false;

if 
//(strlen($password_current) < ENTRY_PASSWORD_MIN_LENGTH) {
 // $error = true;

 // $messageStack->add('account_password', ENTRY_PASSWORD_CURRENT_ERROR);
 //  } elseif
(strlen($password_new) < ENTRY_PASSWORD_MIN_LENGTH) {
  $error = true;

  $messageStack->add('account_password', ENTRY_PASSWORD_NEW_ERROR);
} elseif ($password_new != $password_confirmation) {
  $error = true;

  $messageStack->add('account_password', ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING);
}

if ($error == false) {
  $check_customer_query = tep_db_query("select customers_password,customers_firstname,customers_lastname,customers_gender,custo
mers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $customers_id . "'");
  $check_customer = tep_db_fetch_array($check_customer_query);

if (tep_validate_password($password_current, $check_customer['customers_password'])) {
	 tep_db_query("update " . TABLE_CUSTOMERS . " set createaccount  = 'Y' where customers_id = '" . $customers_id . "'");
	tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password= '" . tep_encrypt_password($password_new) . "' where customers_id = '" . $customers_id . "'");
	tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . $customers_id . "'");
if (tep_session_is_registered('createaccount')) tep_session_unregister('createaccount');
if (tep_session_is_registered('registered_now')) tep_session_unregister('registered_now');
if (tep_session_is_registered('confirmation')) tep_session_unregister('confirmation');
  $messageStack->add_session('account', SUCCESS_PASSWORD_UPDATED, 'success');

   // build the message content
   $gender= $check_customer['customers_gender'];
   $firstname= $check_customer['customers_firstname'];
	$lastname= $check_customer['customers_lastname'];
   $email_address= $check_customer['customers_email_address'];
  $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);


  if (tep_session_is_registered('customer_id')){
  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));
	}}
  tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

} else {
	$error = true;

	$messageStack->add('account_password', ERROR_CURRENT_PASSWORD_NOT_MATCHING);
  }
}
 }

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('account_password', tep_href_link('account_password_new.php', 'customers_id='.$customers_id.'&confirmation_password='.$password_current, 'SSL'), 'post', 'onSubmit="return check_form(account_password);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE;
//echo $password_current; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
<td><?php //echo $password_current; ?></td>
<td><?php //echo $HTTP_SESSION_VARS['new_password']; ?></td>
  </tr>
<?php
 if ($messageStack->size('account_password') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('account_password'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?><?php
 if ($messageStack->size('account') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('account'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		<tr>
			<td class="main"><?php echo CATEGORY_CREATE_ACCOUNT ?></td>
			 </tr>
		  <tr>
			<td class="inputRequirement"><?php echo ENTRY_CREATEACCOUNT; ?></td>
		  </tr>
		  <tr>
			<td class="main"><b><?php echo MY_PASSWORD_TITLE; ?></b></td>
			<td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
		  <tr class="infoBoxContents">
			<td><table border="0" cellspacing="2" cellpadding="2"><?php if (($HTTP_GET_VARS['confirmation_password']) || ($HTTP_POST_VARS['confirmation_password']) || ($password_current==$check_customer2['confirmation_key'])|| ($password_current==$HTTP_SESSION_VARS['confirmation'])) {}else{ ?>
			  <tr>
				<td class="main"><?php echo ENTRY_PASSWORD_CURRENT2; ?></td>
				<td class="main"><?php echo tep_draw_password_field('password_current') . ' ' . (tep_not_null(ENTRY_PASSWORD_CURRENT_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CURRENT_TEXT . '</span>': ''); ?></td>
			  </tr><?php  } ?>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><?php echo ENTRY_PASSWORD_NEW; ?></td>
				<td class="main"><?php echo tep_draw_password_field('password_new') . ' ' . (tep_not_null(ENTRY_PASSWORD_NEW_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_NEW_TEXT . '</span>': ''); ?></td>
			  </tr>
			  <tr>
				<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
				<td class="main"><?php echo tep_draw_password_field('password_confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
			<td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php 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'); ?>

i have done a few tests and it works for me

i will do more test tomorrow to make sure and will post the result

Share this post


Link to post
Share on other sites

david regarding paypalipn contribution

i tested every situation that i thought of and all seems to work of course my shop has a lot of modifications and i had to make small changes from what i have actually tested.but the diffrences seems to be minor and i do not see any problem

 

 

i also looked at his instruction page of ipn and i like it i will try to make a new contribution and use his instruction style

Share this post


Link to post
Share on other sites

Excellent. I'll upload it now.

Of course the database change needs the spacing changed a little to avoid an error message from mysql

ALTER TABLE `customers` ADD `confirmation_key` VARCHAR( 40) DEFAULT 'tempemptyconfirm' NOT NULL;

Edited by radders

Share this post


Link to post
Share on other sites

i added a create account option at checkout success which i will include in the next release if people are intrested.

Edited by nana

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  

×