Get Free Audit

How to Send Additional Emails About Successful Order

Dec 17, 2015

3376 Alex Simonchik

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()

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

6 Comments

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

  2. I am just started using Prestashop. I want to send email notification after every two days regularly to payment pending customer automatically.
    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. 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!

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

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *