Add a New Column to Order Listing Admin End From Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
I want to add a new column under orders listing grid on admin end from plugin.
NOPCOMMERCE VERSION 4.1
4 years ago
You cannot modify core domain entity classes from plugins.

But you can do that in different way. Add a custom table with OrderId and CustomColumn columns. Implement OnPlaceaorder event consumer and write your code to insert data in that custom table.

While displaying in admin panel, use join query between Order table and that custom one.
4 years ago
I have achieved this using action filter also through my custom plugin.
Thanks for your reply.
4 years ago
How you do this task using filter can you plzz expalin i am also facing same problem
4 years ago
Rather than post the exact same question, I figured I'd first ask here for some clarification since I'd like to know how this is done without modifying the source code (which is what I'm about to do).

I'm working with NOP version 3.9

I'm wanting to add a column to the orders list with some data that I have stored in a custom table (along with a related filter to the top filters area).  I've got everything in place to do it from a data's perspective.  The only remaining task is to figure out the best way to implement the update to the orders listing.

I'd much prefer to not modify the source code within the admin module, but I've not had any luck getting a copy of the order list to show.  My route changes seemed to have worked (where I can get the list action to fire in my local controller), but I'm assuming that this is a little trickier than other view overrides since it's an admin view, and also seems to have a matrix of other related files required at the controller level (meaning it's not as simple as making copies of the order list's view, controller and model into your local plugin's folders and assigning the route to override the order list view to the local copy).  It looks as if a model is passed at the last step to show the listing (versus calling the view directly), which is where I seem to be having issues.

Can someone try to help us out by posting some simple, easy to follow instructions on how to override the order list view in the admin section with a customized version that would be stored in a plugin?

I'm more than willing to help answer questions from someone that may be willing to help us get a solution posted that others may be able to use in the future.

It'll be easy to modify the source code - but I'd like to not do so if there's an easy way to accomplish this.  I've yet to figure it out, and frankly, have spent way more time trying to get it to work from the plugin's perspective than it would have taken to simply modify the source object directly.

Thanks for any replies in advance....
Troy
4 years ago
mhsjaber wrote:
You cannot modify core domain entity classes from plugins.

But you can do that in different way. Add a custom table with OrderId and CustomColumn columns. Implement OnPlaceaorder event consumer and write your code to insert data in that custom table.

While displaying in admin panel, use join query between Order table and that custom one.


So, for clarification purposes, are you saying that we cant do this (override the order list view in the admin section) from a plugin?

Thanks for any response in advance.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.