- Posts: 22
- Thank you received: 1
The routing for brand list pages fails in the product detail
- E. van Doorne
-
Topic Author
- Offline
-- Joomla version -- : 5.4.5
-- PHP version -- : 8.3.21
-- Browser(s) name and version -- : Firefox 149.0.2
-- Error-message(debug-mod must be tuned on) -- : Routing for Brand list page failes in product detail view
On the product details page, the block 'show_dimensions' renders a link to the 'brand page', but it always routes to the first menu item.
This code calls the hikashopMenuClass (/administrator/components/com_hikashop/classes/menus.php) and tries to search for a menu item that has the key 'content_type' and value 'manufacturer'. No matter what i try i can't manage to create a menu item with those params.
After the code can't find a menu item it returns the first menu item in the list.
Please Log in or Create an account to join the conversation.
Thanks for the detailed report. You identified correctly where the problem was: the menu-item lookup in hikashopMenuClass is matching manufacturer-listing menus too narrowly. Specifically, it is comparing the menu's selected category against a single category id picked by a SELECT with no LIMIT or ORDER BY, so a category-listing menu pointing to a brand other than the one that row happens to return is not recognised as a manufacturer listing, and the fallback then returns an unrelated menu item.
We have broadened the lookup so that any category-listing menu whose selected category has category_type=manufacturer is now accepted, in addition to menus that explicitly carry content_type=manufacturer in their params. The change is in the 6.4.1 branch. Please download the latest 6.4.1 build from your member area on our website and install it over your current installation. After the update your brand link should route through your intended manufacturer-listing menu instead of the first available HikaShop menu.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Please Log in or Create an account to join the conversation.
No. It doesn't need it. You can use a categories / products listing menu item with the "main category" setting set to the main "brand" category, or a brand.
The system will now automatically look for a menu item matching with the brand, or with a menu item matching with the main brand category.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Since we're not able to reproduce the issue anymore, please provide a backend access and a FTP access so that we can look into the situation on your website directly. Maybe there's a corner case that isn't handled properly.
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Thank you for the access. I was able to reproduce the issue and made another patch for it. We've added it on your website and confirm it now works as expected there. We've also included the patch on our end. So, for anyone else with the issue, download again the install package of HikaShop on our website and install it on yours to get the patch.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Do I need to recreate those url's in some way, or is there anything else I need to do in order to make the fix work for existing products/brands and have uniform Brand urls?
Please Log in or Create an account to join the conversation.
Please provide URLs of the products with the 2 issues.
You can go through our contact form if necessary.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Thanks for the URLs. I was able to understand the situation, reproduce the issue on my end and make some patch to fix that.
Download again the install package of HikaShop and install it on yours.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Thank you for the extra details. I've made a new patch for this. Please try again. It should be good now.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Thanks. I've made a new patch for this. Please try again. It should be good now.
Please Log in or Create an account to join the conversation.
- E. van Doorne
-
Topic Author
- Offline
- Posts: 22
- Thank you received: 1
Please Log in or Create an account to join the conversation.