Jump to content

Code For Product's Category To Display On Product Description


Rizzzle

Recommended Posts

Hello developers,

I'd like to display a link to the product's category, on front office product description. Like the breadcrumb but on a different place.

What would be the (php?) code to link to a product's category?

Kind regards,

R

Link to comment
Share on other sites

4 minutes ago, ndiaga said:

Hi,

It  is   not  a  php   code  but  tpl    code.

The  link  to  category  page  is  like  this  in  category  page

{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}

But  in  the  home  page  that  code  won't  work.

 

 

Hi,

Thank you for the the super quick reply.

Would that go in the anchor html tag?

Thank you

 

Link to comment
Share on other sites

2 hours ago, ndiaga said:

Yes,

You  use  it  link  this  :


<a  href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}"  > {$category->name} </a>

 

Amazing. Thank you so much!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...