Jump to content

Sending additional mail when order is delivered.


sem1986

Recommended Posts

Hello, everybody.

I use Prestashop 1.6.1.4. And I need automatic send email to my trustpilot.com account with customer data, when order is delivered. Now it is sending mail via mailalerts module when new order.

Maybe somebody knows how to do this, or maybe for that exist some module.

Thanks

Edited by asdasd1234 (see edit history)
Link to comment
Share on other sites

I need this email when delivered.

I can enable in backend sending email for the customer when the status of order changed in "Delivered". And I hope that there is the way to send this email not only the customer but in my Trustpilot account, or send it instead of the customer to Trustpilot account.

My main task it is notified trustpilit.com when the order is delivered. And that notification I need to send with customer data.
Here is how it works by default - https://support.trustpilot.com/hc/en-us/articles/203391983-Automatic-Feedback-Service-Implementation-Guide-Prestashop

Link to comment
Share on other sites

And how do you know when it is delivered?  Or more important, how will your Prestashop store know it was delivered so that it could send an email.

 

Do you have some module installed that will send automated emails to TrustPilot?  There is nothing in the core of Prestashop that is going to do this for you...

Link to comment
Share on other sites

  • 2 months later...

he want simply send the shipped template when on backoffice he change status not only to the customer but alo in BCC to the trustiplot automatic invite service.

Is something i try to accomplish me too but i don't know how to hook the mail.php adding a BCC email only if template is "shipped"

Link to comment
Share on other sites

So the right thing would be to create a module that listens for order status changes, and then react to the change by sending the shipped email directly to trustiplot.  Prestashop will already have sent the shipped email to the customer.

 

The alternative is to change the core classes of Prestashop so that when the order status changes, and the order status is 'shipped', that it adds the trustiplot email to bcc. 

 

PS v1.6.1.4 already supports BCC on emails, so you should not need to change mail.php at all.  Depending on the above approach, which determine which classes need to change or be created.

 

If you are not familiar with PHP coding, then you likely would need to hire someone to do this for you

Link to comment
Share on other sites

So the right thing would be to create a module that listens for order status changes, and then react to the change by sending the shipped email directly to trustiplot.  Prestashop will already have sent the shipped email to the customer.

 

The alternative is to change the core classes of Prestashop so that when the order status changes, and the order status is 'shipped', that it adds the trustiplot email to bcc. 

 

PS v1.6.1.4 already supports BCC on emails, so you should not need to change mail.php at all.  Depending on the above approach, which determine which classes need to change or be created.

 

If you are not familiar with PHP coding, then you likely would need to hire someone to do this for you

 

creating an override of mail.php like thhis could work?

<?php
class Mail extends MailCore
{
    
public static function Send($id_lang, $template, $subject, $template_vars, $to,
        $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
        $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null, $reply_to = null)
{
    // add trustpilot SFA 2.0
    if($template == 'shipped')
    {
        $bcc->addBcc('*********@invite.trustpilot.com');
    }      
    
    // send to customer
    $ret = parent::Send($id_lang, $template, $subject, $template_vars, $to, $to_name, $from, $from_name, $file_attachment, $mode_smtp, $template_path, $die, $id_shop, $bcc, $reply_to);
    return $ret;
}
?>
Link to comment
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
×
×
  • Create New...