I need to change a invoice format

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I need to change a invoice format for example

From,                               TO,
                                               CUSTOMER ADDRESS
VENDOR ADDRESS

So please help as soon as possible

thanks & regards
sankarganesh
7 years ago
Please confirm are you referring to invoice pdf.
7 years ago
Modify 'PrintOrdersToPdf' function in \Libraries\Nop.Services\Common\PdfService.cs file
7 years ago
Thanks for your reply.

Then how to call a vendor address under pdf
7 years ago
There is any possibilities to change the invoice format in this type


From (address) is Vendor address and To (address) is Customer address
7 years ago
I would like to ask few questions here,

1. Order could contain products from Multiple vendors, Would you like to add address of all the vendors?
2. Vendor Address is optional, what you what to do if the vendor address does not exists?
7 years ago
In 'PrintOrdersToPdf' function of \Libraries\Nop.Services\Common\PdfService.cs file under address section get vendor address using VendorId, If vendor Id is not provided you could get vendor Id from order Items.
Once you have Vendor Id you could get vendor information and vendor address using below code.
var vendor = _vendorService.GetVendorById(vendorId);
                if (vendor != null && !vendor.Deleted && vendor.Active)
                {
                    var vendorAddress = _addressService.GetAddressById(vendor.AddressId);
                }
Code sample for adding address in pdf is available in 'PrintOrdersToPdf' function.
6 years ago
I have not used this plugin, but may be it suits your requirement
https://www.nopcommerce.com/p/1937/simple-pdf-invoice.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.