Search by variant

  • Posts: 1027
  • Thank you received: 11
  • Hikashop Business
1 year 1 week ago #350789

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 3.10.11

Hello,

Is it possible to search a product by variant code?
I enabled the "Search variants" in HikaShop products search plugin but still doesn't work.

Thank you

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

  • Posts: 81480
  • Thank you received: 13062
  • MODERATOR
1 year 1 week ago #350798

Hi,

The HikaShop products search plugin integrates with the Joomla search system. I looked at your website but I don't see the Joomla search. I see that you're using the HikaShop filter module as search, along with a text filter.
The filtering system in HikaShop doesn't look into variants data, only products.
So it's not possible with what you've setup.
You could switch to the Joomla search system, however, you'll face two problems:
- the Joomla search system is removed in Joomla 4, so even if you switch to it, with Joomla 3 support by the Joomla project ending soon, that's not a long term solution
- the results screen of the Joomla search system is quite crude since it can search in Joomla articles, etc. It's just a link, the product name, and the beginning of the description for each product listed as result. So it would require heavy customization of the results view of the Joomla search to make it look nice.

I think a simpler solution would be to create a custom field of the table "product" and of the type "textarea", where you would enter all the variant codes of the product separated by spaces. Then, select that custom field in the text filter and you'll be able to search for the variant codes.
Then, you could potentially create a periodic mass action with some PHP code to automatically generate the codes and automatically fill the custom field for you.

The following user(s) said Thank You: verzevoul

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

Time to create page: 0.057 seconds
Powered by Kunena Forum