Jump to content

How to add a button in Orders Page for each order that trigger an email to be sent


t.zak510

Recommended Posts

Hello,

 

How can I create a button inside every order which send an email, I have the following code:

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

 $fromTitle = Configuration::get('WK_MP_FROM_MAIL_TITLE');
        $to = $mpOrderDetail['seller_email'];
 
        Mail::Send(
            $mpOrderDetail['seller_default_lang_id'],
            'mp_order',
            Mail::l('Order Created', $mpOrderDetail['seller_default_lang_id']),
            $templateVars,
            $to,
            $mpOrderDetail['seller_name'],
            $adminEmail,
            $fromTitle,
            null,
            null,
            _PS_MODULE_DIR_.'marketplace/mails/',
            false,
            null,
            null
        );
-------------------------------------------------------------------------------------------------------------------------
 
The following code works fine but how to add a button that will appear on every order and when I click the button, it triggers that code.
 
Thanks
 
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...