Close

Modify Order Detail/Invoice

janelle.autry
8 years ago
#9873 Quote
Avatar
  • 7
Hi!  I was wondering if the code can be adjusted to include the specification attributes that are attached to a product so it will show on the Order Detail/Invoice?  Also, how do I change the Adobe PDF logo on the top right hand corner to our company logo?

Thanks!
iliyan.tanev
8 years ago
#9878 Quote
Avatar
  • Moderator
  • 347
Hi,

You can show the product specifications and attributes on the invoice page, but you will have to modify the PdfService for this.

If you go to Libraries\Nop.Services\Common, open the PdfService.cs file and find the PrintOrdersToPdf, you will see orders collection that is passed to the method. In the method there is a foreach loop that goes through each order and generates the table you are seeing in the pdf file. In every order you have order item that has navigation property to the Product. In the product you will find everything about the product including the specification and attributes. All you need to do is to modify the PrintOrdersToPdf method to generate the specifications and attributes.
See the method code for examples of how to control the table width, how to generate tables and table cells.

Please write back if you have difficulties modifying the method! We will assist you.

About the pdf logo: Do you mean the logo in the Invoice document ? If you do you can upload your own from the Admin -> Settings -> General And Miscellaneous Settings -> Pdf Settings -> Pdf Logo. This will cause the image you have uploaded to appear on the top right corner of the pdf invoice document.

Hope this helps!
Regards,
Iliyan Tanev
Nop-Templates Dev Team
janelle.autry
8 years ago
#9882 Quote
Avatar
  • 7
iliyan.tanev wrote:
Hi,

You can show the product specifications and attributes on the invoice page, but you will have to modify the PdfService for this.

If you go to Libraries\Nop.Services\Common, open the PdfService.cs file and find the PrintOrdersToPdf, you will see orders collection that is passed to the method. In the method there is a foreach loop that goes through each order and generates the table you are seeing in the pdf file.


Thanks for your response but when I try to follow the path above I have no luck.  In my root folder, I do not have Nop.Service.  I even searched for the file name PdfService.cs and could not locate it...
iliyan.tanev
8 years ago
#9884 Quote
Avatar
  • Moderator
  • 347
Hi,

You will need the source code version of nopCommerce.
If you have no experience with .NET it will be best to hire a developer to do the changes for you. 
Regards,
Iliyan Tanev
Nop-Templates Dev Team