Search filter exact words, but multiple

  • Posts: 30
  • Thank you received: 1
3 years 5 months ago #326020

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.22

HI,

I would like a search filter for exact words, but with 1 product there may be several.
I've tried multiple searches and created a new field but can't get this working.

As an example.
For product A you should be able to search on 123 and 123587, but they must enter this exactly. If they search at 12, nothing should come up.

How can I set this up?

Kind regards,
Matthijs

Please Log in or Create an account to join the conversation.

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
3 years 5 months ago #326033

Hi,

I'm not clear on your situation or on what you need to do so I can't say for sure what is the exact solution.
So, I will present what is available. To search text on products, you have two ways to go about it:
1. You use the Joomla search module and the HikaShop products search plugin. If you have the "Use Search Options" setting of the search component of Joomla activated, after you do the search via the module, you will see the results page with add the top options to tell the search system if it should be exact terms or not etc.
2. You use the HikaShop filter module, and create a "text" filter via the menu Display>Filters of HikaShop. In the settings of the filter, you'll find the option "Search processing" that you can configure to "exact" or "any word" or "every word".

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 1
3 years 5 months ago #326036

HI,

This is the situation:
We sell individual parts for grabs.
Parts are related to particular grabs with serial numbers.
When a customer searches by his serial number, the correct part must come up. However, a part is available for multiple serial numbers.
The serial numbers must not be visible in the front end, and the customer must enter exactly the correct serial number.
Which field could I use to enter multiple serial numbers for a separate part so that the customer can search there but that it is not visible in the frontend.

I have created a new field and set a search function on it, but how can I separate serial numbers so that they can be searched exactly?
Example: part 001 is available for the gripper with serial numbers 1235 and 1256.

Kind regards,
Matthijs

Please Log in or Create an account to join the conversation.

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
3 years 5 months ago #326043

Hi,

I would recommend to indeed create a custom product field of the type "text" so that you can enter the serials of a product in that custom field on the product edit interface of that product.
I would simply write them all in the field separated by a space.
Then, be it in the filter you created for your search in the Display>Filters menu, or in the settings of the HikaShop products search plugin, you'll find a setting to select the columns on which the search will be done and you can just select the column of that custom field in there.
Then, if you enter 1235 or 1256 in the search input field, you should be able to get the part 001 product as a result.

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 1
3 years 5 months ago #326232

HI,

But the problem is, if the search is set to exact, it doesn't work because it returns the text with space and the following text. With all other options, just part of the keyword is enough. Then you can search for part of the search text.
It must be exact but multiple words / serial numbers and separating them with a space does not work.

Kind regards,
Matthijs

Please Log in or Create an account to join the conversation.

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
3 years 5 months ago #326269

Hi,

I'm sorry but I don't understand what you mean. Could you provide some examples to illustrate why the exact mode is not ok for you, and why the other modes are not ok for you and how you want it to behave?

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 1
3 years 4 months ago #327202

HI

Sorry for the delay.

In the attachment the screenshots.
The first one shows the filter
The second one shows a producht with the filter filled in. We need to search on 123 and 456, those are both serialnumbers.
The third screenshots shows that the serialnumer 123 can't be found.

Greetz

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
3 years 4 months ago #327209

Hi,

Ok, now I understand that the "exact" mode on one field can't work for what you want.
If you select another mode, like "any word", then if you search for 123, you'll get your result as expected.
But rereading this thread from the beginning, I understand that the other modes won't work since you want the results to appear only when the full serial number is entered.

An alternative I can see is to create 10 or 20 custom product fields (serial 1, serial 2, serial 3, etc). Basically, for as many serials a product can have as possible.
Then, select all these custom fields in your filter, and in each product, enter only one serial for each custom field. That way, you can keep using the "exact" mode and it will meet both of your requirements.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum