Joomla site search applying arbitrary menu item id to search result URLs

  • Posts: 11
  • Thank you received: 0
  • Hikashop Business
5 years 1 week ago #316247

-- url of the page with the problem -- : enconsafety.com/index.php?option=com_hik...9&Itemid=129&lang=en
-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.15
-- PHP version -- : 7.2.22
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : no error message, transitive problem

Hello,

The joomla site search on our site is applying a menu item id for hikashop categories, one that we didn't create (was created on install) and one that we don't care about. We have menu items for each of our relevant hikashop categories and I'd like the site search to pull these menu item ids so that I get my desired display.

Example
Top menu bar right side there's a search bar, type veratti. wait for the ajax to return search results in a drop down. Select veratti tango.

This is the page that displays:
enconsafety.com/index.php?option=com_hik...9&Itemid=129&lang=en

If we could control this menu item id in the URL we could make the page layout look like this: enconsafety.com/index.php?option=com_hik...g&Itemid=187&lang=en

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
5 years 1 week ago #316250

Hi,

If you edit the settings of the HikaShop Categories/Products search plugins via the Joomla plugins manager, you'll see a "itemid" setting where you can enter the id of the menu item you want for the results displayed by the Joomla search that the plugin founds.
Now this means that all the categories will get the same item id.
If you want a different one for each category, then you would have to make sure you filled in the "canonical URL" of your categories with the URL you want for each one, and then you can activate the "force canonical URL on listings" setting of the HikaShop configuration. In that case, the search results will use the canonical URL of the categories/products instead of generating one.

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

Time to create page: 0.034 seconds
Powered by Kunena Forum