Jump to content

[Solved] PDF invoice in Email


Recommended Posts

Hello ! After upgrading prestashop from 1.0 to 1.2 it seems my shop has lost the ability to send PDF invoices attachments in the clients e-mail. Is this by design or is there something wrong ? If it's by design , can it be configured to send pdf invoices?

Thank you,
Marius

Link to comment
Share on other sites

  • 3 months later...

hmm.. Yes I'm a bit confused about this.

From memory the PDF invoice generated says something along the lines of "Amount Paid". I don't want this to be available to customers if they haven't paid yet, for example if I'm awaiting bankwire or payment in-store because if they never pay they have an invoice saying they did.

I think I can get around that by disabling the "Allow customer to download and view PDF version of invoice" in BO for the awaiting payment statuses.
But like the other posters, I would have thought that once the status is updated to "Payment Accepted" it should include a PDF attachment of the invoice with the status update email?

Any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

Nobody?

Rather than the customer having to go through their account details in your store, it woudl be nice of once the status changed to payment received, the confirmation email included the PDF invoice as an attachment?

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Modify class PaymentModule.php - change this code:

                   if (intval(Configuration::get('PS_INVOICE')) AND Validate::isLoadedObject($orderStatus) AND $orderStatus->invoice AND $order->invoice_number)
                   {
                       $fileAttachment['content'] = PDF::invoice($order, 'S');
                       $fileAttachment['name'] = Configuration::get('PS_INVOICE_PREFIX', intval($order->id_lang)).sprintf('d', $order->invoice_number).'.pdf';
                       $fileAttachment['mime'] = 'application/pdf';
                   }
                   else
                       $fileAttachment = NULL;



By this one

                   //if (intval(Configuration::get('PS_INVOICE')) AND Validate::isLoadedObject($orderStatus) AND $orderStatus->invoice AND $order->invoice_number)
                   //{
                       $fileAttachment['content'] = PDF::invoice($order, 'S');
                       $fileAttachment['name'] = Configuration::get('PS_INVOICE_PREFIX', intval($order->id_lang)).sprintf('d', $order->invoice_number).'.pdf';
                       $fileAttachment['mime'] = 'application/pdf';
                   //}
                   //else
                   //    $fileAttachment = NULL;

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