How to display related categories?

  • Posts: 58
  • Thank you received: 0
12 years 6 months ago #50744

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.

  • Posts: 82821
  • Thank you received: 13368
  • MODERATOR
12 years 6 months ago #50785

There are no options for that actually. Here is a way though:
www.hikashop.com/en/forum/4-how-to/42759...duct-categories.html

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

  • Posts: 58
  • Thank you received: 0
12 years 6 months ago #50805

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.

Last edit: 12 years 6 months ago by debcampos.

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

  • Posts: 82821
  • Thank you received: 13368
  • MODERATOR
12 years 5 months ago #50861

For the title, you can add a line like that:
echo 'Related Categories</br>';

Last edit: 12 years 5 months ago by nicolas.

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

  • Posts: 82821
  • Thank you received: 13368
  • MODERATOR
12 years 5 months ago #50864

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/>';
}

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

Time to create page: 0.051 seconds
Powered by Kunena Forum