- Posts: 33
- Thank you received: 0
Search cutsom field and order date in order listing on front-end
8 years 5 months ago #290489
by dylis
-- 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
-- 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
Please Log in or Create an account to join the conversation.
8 years 5 months ago #290490
by nicolas
Replied by nicolas on topic Search cutsom field and order date in order listing on front-end
Hi,
You would have to modify that code:
in the file components/com_hikashop/views/order/view.html.php
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->processFilters($filters, $order, $searchMap, $orderingAccept);
Please Log in or Create an account to join the conversation.
8 years 5 months ago #290508
by dylis
Replied by dylis on topic Search cutsom field and order date in order listing on front-end
Perfect, it works, thanks
ps: are you aware that the search on hk_order.order_status doesnt work with translated websites ?
ps: are you aware that the search on hk_order.order_status doesnt work with translated websites ?
Please Log in or Create an account to join the conversation.
8 years 5 months ago #290515
by nicolas
Replied by nicolas on topic Search cutsom field and order date in order listing on front-end
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.
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 or Create an account to join the conversation.
8 years 5 months ago #290606
by dylis
Replied by dylis on topic Search cutsom field and order date in order listing on front-end
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 or Create an account to join the conversation.
8 years 5 months ago #290647
by nicolas
Replied by nicolas on topic Search cutsom field and order date in order listing on front-end
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.
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 or Create an account to join the conversation.
Time to create page: 0.173 seconds