- Posts: 43
- Thank you received: 0
brand name link - how to control
9 years 1 month ago #277097
by apa2014
brand name link - how to control was created by apa2014
Hi ,
I have made at product listing menu item, i works well and looks good
I have a brand name with a link under each product.
But how can it be, that the fist and last iterms links to (Alias: hikashop-menu-for-module-342) but all other links to the right one - category/bandname
You can see it swebs.dk/api/index.php/women
Thanks in advanced
I have made at product listing menu item, i works well and looks good
I have a brand name with a link under each product.
But how can it be, that the fist and last iterms links to (Alias: hikashop-menu-for-module-342) but all other links to the right one - category/bandname
You can see it swebs.dk/api/index.php/women
Thanks in advanced
Please Log in or Create an account to join the conversation.
9 years 1 month ago #277102
by nicolas
Replied by nicolas on topic brand name link - how to control
Hi,
Check the "canonical URL" setting of these brands compared to the others. Something must be wrong there.
Check the "canonical URL" setting of these brands compared to the others. Something must be wrong there.
Please Log in or Create an account to join the conversation.
9 years 1 month ago - 9 years 1 month ago #277184
by apa2014
Replied by apa2014 on topic brand name link - how to control
Hi
Have looked at all brand, products and category for canonical URL´s and reagring to the DB all are emty.
If you look at the page you can see that the same brand have the correct links but the first and last product there have the wrong link are in the same brand were the link is correct.
Here is the code i have set in the listing_img_title.php
Regards
Have looked at all brand, products and category for canonical URL´s and reagring to the DB all are emty.
If you look at the page you can see that the same brand have the correct links but the first and last product there have the wrong link are in the same brand were the link is correct.
Here is the code i have set in the listing_img_title.php
Code:
<div class="brandinlist"> <?php
if($this->config->get('manufacturer_display', 1) && !empty($this->row->product_manufacturer_id)){
$categoryClass = hikashop_get('class.category');
$manufacturer = $categoryClass->get($this->row->product_manufacturer_id);
if($manufacturer->category_published){
$menuClass = hikashop_get('class.menus');
$Itemid = $menuClass->loadAMenuItemId('manufacturer','listing');
if(empty($Itemid)){
$Itemid = $menuClass->loadAMenuItemId('','');
}
$categoryClass->addAlias($manufacturer);
echo JText::_('').''.'<a href="'.hikashop_contentLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid,$manufacturer).'">'.$manufacturer->category_name.'</a>';
echo "<span style='display:none;' itemprop='Brand'>". $manufacturer->category_name ."</span>";
}
}?>
</div>
Regards
Last edit: 9 years 1 month ago by nicolas. Reason: code tags for better lisibility
Please Log in or Create an account to join the conversation.
9 years 1 month ago #277215
by nicolas
Replied by nicolas on topic brand name link - how to control
Hi,
Ok, if it doesn't come from the canonical URL, then I would recommend to change the code:
'&Itemid='.$Itemid
to:
'&Itemid=XXX'
where XXX is the menu item id of the "women" menu item.
That way, it will force the menu item alias for all the brands to be the same value.
Ok, if it doesn't come from the canonical URL, then I would recommend to change the code:
'&Itemid='.$Itemid
to:
'&Itemid=XXX'
where XXX is the menu item id of the "women" menu item.
That way, it will force the menu item alias for all the brands to be the same value.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #277229
by apa2014
Replied by apa2014 on topic brand name link - how to control
fgdgfdg Hi.
I can change it to the menu item ID, but what about other categories eg. MEN then i will show the worng category.
I have made some tests it is only the fist item in each load, tried to disable the Infinite scroll and now it only the fist one, and not the fist and the last one, however i you go to the next page it again the first one.
Have also tried to dis an enabled products and brands with no change.
have also tried to disable the menu item (Alias: hikashop-menu-for-module-342) and then i works, but then the links in module id 342 did worked.
But I can see that the first entry in module 342 and the first entry in the menu "women" are the same.
Module 342 is used to display brand images in a carousel. But here's the only the fist one that has the wrong link.
Menu item for category listing module 342 is set "Brands" as category
Then i tried to change the ordering in the menu item "Women" but no change still the fist post on each page there have the worng link.
Hope this information give a clue of a path for a solution.
Regards
I can change it to the menu item ID, but what about other categories eg. MEN then i will show the worng category.
I have made some tests it is only the fist item in each load, tried to disable the Infinite scroll and now it only the fist one, and not the fist and the last one, however i you go to the next page it again the first one.
Have also tried to dis an enabled products and brands with no change.
have also tried to disable the menu item (Alias: hikashop-menu-for-module-342) and then i works, but then the links in module id 342 did worked.
But I can see that the first entry in module 342 and the first entry in the menu "women" are the same.
Module 342 is used to display brand images in a carousel. But here's the only the fist one that has the wrong link.
Menu item for category listing module 342 is set "Brands" as category
Then i tried to change the ordering in the menu item "Women" but no change still the fist post on each page there have the worng link.
Hope this information give a clue of a path for a solution.
Regards
Please Log in or Create an account to join the conversation.
9 years 1 month ago #277232
by apa2014
Replied by apa2014 on topic brand name link - how to control
Hi
Just to be sure.
I have testet it on a standard joomla templte with a standard hikashop , and the issue is the same. the fist post link to menu item for module 342
Reagrds
Just to be sure.
I have testet it on a standard joomla templte with a standard hikashop , and the issue is the same. the fist post link to menu item for module 342
Reagrds
Please Log in or Create an account to join the conversation.
9 years 1 month ago #277231
by nicolas
Replied by nicolas on topic brand name link - how to control
Hi,
1. Indeed, in that case it will always be women.
In that case, you can write more complex code to change the id based on the category you're in.
2. We the code you're using, you're basically asking HikaShop to pick a HikaShop menu item randomly for the Itemid parameter.
So the first one it finds is "hikashop-menu-for-module-342". If you deactivate it, it will pick another one.
The best however is to create a specific menu item listing categories with the "main category" being the main brand entry under which all the brands are in your shop. That way, that menu item will be taken in priority over other random menu items of HikaShop.
And the alias will always be the one of that menu item. That's the best I think.
3. If the links of your module don't work after disabling that menu item, it simply means that this menu item is selected in the "menu item" setting of the module. So pick another one there.
4. You can also fill in the canonical URL of the brands and activate the "force canonical URLs on listings" setting to "use canonical if specified" in the HikaShop configuration so that it will use the URL you want, regardless of how you configured your menu items and modules.
1. Indeed, in that case it will always be women.
In that case, you can write more complex code to change the id based on the category you're in.
2. We the code you're using, you're basically asking HikaShop to pick a HikaShop menu item randomly for the Itemid parameter.
So the first one it finds is "hikashop-menu-for-module-342". If you deactivate it, it will pick another one.
The best however is to create a specific menu item listing categories with the "main category" being the main brand entry under which all the brands are in your shop. That way, that menu item will be taken in priority over other random menu items of HikaShop.
And the alias will always be the one of that menu item. That's the best I think.
3. If the links of your module don't work after disabling that menu item, it simply means that this menu item is selected in the "menu item" setting of the module. So pick another one there.
4. You can also fill in the canonical URL of the brands and activate the "force canonical URLs on listings" setting to "use canonical if specified" in the HikaShop configuration so that it will use the URL you want, regardless of how you configured your menu items and modules.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #277358
by apa2014
Replied by apa2014 on topic brand name link - how to control
Hi , i thnik i found a solution there can be used.
I disabled the 342 module - now all link to the same in product list menu item
For the module 342 i made at new menu item category listing
So new it all make (some:-) ) senece
How ever i stille have a huge Confusion rearging category links - i will post a new topic about that.
Thanks.
I disabled the 342 module - now all link to the same in product list menu item
For the module 342 i made at new menu item category listing
So new it all make (some:-) ) senece
How ever i stille have a huge Confusion rearging category links - i will post a new topic about that.
Thanks.
Please Log in or Create an account to join the conversation.
Time to create page: 0.223 seconds