Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Email Notification


Dj-Viper

Recommended Posts

Hello,

Is it possible to change and how when the order confirmation email is send.

See under :

Nieuwe order is not send, that's is before the payment module will kick in.

Intialized would be processing payment. 

Completed would be when the order confirmation is send.

Is it possible that it will send a order confirmation order mail to me and the customer when it is at the first stage.

Greetings, Anne

17.06.2020 14:28:42 Completed   Waar
17.06.2020 14:27:56 Initialized   Fout
17.06.2020 14:27:48 Nieuwe order  

Fout

Link to comment
Share on other sites

3 minutes ago, Dj-Viper said:

Nieuwe order is not send, that's is before the payment module will kick in.

This is not the normal workflow.  Normally, when the order is first inserted in the database, the email is sent. 

So two possibilities: 

1.  Your payment module performs its own workflow where it inserts the order before processing the payment. 

2.  You have order emails turned off. 

If the latter, turn them on.  If the former, then the payment module would need to be modified. 

It would be problematic to modify such a payment module to work the way that you describe.  Because payment modules that insert the order into the database before processing payment do not necessarily process the payment.  Because payment failures happen after the order is inserted. 

Typically, if your payment module works that way, what you want to happen is for the email to be initiated in two ways. 

1.  When the customer returns to the web site after paying, it sends the email.  This happens automatically on checkout_process in the normal flow. 

2.  If the customer does not return to your web site, the payment processor sends a payment message which triggers sending the email.  PayPal calls this an IPN. 

Perhaps your payment module is missing the latter portion.  Or it could be bypassing the former.  Or both. 

Regardless, this isn't a matter of simple configuration (unless you have order emails turned off).  You need development on the payment module. 

Always back up before making changes.

Link to comment
Share on other sites

Hi, Ecartz

Yes indeed, that i understand. The order emails are turned on. But need to find a way to recieve them again myself and the customer. 

The payment processor has been so good and nice to alter something in there back url when payment is done so the status is not anymore being updated. And only new order is set. So the customer is only getting a email that payment is done, but no order email and also i don't get one. And the best thing is that they won't want to fix it because oscommerce is for them old and not important anymore. (they want me to migrant to anothere commerce platfom) but i like oscommerce.

I have tested myself, place order (works), payment (works) goes to checkout confirmation (works). But the status is not being updated.

Greetings, Anne

Link to comment
Share on other sites

There is a pending order email contribution, very old one. Has this inside as one of the installation part.

in catalog/checkout_confirmation.php find

<!-- body_eof //-->

<!-- footer //-->

Replace with:
<!-- body_eof //-->
<?php
// lets start the pending email
if ($order->info['payment_method'] == "Paypal") {
  require(DIR_WS_FUNCTIONS . 'pending_order_email.php');
 }
// end email pending order
?>
<!-- footer //-->

Only where does this go and is it still good.

Greetings, Anne

 

Link to comment
Share on other sites

The obvious place to put it would be in a hook or header tags module (as a footer script). 

class hook_shop_checkout_confirmation_pending_order_email {

  public function listen_injectSiteEnd() {
    if ($GLOBALS['order']->info['payment_method'] === 'Paypal') {
      require 'includes/functions/pending_order_email.php';
    }
  }

}

That's probably the most literal translation of it.  You may have to move some of the contents of that file into the hook file instead.  E.g. the actual function declarations.  I presume that it's written to have some side effect.  Perhaps move the side effect into where the require is and move the function declarations after the hook class declaration. 

Always back up before making changes.

Link to comment
Share on other sites

Hi,

Tried some things out but couldn't get it to work, email is nog send. Also on the confirmation page the heading are not correct anymore, its like Heading_text_  etc.

Using edge, pwa and normal also modular checkout. php5.6

https://apps.oscommerce.com/cg08y&pending-order-email

Greetings, Anne

(Damn i hate psp's that think oscommerce are not important.)

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...