[Skip to main content](#vessel-content)

#   Order Dashboard - Add Custom Field as a Column

##

- **[inform](/forum/user/31595-inform "View inform's Profile")**
- [![inform's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31595-inform "View inform's Profile") Topic Author
- [ Offline](/forum/user/31595-inform)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#155470](#155470) by [inform](/forum/user/31595-inform "View inform's Profile")  *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155470 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")* was created by *[inform](/forum/user/31595-inform "View inform's Profile")*

-- url of the page with the problem -- : N/A
-- HikaShop version -- : HikaShop Essential: 2.3.0
-- Joomla version -- : 2.5.17
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Chrome 34.0.1847.116
-- Error-message(debug-mod must be tuned on) -- : N/A

I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.

How can I go about adding another column to this dashboard view? Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[inform](/forum/user/31595-inform "View inform's Profile")**
- [![inform's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31595-inform "View inform's Profile") Topic Author
- [ Offline](/forum/user/31595-inform)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#155481](#155481) by [inform](/forum/user/31595-inform "View inform's Profile")  Replied by *[inform](/forum/user/31595-inform "View inform's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155481 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

Update. I found the correct view and I've been able to create the additional columns that I needed, but I'm not able to filter by these columns.

All of the columns that I'm looking to filter by are part of the address table if that is information that you'll need. Thanks again!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

12 years 5 months ago [\#155503](#155503) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155503 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

Hi,

The query which loads the order data on the orders listing doesn't load the address data, so in order to have a filter on it, you would first have to change that query to add a left join to the address table in it.
Then you can have the filter add a condition to the query based on the selected value.
That cannot be done in a view, but you need to add your custom code directly in the function listing of the file administrator/components/com_hikashop/views/order/view.html.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[inform](/forum/user/31595-inform "View inform's Profile")**
- [![inform's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31595-inform "View inform's Profile") Topic Author
- [ Offline](/forum/user/31595-inform)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#155607](#155607) by [inform](/forum/user/31595-inform "View inform's Profile")  Replied by *[inform](/forum/user/31595-inform "View inform's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155607 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

Thank you for the information. I came across this information in a previous post ([ www.hikashop.com/forum/4-how-to/53045-ad...-backend.html#120731](http://www.hikashop.com/forum/4-how-to/53045-add-a-column-to-sales-view-in-backend.html#120731)) and I'm trying to alter it to fit my needs. Can you possibly tell me where I'm going wrong?

I'm attempting to left join the address table and then grab these three values to filter on: address_lastname. address_firstname, remotesupportpassword. Again, any help you can offer is greatly appreciated.

From previous forum post:
"Ok so in your case, you can edit the file: "yourSite/administrator/components/com_hikashop/views/order/view.html.php

And add the line:

$tables = ' INNER JOIN '.hikashop\_table('address').' AS d LEFT JOIN; (altered by me)

Just before:

$query = ' FROM '.hikashop\_table('order').' AS b LEFT JOIN '.hikashop\_table('user').' AS a ON b.order\_user\_id=a.user\_id LEFT JOIN '.hikashop\_table('users',false).' AS c ON a.user\_cms\_id=c.id '.$tables.$filters.$order;

Oh I forgot one thing, , you need to add ",d.*" like this:

$database-&gt;setQuery('SELECT a.\*,b.\*,c.\*,d.\*'.$query,(int)$pageInfo-&gt;limit-&gt;start,(int)$pageInfo-&gt;limit-&gt;value);
in the file: "yourSite/administrator/components/com\_hikashop/views/order/view.html.php and in the function listing().

Add "d.order_product_code" in the searchmap:

$searchMap = array('c.id','c.username','c.name','a.user\_email','b.order\_user\_id','b.order\_id','b.order\_full\_price','d.address\_lastname','d.address\_firstname','d.remotesupportpassword'); (altered by me)

And then you can filter by product code in the filter field on the left."

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 5 months ago [\#155670](#155670) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155670 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

Hi,

You can see if your query is correct or not by putting a Code:

var_dump($query);

after: Code:

$query = ' FROM '.hikashop_table('order').' AS b LEFT JOIN '.hikashop_table('user').' AS a ON b.order_user_id=a.user_id LEFT JOIN '.hikashop_table('users',false).' AS c ON a.user_cms_id=c.id '.$tables.$filters.$order;

That will show you the request, and then you can see if it's a valid one or not.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[inform](/forum/user/31595-inform "View inform's Profile")**
- [![inform's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31595-inform "View inform's Profile") Topic Author
- [ Offline](/forum/user/31595-inform)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#155772](#155772) by [inform](/forum/user/31595-inform "View inform's Profile")  Replied by *[inform](/forum/user/31595-inform "View inform's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155772 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

I really don't know enough to be dangerous. Can you offer any assistance with adding this left join and the filter?

Thanks a lot!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

12 years 5 months ago [\#155914](#155914) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155914 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

Please turn on the debug mode option of the joomla configuration and report any error that you have with the orders listing after you applied your changes and also please provide a screenshot of the different changes that you made so that we can check them and know exactly what is your situation.
Then, we can tell you what you're missing.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[inform](/forum/user/31595-inform "View inform's Profile")**
- [![inform's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31595-inform "View inform's Profile") Topic Author
- [ Offline](/forum/user/31595-inform)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#155938](#155938) by [inform](/forum/user/31595-inform "View inform's Profile")  Replied by *[inform](/forum/user/31595-inform "View inform's Profile")* on topic *[Order Dashboard - Add Custom Field as a Column](/forum/35-orders-management/868089-order-dashboard-add-custom-field-as-a-column#155938 "-- url of the page with the problem -- : N/A -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 2.5.17 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Chrome 34.0.1847.116 -- Error-message(debug-mod must be tuned on) -- : N/A  I have a custom field that I'd like to be visible from the orders dashboard page in the backend. The reason is that I would like to be able to use the search field to filter by this custom field and find specific orders.  How can I go about adding another column to this dashboard view? Thanks!")*

Okay, give me some time and I'll get this to you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODA4OS1vcmRlci1kYXNoYm9hcmQtYWRkLWN1c3RvbS1maWVsZC1hcy1hLWNvbHVtbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.322 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
