Jump to content

How To Search Orders By Product


Recommended Posts

Hi

 

I'm trying to search my order history by product purchased.

 

E.g I have 14 of a product called Buckhurst. In my orders section I want to just see these Orders and not all the others.

 

How do you do this?

 

Please let me know.

 

All the best

 

Kyle

Link to comment
Share on other sites

I fear you need a small search engine. Do you know php?
You should first add the search box in the history.tpl file, then plug some code in historycontroller to intercept the search submission.

Once you have the name handy, create a new method for the OrderHistory class, or create a new module if you prefer. call it by passing that name, and use a sql query to look for the name in the ps_order_detail tab

Then you only need the ids, and all data used by orderHistory to display the order list (just check it out)

Link to comment
Share on other sites

×
×
  • Create New...