[Skip to main content](#vessel-content)

#   category in product page

##

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago -  13 years 11 months ago [\#76497](#76497) by [gili](/forum/user/6876-gili "View gili's Profile")  *[category in product page](/forum/4-how-to/75787-category-in-product-page#76497 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")* was created by *[gili](/forum/user/6876-gili "View gili's Profile")*

hello

i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread Code:

&lt;?php if(!empty($this-&gt;element-&gt;product_manufacturer_id)){ ?&gt; &lt;tr class="hikashop_product_custom_&lt;?php echo $oneExtraField-&gt;field_namekey;?&gt;_line"&gt; &lt;td class="key"&gt; &lt;span id="hikashop_product_custom_name_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_name"&gt; Εκδόσεις &lt;/span&gt; &lt;/td&gt; &lt;td&gt; &lt;span id="hikashop_product_custom_value_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_value"&gt; &lt;?php $class = hikashop_get('class.category'); $manufacturer = $class-&gt;get($this-&gt;element-&gt;product_manufacturer_id); global $Itemid; $app =&amp; JFactory::getApplication(); echo '&lt;a href="'.hikashop_completeLink('category&amp;task=listing&amp;cid='.$manufacturer-&gt;category_id.'&amp;name='.$app-&gt;stringURLSafe($manufacturer-&gt;category_name).'&amp;Itemid=289').'"&gt;'.$manufacturer-&gt;category_name.'&lt;/a&gt;'; ?&gt; &lt;br /&gt; &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt;

Now what i want is your help to modify this code to make it show one subcategory assigned to the product
To the product i have assigned 2 categories like this : main category-category_A main category-category_B-subcategory
so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page

the final look of my product page should be like this:

-title
-image

-CATEGORY(linkable)

-price
-extra fields
etc etc

thanx

Last edit: 13 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#76598](#76598) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#76598 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

I think that you can try something like that: Code:

&lt;?php var_dump(hikashop_currentURL()); $productClass = hikashop_get('class.product'); $categories = $productClass-&gt;getCategories($this-&gt;element-&gt;product_id); $categoryClass = hikashop_get('class.category'); $url = ''; //set here the url of your website + menu name + category foreach($categories as $category){ $categoryInfo = $categoryClass-&gt;get($category,true); echo "&lt;a href='".$url.$categoryInfo-&gt;category_name."'&gt;".$categoryInfo-&gt;category_name."&lt;/a&gt;"; } ?&gt;

in the view "product / show_default".

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#76731](#76731) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#76731 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

$url = ''; //set here the url of your website + menu name + category
for example... [ www.ubook.gr/](http://www.ubook.gr/)???????????? what is the menu name and category ????????

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#76882](#76882) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#76882 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

Try this: Code:

&lt;?php $url = JURI::base(true)."/index.php?option=com_hikashop&amp;ctrl=category&amp;task=listing"; $productClass = hikashop_get('class.product'); $categories = $productClass-&gt;getCategories($this-&gt;element-&gt;product_id); $categoryClass = hikashop_get('class.category'); foreach($categories as $category){ $categoryInfo = $categoryClass-&gt;get($category,true); $cid=''; $name=''; if(isset($categoryInfo-&gt;category_id) &amp;&amp; !empty($categoryInfo-&gt;category_id)){ $cid = "&amp;cid=".$categoryInfo-&gt;category_id; $name = str_replace(' ','-',strtolower($categoryInfo-&gt;category_name)); $name = "&amp;name=".$name; } $item_id = ''; global $Itemid; if(isset($Itemid) &amp;&amp; !empty($Itemid)) $item_id = "&amp;Itemid=".$Itemid; echo "&lt;a href='".$url.$cid.$name.$item_id."'&gt;".$categoryInfo-&gt;category_name."&lt;/a&gt;"; } ?&gt;

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#77027](#77027) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#77027 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

hello
thats perfect thank you !!!!
to refine it a little and get exactly what i want !! :
imagine we have the root directory with categories... in there there are : BIG_CAT_A and BIG_CAT_B
each of them has its own sub cats .. i d like that script in (2 parts??) to take BIG_CAT_A and show it with other attributes e.g. subcategories and products contained
and take BIG_CAT_B and show its subcategories only with other attributes e.g. just the description of the subcategories
![:D](/bigsmile.gif ":D") ![:D](/bigsmile.gif ":D") ![:D](/bigsmile.gif ":D")
i hope u understand !!!!
big thanx

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#77246](#77246) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#77246 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

Can you make a screenshot of want you want ?
I understand in the big parts but I don't see it clearly.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#77760](#77760) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#77760 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

hello
screenshot is difficult
the general result is a bookstore that i want the writter to be clickable and show the details of each writer even if i have one or... three writers
and to show ofcourse the category of the book clickable again and when you click it to show all the books of that category
so i thought to make the writters as categories in a general big category (after root) called e.g. WRITTERS and in there to have all the writers and in each product to assign 1-2-3 or as many writers are for the book
and a second big category called e.g. CATEGORIES containing all the categories of the books . SO in the script i could assign manually the id of the big categories and tell to take the first and show this this bla bla and take the second and do the same ...or just hide it (if i dont want to show the categories)
!!!!
any questions ??????? hehhe
thanks ![:D](/bigsmile.gif ":D")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago -  13 years 11 months ago [\#77773](#77773) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#77773 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

I think that what you need is something like that: Code:

&lt;?php $url = JURI::base(true)."/index.php?option=com_hikashop&amp;ctrl=category&amp;task=listing"; $productClass = hikashop_get('class.product'); $categories = $productClass-&gt;getCategories($this-&gt;element-&gt;product_id); $categoryClass = hikashop_get('class.category'); $bookCat = ''; $writters = ''; foreach($categories as $category){ $categoryInfo = $categoryClass-&gt;get($category,true); $cid=''; $name=''; if(isset($categoryInfo-&gt;category_id) &amp;&amp; !empty($categoryInfo-&gt;category_id)){ $cid = "&amp;cid=".$categoryInfo-&gt;category_id; $name = str_replace(' ','-',strtolower($categoryInfo-&gt;category_name)); $name = "&amp;name=".$name; } $item_id = ''; global $Itemid; if(isset($Itemid) &amp;&amp; !empty($Itemid)) $item_id = "&amp;Itemid=".$Itemid; if($categoryInfo-&gt;category_parent_id == '2') //replace it by the id of CATEGORIES cateogry $bookCat .= "&lt;a href='".$url.$cid.$name.$item_id."'&gt;".$categoryInfo-&gt;category_name."&lt;/a&gt; "; elseif($categoryInfo-&gt;category_parent_id == '2') //replace it by the id of WRITTERS category $writters .= "&lt;a href='".$url.$cid.$name.$item_id."'&gt;".$categoryInfo-&gt;category_name."&lt;/a&gt; "; } echo "&lt;span class='listCategories'&gt;".$bookCat."&lt;/span&gt;&lt;br/&gt;"; echo "&lt;span class='listWriters'&gt;".$writters."&lt;/span&gt;"; ?&gt;

By this way, you will have two listing, the first one all the categories of the book, and the second one the list of the writers.

Last edit: 13 years 11 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#78033](#78033) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78033 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

hellooo
you made my day ![:D](/bigsmile.gif ":D") thats perfect.. only more one tiny detail ![:D](/bigsmile.gif ":D") when you click on the writer it shows you the details i would also like to show all the books that are under him
another thing .. when i click the category i doesn't show all the categories but only 4 . do you know why ??????
thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78095](#78095) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78095 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

You already should have the products displayed.
Try to create a category listing menu, even if it's a hidden menu, it should solve the problem.

Could you give me an example for your second thing ?

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#78112](#78112) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78112 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

i already have the default category listing but i also created a new one but nothing . it shows only 4 categories
check here [ ubook.igrouphost.com/index.php?option=co...106&amp;name=&amp;Itemid=300](http://ubook.igrouphost.com/index.php?option=com_hikashop&ctrl=product&task=show&cid=79106&name=&Itemid=300)
this is the product page and click on ΛΟΓΟΤΕΧΝΙΑ
in the top menu you can see "category listing" is the one i created
i also sent you a pm with username and password to access the backend if you need !!!

about the other thing:

as i said there is a book(product) to the book are assigned two main categories a) the category and b) the writers
for the b) the writers (θαναηλακη πολη on the above link) if you click them you can see the category description (cause each writer is a category with image and description) until now which is right. Each writer though has written (been assigned to ) many books(products) so i would like those books to be displayed either on a module or under the description like a product listing. ![:D](/bigsmile.gif ":D")
thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78155](#78155) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78155 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

To have the products displayed, you just have to replace "ctrl=category" to "ctrl=product" in the previous given code.

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#78249](#78249) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78249 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

helloooo
that worked ![:D](/bigsmile.gif ":D")
a problem .. ine the category.. if the book belongs to a subcategory e.g. literature-&gt;english literature it should show "english literature" but it shows nothing
if it belongs to literature it shows normal "literature"
whats wrong ???
thanx

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78306](#78306) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78306 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

Problem solved, that was because in the code given I was checking the parent_category_id, so it displayed nothing when the parent category were different than the root category.
I just replaced "if($categoryInfo-&gt;category_parent_id == '2')" by "if($categoryInfo-&gt;category_parent_id != '204')" (204 = writters category)

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#78397](#78397) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78397 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

hello
thank you !! i have another really big problem now
i finally started to import the products and hikashop stops responding
its loading around 4000 brands
100000 categories
and 250000 products
is there any limit or something ? cause i tested it with the first 1000 and it was ok
thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78421](#78421) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78421 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

I think that the problem come from the timeout of your server.
If a page is too long to charge (it's the case while you are uploading a csv) and the time go over the timeout setting of the server then it stops.

I suggest that you made many csv files from your main csv file, to reduce the charge.

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#78431](#78431) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78431 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

i dont upload through csv
i upload with a custom script directly to mysql
after the upload finishes and the db is complete
then i open hikashop, i go to categories-writers
or brands etc .. and i get a blank page
the same in the front end

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78443](#78443) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78443 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Enable the Joomla debug mode, I think that you have an error while importing.

With the debug mode you should see an error displayed.

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gili](/forum/user/6876-gili "View gili's Profile")**
- [![gili's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6876-gili "View gili's Profile") Topic Author
- [ Offline](/forum/user/6876-gili)

Less More

- Posts: 51
- Thank you received: 0
-
-

13 years 11 months ago [\#78451](#78451) by [gili](/forum/user/6876-gili "View gili's Profile")  Replied by *[gili](/forum/user/6876-gili "View gili's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78451 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

still white page
[ ubook.igrouphost.com/administrator/index...tegory&amp;task=edit&amp;cid](http://ubook.igrouphost.com/administrator/index.php?option=com_hikashop&ctrl=category&task=edit&cid)[]=1029536

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#78462](#78462) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[category in product page](/forum/4-how-to/75787-category-in-product-page#78462 "hello  i found out how to show the brand on the product page that i asked in a previous post using the following code found in another thread  Now what i want is your help to modify this code to make it show one subcategory assigned to the product To the product i have assigned 2 categories like this : main category-category&#95;A main category-category&#95;B-subcategory so i want to display only the one of them or maybe two (if there where three subcategories) linked to the category description page  the final look of my product page should be like this:  -title -image  -CATEGORY(linkable)  -price -extra fields etc etc  thanx")*

Hi,

Where did you found this link ?
I don't see any category with this id in your category listing.
Just go on the root directory, show all sub elements and you would see 182 categories.
10009450 and 10009451 have strange numbers but, categories just before are : 204, 201, 200, ...

So, I really don't know what the database entry for the id "1029536", but for HikaShop, it's not a category.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [gili](/forum/user/6876-gili "View gili's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc1Nzg3LWNhdGVnb3J5LWluLXByb2R1Y3QtcGFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.715 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
