Jump to content

What coding to show my default category in anywhere?


Recommended Posts

Hi Mastah..

 

As my title topic, i want to show my default category in my product.tpl

 

i know where to place it, but idk what coding to appear link of my default category, can you guys here tell me

 

also i add some picture to give an example

 

1-sample.jpg

 

Thanks for any help :)

Link to comment
Share on other sites

Hi Nemo, thanks for the answer

but it hasn't answer my question yet.. i need the fix coding to show my default category,

 

for example i got this code in other related topic :

 

{if isset($product.id_category_default)}
{assign var='catname' value=Category::getCategoryInformations(array($product.id_category_default))}
{$catname[$product.id_category_default].name}
{/if}

 

ill try and the result its error haha

 

or i found this code 

 

<span style="font-size:10px;">

    {foreach from=Product::getProductCategoriesFull($product.id_product) item=cat}
        <a href="{$link->getCategoryLink({$cat.id_category})}" title="{$cat.name}">{$cat.name}</a>,
    {/foreach}
</span>
 
the result its perfect but its appear all selected category not only the default category, i want only appear the default category.
pls i need advice
 
thanks
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...