- Posts: 58
- Thank you received: 0
How to display related categories?
14 years 4 months ago #50744
by debcampos
How to display related categories? was created by debcampos
How can i make the related categories to a product to show in that product page?
Please Log in or Create an account to join the conversation.
14 years 4 months ago #50785
by nicolas
Replied by nicolas on topic Re: How to display related categories?
There are no options for that actually. Here is a way though:
www.hikashop.com/en/forum/4-how-to/42759...duct-categories.html
www.hikashop.com/en/forum/4-how-to/42759...duct-categories.html
Please Log in or Create an account to join the conversation.
14 years 4 months ago - 14 years 4 months ago #50805
by debcampos
Replied by debcampos on topic Re: How to display related categories?
Thanks Nicolas, it worked!
Now is there anyway i could create a title saying " Related Categories" and the categories be linked to their categories URL? The title would be more important though...
I just wanted the product to show the other categories it is related to and user could click on those categories.
Now is there anyway i could create a title saying " Related Categories" and the categories be linked to their categories URL? The title would be more important though...
I just wanted the product to show the other categories it is related to and user could click on those categories.
Last edit: 14 years 4 months ago by debcampos.
Please Log in or Create an account to join the conversation.
14 years 4 months ago - 14 years 4 months ago #50861
by nicolas
Replied by nicolas on topic Re: How to display related categories?
For the title, you can add a line like that:
echo 'Related Categories</br>';
echo 'Related Categories</br>';
Last edit: 14 years 4 months ago by nicolas.
Please Log in or Create an account to join the conversation.
14 years 4 months ago #50864
by nicolas
Replied by nicolas on topic Re: How to display related categories?
Linking to the categories themselves is a bit more tricky though:
global $Itemid;
foreach($this->categories as $category){
$link = hikashop_completeLink('category&task=listing&cid='. $category->category_id.'&Itemid='.$Itemid);
echo '<a href="'.$link.'">'.$category->category_name.'</a><br/>';
}
global $Itemid;
foreach($this->categories as $category){
$link = hikashop_completeLink('category&task=listing&cid='. $category->category_id.'&Itemid='.$Itemid);
echo '<a href="'.$link.'">'.$category->category_name.'</a><br/>';
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.168 seconds