Add fields in order export

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 лет назад
Hello ,

I want to add a vendor name field and an IBAN number when exporting orders to Excel,
How can I do that?

Thank you ,
6 лет назад
It would require customization.  Or, search the marketplace for 'export'; maybe there is a plugin that can do it.
Where is your IBAN Number?  Is that a custom attribute of vendor?  (Even a marketplace plugin may not support that)
6 лет назад
msfatima wrote:
Hello ,

I want to add a vendor name field and an IBAN number when exporting orders to Excel,
How can I do that?

Thank you ,


Its not support out of the box. You must need to customize in your site.

PM me if require help from us

Thanks,
Jatin
6 лет назад
New York wrote:
It would require customization.  Or, search the marketplace for 'export'; maybe there is a plugin that can do it.
Where is your IBAN Number?  Is that a custom attribute of vendor?  (Even a marketplace plugin may not support that)


IBAN Number yes it's a custom attribute for the vendor .

Yes I know it requires customization but how? Is it in Libraries\Nop.Services\ExportImport ?
6 лет назад
msfatima wrote:
... Is it in Libraries\Nop.Services\ExportImport ?


Yes, it is. You must make changes in the ExportOrdersToXlsx method int the ExportManager class.
6 лет назад
like that

new PropertyByName<Customer>("VendorId", p => p.VendorId),

Is there is anything else to do ?

Thank you
6 лет назад
Yes, you're right, that's all what you need to do
3 года назад
I want ExportOrdersToXlsx contains Product Name.
I'm trying to add a new field "Product Name" to \Nop430\Libraries\Nop.Services\ExportImport\ExportManager.cs

However, I encounter an error.
Here is the screenshot
https://sendfile.cc/uploads/file/202007/0.829328001596252956.png

Can anyone please help?

Thanks
3 года назад
You can not do it that way
There is a setting where it will export the products within the orders in the following format
Order 1
     Product 1
     Product 2
Order 2
     Product 2
     Product 4
Order 3
     Product 1
     Product 3

See Configuration > Setting > Order Settings
yourwebsite/Admin/Setting/Order
Export orders with products - set to true

Otherwise if you just want the product name you would need to loop through each OrderItem and get the Product Name then write the record to excel
See the code that is in
ExportOrdersToXlsx(IList<Order> orders)
and ExportOrderToXlsxWithProducts(...)
3 года назад
Yidna wrote:


See Configuration > Setting > Order Settings
yourwebsite/Admin/Setting/Order
Export orders with products - set to true



Thank you for the reply.
I don't see an export to excel option in Configuration > Setting > Order Settings .
Also, I cannot find "Export orders with products - set to true "
Please advise.

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.