Attach Pdf Invoice to Order Delivered Email

Posted: July 17, 2019 at 7:01 AM Quote #242595
I'm using nopcommerce 4.2. In the admin, order settings menu there is an option to attach Pdf invoices with "order completed" email. Is it possible to change this, such that it refers to the standard "order delivered" email instead?

I assume there is some adjustment to the code required. Can anyone please direct me?

Thanks
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 18, 2019 at 4:28 AM Quote #242648
Just to clarify, I'm referring to the "shipment.delivered" email where I want to attach the pdf invoice automatically. Any idea on how to achieve this?
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 18, 2019 at 6:23 AM Quote #242653
You would need to modify the code
The routine that creates the PDF and attaches it to the Order Placed Email is

        protected virtual void SendNotificationsAndSaveNotes(Order order)
In
        nop42\Libraries\Nop.Services\Orders\OrderProcessingService.cs

Copy some of that code into

        public virtual void Ship(Shipment shipment, bool notifyCustomer)
In
        nop42\Libraries\Nop.Services\Orders\OrderProcessingService.cs

Or alternatively into

        public virtual IList<int> SendShipmentSentCustomerNotification(Shipment shipment, int languageId)
in
        nop42\Libraries\Nop.Services\Messages\WorkflowMessageService.cs
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.SelectSystems.com.au
Select Systems International is a computer systems technology solution developer and integration service provider.
Posted: July 18, 2019 at 6:55 AM Quote #242654
This is old, but may interest you

https://www.nopcommerce.com/boards/t/24578/send-pdf-invoice-by-e-mail.aspx
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: August 06, 2019 at 12:57 AM Quote #243302
Took me a while to figure my way around this one. Works perfectly now. Thanks so much for your help!
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more