Hi,
You code is fine.
HEre is the way the URL is generated :
- if the "force canonical URLs on listing" setting is activated in your HikaShop configuration, then HikaShop will use the URL that you have configured in the "canonical URL" of the brand.
- If it's not activated, then the URL will be generated dynamically, using the first menu item of the type "category listing" configured to display a brands listing, and if not, another randomly selected menu item of one of the types of HikaShop.
So what you describe probably means that you have the "force canonical URLs on listing" setting activated and that you entered a URL you don't want in there for the second brand there.
An alternative could be to use:
hikashop_completeLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid=XX')
instead of:
hikashop_contentLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid,$manufacturer)
where XX is the id of the menu item you want the link to use (supposing that you don't want a different one for each brand).
That way, you will force the system to generate a URL with the menu item of your choosing. However, if you have a wrong canonical URL in your brands, that wrong URL will still be the one indexed by search engines. So I would rather recommend fixing the canonical URL. It will be better for your SEO too.