Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal IPN Module v1.0 For 2.2MS2 release 1.4 from 31/10/2006 and checkout_process file...


prakas

Recommended Posts

Hi !

 

I just intalled the Paypal IPN Module v1.0 For 2.2MS2 - v. 1.4 from Oct. 31, 2006 and I face the following problems.

 

1) When I make an order there are two orders status recorded in the same time as below:

 

-----------------------------------------------------------------------------------

Date of the order | Notified Customer | Status

-----------------------------------------------------------------------------------

02/11/2006 09:25:08 | X | Preparing [PayPal IPN]

-----------------------------------------------------------------------------------

02/11/2006 09:26:35 | V | Preparing [PayPal IPN]

-----------------------------------------------------------------------------------

 

Do somebody advise me how to do to solve this little problem ?

 

2) In the checkout_process.php file I added the following contributions (Shipdate v0.1, Order IP Recorder v1.0 and send_order_html_email_v5.4) which are running well with all the other payment module I use :

 

a) Just after "include('includes/application_top.php');" I added

 

// BEGIN ADD IP RECORDER V1.0 - 18/09/2006

$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];

$client = gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);

$str = preg_split("/\./", $client);

$i = count($str);

$x = $i - 1;

$n = $i - 2;

$isp = $str[$n] . "." . $str[$x];

// END ADD IP RECORDER V1.0 - 18/09/2006

 

and

 

B) Just after "include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);" I added

 

// BEGIN ADD SHIPDATE

require(DIR_WS_CLASSES . 'shipsched.php');

$shipsched=new ShippingSchedule;

if(!$shipsched->DateStillValid($_SESSION['shipdate'])){

unset($_SESSION['shipdate']);

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error=expired_arrival_date', 'SSL')); //ERR MSG ON NEXT PAGE

}

// END ADD SHIPDATE

 

and

 

c) Just before "// lets start with the email confirmation

if (EMAIL_USE_HTML == 'true') {" I added :

 

//------insert customer choosen option eof ----

// ################ Added Send Order HTML Mail ##################

 

$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);

$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];

$total_cost += $total_products_price;

 

// $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . '<br>';

 

// $products_quantity .= nl2br($order->products[$i]['qty'] . "\n\n\n");

$products_quantity .= nl2br($order->products[$i]['qty']) . '<br><br>';

 

for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) {

$products_quantity .= '<br>';

}

 

// $products_name .= nl2br("" . $order->products[$i]['name'] . $products_ordered_attributes ."\n\n\n");

$products_name .= nl2br("" . $order->products[$i]['name'] . $products_ordered_attributes) . '<br><br>';

 

if (!tep_not_null($order->products[$i]['model'])) {

$products_model .= ''.EMAIL_NO_MODEL.'' ;

// Added

for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) {

$products_model .= '<br>';

}

}

 

else

// $products_model .= nl2br($order->products[$i]['model'] . "\n\n\n");

$products_model .= nl2br($order->products[$i]['model']) . '<br><br>';

// Added

for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) {

$products_model .= '<br>';

}

 

// $products_price .= nl2br($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty']) . "\n\n\n");

$products_price .= nl2br($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'])) . '<br><br>';

// Added

for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) {

$products_price .= '<br>';

}

}

 

 

for ($i=0; $i<sizeof($order_totals); $i++) {

$Vartaxe .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

}

 

if ($order->content_type != 'virtual') {

$Varaddress .= tep_address_label($customer_id, $sendto, 0, '', "\n") ;

}

 

 

/////ADPAYE

$Varadpay .= tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

 

/////MODPAYE

if (is_object($$payment)) {

$Varmodepay .= EMAIL_TEXT_PAYMENT_METHOD .

EMAIL_SEPARATOR ;

$payment_class = $$payment;

 

// ########### Added Virement Bancaire ############

// $Varmodpay .= $payment_class->title ;

 

/////MODPAYE

if (is_object($$payment)) {

$Varmodepay .= EMAIL_TEXT_PAYMENT_METHOD . EMAIL_SEPARATOR ;

$payment_class = $$payment;

$Varmodpay .= $payment_class->title ;

if ($payment_class->email_footer_html) {

$Varmodpay .= $payment_class->email_footer_html . "\n\n";

} elseif ($payment_class->email_footer) {

$Varmodpay .= $payment_class->email_footer . "\n\n";

}

}

}

// ########### End Added Virement Bancaire ############

 

 

$Varlogo = ''.VARLOGO.'' ;

$Vartable1 = ''.VARTABLE1.'' ;

$Vartext1 = ' <b>' . EMAIL_TEXT_DEAR . ' ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] .' </b><br><br> ' ;

$VarTotal= ''.TOTAL.'' ;

$Vardetail = ''.DETAIL .'' ;

$Varhttp = ''.VARHTTP.'';

$Varstyle = ''.VARSTYLE.'';

$varmessage = ' ' . MESSAGE_SOCIETY . STORE_NAME . ' ';

$varcategory = ' ' . CATEGORY_CONTACT . ' ';

$varuser = ' ' . EMAIL_TEXT_USER . ': ' . $order->customer['email_address'] . ' ';

// $varip = ' ' . CATEGORY_ADDRESS_IP . $ip . ' ';

$varcomments = ' ' . EMAIL_COMMENTS . ' ';

$varinfocomments = ' ' . $order->info['comments'] . ' ';

$vardatecommande = ' ' . EMAIL_TEXT_DATE_ORDERED . ' : ' . strftime(DATE_FORMAT_LONG) . '<br>';

$Vartext2 = ' ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . '<br>' . EMAIL_TEXT_INVOICE_URL .

': <a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id .'"><font size="-2">' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id .

'</font></a> ' . $email_total .' <br>' ;

$varimage = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id .'">'.IMG.'</a> ' ;

$Vartable2 = ''.VARTABLE2.'' ;

$varproducts = ' ' . EMAIL_TEXT_PRODUCTS . ' ';

$varmodel = ' ' . EMAIL_TEXT_PRODUCTS_MODEL . ' ';

$varqty = ' ' . EMAIL_TEXT_PRODUCTS_QTY . ' ';

$vartotal = ' ' . EMAIL_TEXT_TOTAL . ' ';

$varbilling = ' ' . EMAIL_TEXT_BILLING_ADDRESS . ' ';

$vardelivery = ' ' . EMAIL_TEXT_DELIVERY_ADDRESS . ' ';

$varpaymethod = ' ' . EMAIL_TEXT_PAYMENT_METHOD . ' ';

$Varmailfooter1 = '' . EMAIL_TEXT_FOOTER . ' ' ;

$Varmailfooter2 = '' . EMAIL_TEXT_FOOTERR . ' ' ;

$Varlogofooter = '' . FOOTER_LOGO . ' ' ;// ajout banni?re "Il suffit de penser ? quelqu'un" du 08/10/2006

 

require(DIR_WS_MODULES . 'email/html_checkout_process.php');

$email_order = $html_email_order ;

 

With Paypal IPN Module there are no Ship Date, no IP address and order receipt by a html mail (with checkout_process (ref.: send_order_html_email_v5.4)

 

Thanks in advance for your advises !

 

Best regards,

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