- Posts: 5
- Thank you received: 0
Joomla Search Module display results from wrong menu
- littlewingz
-
Topic Author
- Offline
Less
More
8 years 9 months ago #286908
by littlewingz
Joomla Search Module display results from wrong menu was created by littlewingz
-- Joomla version -- : 3.7.4
Hi
I've been left and right, all over Google and different forums, and I can't seems to find a similar problem that describes the problem we're having.
Our website basically has 4 menus or "categories"
Menu_A: Home
Menu_B: Business
Menu_C: Telecom
Menu_D: EOL
- with sub-menus running off the 1st two menus only
The latter two were created to hold specific products, that was either moved from the 1st two menus or completely new.
The issue we are having is that when searching for a product, the url displayed in the results points to the wrong menu
Example, Product_A is listed under Menu_A, search results should display something like this:
www.mysite.com/Menu_A/Product_A
But ever since I've created Menu D, search results previously displaying as above has now changed to:
www.mysite.com/Menu_D/Product_A
I didn't move any products, but only created a new Menu from Joomla Menus
I'm not sure if this is a Joomla issue or a Hikashop issue as we use Hikashop to list all the products on our website.
If someone can point us in the right direction, all help is appreciated
Hi
I've been left and right, all over Google and different forums, and I can't seems to find a similar problem that describes the problem we're having.
Our website basically has 4 menus or "categories"
Menu_A: Home
Menu_B: Business
Menu_C: Telecom
Menu_D: EOL
- with sub-menus running off the 1st two menus only
The latter two were created to hold specific products, that was either moved from the 1st two menus or completely new.
The issue we are having is that when searching for a product, the url displayed in the results points to the wrong menu
Example, Product_A is listed under Menu_A, search results should display something like this:
www.mysite.com/Menu_A/Product_A
But ever since I've created Menu D, search results previously displaying as above has now changed to:
www.mysite.com/Menu_D/Product_A
I didn't move any products, but only created a new Menu from Joomla Menus
I'm not sure if this is a Joomla issue or a Hikashop issue as we use Hikashop to list all the products on our website.
If someone can point us in the right direction, all help is appreciated
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
8 years 9 months ago #286910
by Mohamed Thelji
Replied by Mohamed Thelji on topic Joomla Search Module display results from wrong menu
Hello,
If you want to force a specific menu when you search for a product using the "Joomla search module", the solution will be to directly set the "itemid" option of your "HikaShop products search plugin" to the ID of your menu.
Best regards,
Mohamed Thelji.
If you want to force a specific menu when you search for a product using the "Joomla search module", the solution will be to directly set the "itemid" option of your "HikaShop products search plugin" to the ID of your menu.
Best regards,
Mohamed Thelji.
Please Log in or Create an account to join the conversation.
- littlewingz
-
Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 0
8 years 9 months ago #287431
by littlewingz
Replied by littlewingz on topic Joomla Search Module display results from wrong menu
Hi Mohamed,
My problem is that products are spread over the 4 menus, so how do you set it that so it will search through the 4 menus?
I'm not clear on how "itemid" works...
Best Regards
Karen
My problem is that products are spread over the 4 menus, so how do you set it that so it will search through the 4 menus?
I'm not clear on how "itemid" works...
Best Regards
Karen
Please Log in or Create an account to join the conversation.
- littlewingz
-
Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 0
8 years 9 months ago #287436
by littlewingz
Replied by littlewingz on topic Joomla Search Module display results from wrong menu
Also, another thing I've noticed is
We have a product listed under both Menu_A and Menu_B,
When you search for it, only the listing under Menu_B shows up on the search result and nothing from Menu A.
Under Hikashop products, what we've done is listed both menu under the categories since you shouldn't need to create 2 of the same product codes for both menus...
IE, Categories: Menu_A / Menu_B
Canonical URLs were left blank by default for all products.
We have a product listed under both Menu_A and Menu_B,
When you search for it, only the listing under Menu_B shows up on the search result and nothing from Menu A.
Under Hikashop products, what we've done is listed both menu under the categories since you shouldn't need to create 2 of the same product codes for both menus...
IE, Categories: Menu_A / Menu_B
Canonical URLs were left blank by default for all products.
Please Log in or Create an account to join the conversation.
8 years 9 months ago #287434
by nicolas
Replied by nicolas on topic Joomla Search Module display results from wrong menu
Hi,
The issue is not really a Joomla or a HikaShop issue.
It stems from how the routing of URLs is done in Joomla.
When you generate a SEF URL, you need to add a Itemid parameter in the URL. That way, when the router get the URL to display the page later on, it knows which menu item to use.
There is no information in the products on which menu item is used to display it. You could configure many menu items to reach the same product page.
And the search plugin can guess which menu item to use, but it doesn't know which one YOU want it to use. So it has to pick one.
You can potentially select one menu item in the search plugin settings, but then all the product results will use that menu item.
So if you want that the results have the URL of a menu item different for different products there is only one solution left:
You need to activate the "force canonical URLs on listings" setting of the HikaShop configuration and configure a canonical URL in each product.
A canonical URL is the main URL you want the system to use. It's important for SEO so you should have it filled in regardless.
Note that the "force canonical URLs on listings" has the possibility to generate them for you. If you choose that, just browse your shop proudcts listings the way you want the URLs to be and they will be filled in.
Once filled, the search plugin will use the canonical URLs and thus you'll get the links you want.
The issue is not really a Joomla or a HikaShop issue.
It stems from how the routing of URLs is done in Joomla.
When you generate a SEF URL, you need to add a Itemid parameter in the URL. That way, when the router get the URL to display the page later on, it knows which menu item to use.
There is no information in the products on which menu item is used to display it. You could configure many menu items to reach the same product page.
And the search plugin can guess which menu item to use, but it doesn't know which one YOU want it to use. So it has to pick one.
You can potentially select one menu item in the search plugin settings, but then all the product results will use that menu item.
So if you want that the results have the URL of a menu item different for different products there is only one solution left:
You need to activate the "force canonical URLs on listings" setting of the HikaShop configuration and configure a canonical URL in each product.
A canonical URL is the main URL you want the system to use. It's important for SEO so you should have it filled in regardless.
Note that the "force canonical URLs on listings" has the possibility to generate them for you. If you choose that, just browse your shop proudcts listings the way you want the URLs to be and they will be filled in.
Once filled, the search plugin will use the canonical URLs and thus you'll get the links you want.
The following user(s) said Thank You: littlewingz
Please Log in or Create an account to join the conversation.
- littlewingz
-
Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 0
8 years 9 months ago #287924
by littlewingz
Replied by littlewingz on topic Joomla Search Module display results from wrong menu
HI Nicolas
Thank you for the reply,
Not totally clued up with all the technological explanation,
But from my understanding, we basically are assuming that the codes were set to smartly know which menu to look for.
Which obviously isn't the case as code don't just learn by themselves, but do as the code tells it to do :silly:
We have started to update all the canonical URL for our products,
Obviously it will take some time as we have over 300 odd individual products,
We didn't know to set canonical URL in the beginning, else it would have saved us a lot of time as it would have been done properly the first time when the products were created.
Thank you for the reply,
Not totally clued up with all the technological explanation,
But from my understanding, we basically are assuming that the codes were set to smartly know which menu to look for.
Which obviously isn't the case as code don't just learn by themselves, but do as the code tells it to do :silly:
We have started to update all the canonical URL for our products,
Obviously it will take some time as we have over 300 odd individual products,
We didn't know to set canonical URL in the beginning, else it would have saved us a lot of time as it would have been done properly the first time when the products were created.
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds