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

#   Search cutsom field and order date in order listing on front-end

##

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 7 months ago [\#290489](#290489) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  *[Search cutsom field and order date in order listing on front-end](/forum/35-orders-management/894284-search-cutsom-field-and-order-date-in-order-listing-on-front-end#290489 "-- HikaShop version -- : 3.4.0 business -- Joomla version -- : 3.8.6 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)  Hi,  I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,  I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.  how can I do that ? I see nothing in the order/listing.php view that could help  Thanks")* was created by *[dylis](/forum/user/4744-dylis "View dylis's Profile")*

-- HikaShop version -- : 3.4.0 business
-- Joomla version -- : 3.8.6
-- PHP version -- : 7.1.14
-- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)

Hi,

I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,

I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.

how can I do that ? I see nothing in the order/listing.php view that could help

Thanks

- [ ![order-listing-search.PNG](/forum/attachment/43188) ](/forum/attachment/43188 "...ing-search.PNG") [ ](/forum/attachment/43188?download=1 "...ing-search.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDI4NC1zZWFyY2gtY3V0c29tLWZpZWxkLWFuZC1vcmRlci1kYXRlLWluLW9yZGVyLWxpc3Rpbmctb24tZnJvbnQtZW5kP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14290
-
-

8 years 7 months ago [\#290490](#290490) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Search cutsom field and order date in order listing on front-end](/forum/35-orders-management/894284-search-cutsom-field-and-order-date-in-order-listing-on-front-end#290490 "-- HikaShop version -- : 3.4.0 business -- Joomla version -- : 3.8.6 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)  Hi,  I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,  I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.  how can I do that ? I see nothing in the order/listing.php view that could help  Thanks")*

Hi,

You would have to modify that code: Code:

$searchMap = array( 'hk_order.order_id', 'hk_order.order_status', 'hk_order.order_number' ); $orderingAccept = array( 'hk_order.' ); $this-&gt;processFilters($filters, $order, $searchMap, $orderingAccept);

in the file components/com_hikashop/views/order/view.html.php

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

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 7 months ago [\#290508](#290508) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  Replied by *[dylis](/forum/user/4744-dylis "View dylis's Profile")* on topic *[Search cutsom field and order date in order listing on front-end](/forum/35-orders-management/894284-search-cutsom-field-and-order-date-in-order-listing-on-front-end#290508 "-- HikaShop version -- : 3.4.0 business -- Joomla version -- : 3.8.6 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)  Hi,  I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,  I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.  how can I do that ? I see nothing in the order/listing.php view that could help  Thanks")*

Perfect, it works, thanks

ps: are you aware that the search on hk_order.order_status doesnt work with translated websites ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDI4NC1zZWFyY2gtY3V0c29tLWZpZWxkLWFuZC1vcmRlci1kYXRlLWluLW9yZGVyLWxpc3Rpbmctb24tZnJvbnQtZW5kP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14290
-
-

8 years 7 months ago [\#290515](#290515) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Search cutsom field and order date in order listing on front-end](/forum/35-orders-management/894284-search-cutsom-field-and-order-date-in-order-listing-on-front-end#290515 "-- HikaShop version -- : 3.4.0 business -- Joomla version -- : 3.8.6 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)  Hi,  I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,  I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.  how can I do that ? I see nothing in the order/listing.php view that could help  Thanks")*

Hi,

It's normal because only the english value is storred in MySQL and it is then translated dynamically in PHP.
So to search through the orders with the order status isn't possible with a MySQL query.
Instead, it would be better to have a status filter dropdown, like there is in the backend.

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

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 7 months ago [\#290606](#290606) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  Replied by *[dylis](/forum/user/4744-dylis "View dylis's Profile")* on topic *[Search cutsom field and order date in order listing on front-end](/forum/35-orders-management/894284-search-cutsom-field-and-order-date-in-order-listing-on-front-end#290606 "-- HikaShop version -- : 3.4.0 business -- Joomla version -- : 3.8.6 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)  Hi,  I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,  I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.  how can I do that ? I see nothing in the order/listing.php view that could help  Thanks")*

Yes, but I mean, there is no mention in documentation that the search field doesnt work equally with translated versions of hikashop

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDI4NC1zZWFyY2gtY3V0c29tLWZpZWxkLWFuZC1vcmRlci1kYXRlLWluLW9yZGVyLWxpc3Rpbmctb24tZnJvbnQtZW5kP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14290
-
-

8 years 7 months ago [\#290647](#290647) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Search cutsom field and order date in order listing on front-end](/forum/35-orders-management/894284-search-cutsom-field-and-order-date-in-order-listing-on-front-end#290647 "-- HikaShop version -- : 3.4.0 business -- Joomla version -- : 3.8.6 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 59.0.2 (64 bits)  Hi,  I have created a custom field (custom reference - filed by user on checkout) that is displayed as a column on the order listing for the user in front-end,  I would like the search field to search also into that column (currently it seems to search only the order number column), and additionaly, into the order date column, so the user can search either a date, his custom reference or an order number.  how can I do that ? I see nothing in the order/listing.php view that could help  Thanks")*

Hi,

Well, first a search field isn't meant to search the name of the order statuses. It was added as an extra capability.
Second, we actually plan on redoing the order listing interface basing ourselves of the order listing interface of HikaMarket Multivendor. So when we do, we'll have the order status dropdown to fitler the orders and thus there will be no point to try to search statuses with the search box.
But thank you for your feedback.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDI4NC1zZWFyY2gtY3V0c29tLWZpZWxkLWFuZC1vcmRlci1kYXRlLWluLW9yZGVyLWxpc3Rpbmctb24tZnJvbnQtZW5kP3RtcGw9bWFya2Rvd24=) 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.070 seconds

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