Skip to main content

The routing for brand list pages fails in the product detail

More
5 months 4 days ago #371604 by E. van Doorne
-- HikaShop version -- : 6.4.1
-- 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.

More
5 months 4 days ago #371609 by nicolas
Hello,

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.
The following user(s) said Thank You: E. van Doorne

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

More
5 months 2 days ago #371646 by E. van Doorne
I have downloaded the 6.4.1 installer, but when saving our brand menu item, the `param` column does not have a 'content_type' defined or filled. I have downloaded the 6.4.1 installer from my account -> my subscriptions -> hikashop multisites -> latest stable version. Do i need to use a different installer?

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

More
5 months 1 day ago #371647 by nicolas
Hi,

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.

More
4 months 4 weeks ago #371680 by E. van Doorne
We actually already have such menu items in place, both for the main "Brands' category as well as for numerous individual brands. Yet the brand redirects from the individual product's pages do not work and route incorrectly to the first me menu item.

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

More
4 months 4 weeks ago #371682 by nicolas
Hi,

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.

More
4 months 1 week ago #371883 by nicolas
Hi,

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.

More
4 months 1 week ago - 4 months 1 week ago #371889 by E. van Doorne
Hello Nicolas, thank you for taking the time to sort this out. If I go to a number of existing individual Product pages on our website, the Brand name stil links to the wrong url. Some other Product pages now give a Brand url that is basically correct, but the brand name gets repeated twice in the url (eg. mydomain.com/brands/brand-name/brand-name/ )

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?
Last edit: 4 months 1 week ago by E. van Doorne.

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

More
4 months 1 week ago #371890 by nicolas
Mmm. It worked fine on the one product I tested on your website.
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.

More
4 months 4 days ago #371996 by E. van Doorne
I have posted example url's via the contact form

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

More
4 months 3 days ago #372001 by nicolas
Hi,

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.

More
4 months 3 days ago #372006 by E. van Doorne
Hi Nicolas, thanks for the swift action. The patch almost solves it, but not entirely I'm afraid. It appears it works well for products from a brand where a dedicated page with all products from that brand is created. Bur for products from a brand for which no 'brand page' is created, the routing is now different and still not entirely correct. I'll post url's in the contact form.

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

More
4 months 3 days ago #372007 by nicolas
Hi,

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.

More
4 months 3 days ago #372011 by E. van Doorne
Hello Nicolas, I downloaded and installed the 6.4.1 Multisites version from the website just now and installed it. I'm sorry to day I see no difference in behavior. Details in contact e-mail.

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

More
4 months 2 days ago #372016 by nicolas
Hi,

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.

More
3 months 4 weeks ago #372066 by E. van Doorne
Many thanks for this new patch. This has solved the issue.
The following user(s) said Thank You: nicolas

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

Time to create page: 0.365 seconds
Powered by Kunena Forum