Jump to content

Attach a PDF in the shipping mail confirmation


Frenchy

Recommended Posts

Hi,

I have finally find my solution.

I override the Mail.php class and in the Send function, Before the :

/* Send mail */

I add : 

if ($template == 'shipped') {
	$file = _PS_ROOT_DIR_ . '/extrapdf/Conditions_de_retours.pdf';
    $message->attach(Swift_Attachment::fromPath($file));
}

 

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