How to Send Additional Emails About Successful Order

How to Send Additional Emails About Successful Order

One of our clients asked for a feature that allows manually sending additional email about successful order. We created the following button for him:

How to Enable Sending an Additional Emails About Successful Order

And in this article you will find out how we implemented this solution.

In order to add this button we’ve done the overwrite for the template:

/administration/themes/default/template/controllers/orders/helpers/view/view.tpl

by moving it here:

/override/controllers/admin/templates/orders/helpers/view/view.tpl

Then we’ve done the overwrite for this class:

/override/controllers/admin/AdminOrdersController.php

by expanding this function: postProcess()

Basically, we’ve conducted the same actions that Prestashop conducts when creating an order in the following class:

PaymentModule::validateOrder()



6 comments

  1. Hello, please Can you help me? I cannot find PaymentModule::validateOrder() in /override/controllers/admin/AdminOrdersController.php.Can you attach file AdminOrdersController.php ? Thank you

  2. Now I tried a different approach:

    1st I added the view.tpl in override
    2nd I created an AdminOrdersController.php empty and I posted the code provded
    3rd I deleted the cache/class_index.php file

    I tested but the email is not received.

    What I am missing?

    Thanks!

  3. Hi !

    I do the same as Jordi Llobet but I don’t recive the email too.

    I think I’ve forgotten something, can you help us?

    Thanks!!

  4. I am just started using Prestashop. I want to send email notification after every two days regularly to payment pending customer automatically.
    Thanks

  5. require_once _PS_MODULE_DIR_ . ‘belvg_sample/includer.php’;

    $belvg_sample = Module::getInstanceByName(‘belvg_sample’);
    $belvg_sample->saveMsg($belvg_sample->l(‘Order confirmation mail has been re-sent’), $order->id);

    INCOMPLETE EXPLANATION!!!

Post a new comment

top