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

#   Odd problem with category listing module

##

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 11 months ago -  13 years 11 months ago [\#79992](#79992) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#79992 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")* was created by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")*

Hi

I'm having a problem with the category listing module when set to show "all direct sub categories".

[ ](http://compusale.cloudaccess.net/computer-parts-sale.html)[ compusale.cloudaccess.net/computer-parts-sale.html](http://compusale.cloudaccess.net/computer-parts-sale.html)

On the "Categories" module to the left. That module always have the "Motherboard" category opened up (showing it's sub categories such as "AMD (FM1)"). No matter which category I click on, once the page loads up, the "motherboard" category will be opened again.

For example when I click on the "Opteron" category ( a sub category of "CPU"), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the "Motherboards" category open up again (instead of having CPU open up)

Is there any way to make the correct category open up? i.e. when I'm in "Opteron", the "CPU" category will open up instead of "Motherboards" category?

If not, is there anyway to make no categories open up by default?

Thanks

regards
Simon

- [ ![module&#95;config.png](/forum/attachment/7311) ](/forum/attachment/7311 "module&#95;config.png") [ ](/forum/attachment/7311?download=1 "module&#95;config.png")
- [ ![illustration&#95;of&#95;problem.png](/forum/attachment/7312) ](/forum/attachment/7312 "...of&#95;problem.png") [ ](/forum/attachment/7312?download=1 "...of&#95;problem.png")

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2Mzc0LW9kZC1wcm9ibGVtLXdpdGgtY2F0ZWdvcnktbGlzdGluZy1tb2R1bGU/dG1wbD1tYXJrZG93bg==) 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 [\#80059](#80059) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80059 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Hi,

To edit this functionality, you have to edit the view "category / listing_list".
Here is some code which should unselect default category: Code:

?&gt;&lt;script type="text/javascript"&gt; if (window.addEventListener) { window.addEventListener('load', changeClass, false); } else { window.attachEvent('onload', changeClass); } function changeClass() { document.getElementById('&lt;?php echo 'category_pane_'.$k; ?&gt;').className="title pane-toggler"; } &lt;/script&gt;&lt;?php

Add it just after: "echo $this-&gt;tabs-&gt;endPanel();"

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

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 11 months ago -  13 years 11 months ago [\#80126](#80126) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80126 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Thanks for the reply Xavier.

I can't seem to get that code to work (not sure if I'm putting it in the correct place). Can you please copy and paste the entire "category / listing_list" here?

Also my client wants the selected category to open by default. i.e. when in a sub category of "CPU", the CPU category will open. Is this possible?

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2Mzc0LW9kZC1wcm9ibGVtLXdpdGgtY2F0ZWdvcnktbGlzdGluZy1tb2R1bGU/dG1wbD1tYXJrZG93bg==) 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 [\#80185](#80185) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80185 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Here is the entire file: Code:

&lt;?php if(!empty($this-&gt;rows)){ $pagination = $this-&gt;config-&gt;get('pagination','bottom'); if(in_array($pagination,array('top','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total &gt; $this-&gt;pageInfo-&gt;limit-&gt;value){ $this-&gt;pagination-&gt;form = '_top'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL();?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_top"&gt; &lt;div class="hikashop_subcategories_pagination hikashop_subcategories_pagination_top"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;div class="hikashop_subcategories"&gt; &lt;?php $only_if_products = $this-&gt;params-&gt;get('only_if_products',0); switch($this-&gt;params-&gt;get('child_display_type')){ case 'nochild': default: if(!empty($this-&gt;rows)){ ?&gt; &lt;ul class="hikashop_category_list&lt;?php echo $this-&gt;params-&gt;get('ul_class_name'); ?&gt;"&gt; &lt;?php $width = (int)(100/$this-&gt;params-&gt;get('columns')); if(empty($width)){ $width=''; }else{ $width='style="width:'.$width.'%;"'; } $app =&amp; JFactory::getApplication(); $found = ''; if(JRequest::getString('option')==HIKASHOP_COMPONENT &amp;&amp; in_array(JRequest::getString('ctrl','category'),array('category','product'))){ $found = $app-&gt;getUserState(HIKASHOP_COMPONENT.'.last_category_selected'); foreach($this-&gt;rows as $row){ if(JRequest::getString('ctrl','category')=='product'&amp;&amp;JRequest::getString('task','listing')=='show'){ $cid = JRequest::getInt('category_pathway',0); }else{ $cid = JRequest::getInt('cid',0); } if($cid == $row-&gt;category_id){ $found=$row-&gt;category_id; $app-&gt;setUserState(HIKASHOP_COMPONENT.'.last_category_selected',$row-&gt;category_id); break; } } } foreach($this-&gt;rows as $row){ if($only_if_products &amp;&amp; $row-&gt;number_of_products&lt;1) continue; $link = hikashop_completeLink('category&amp;task=listing&amp;cid='.$row-&gt;category_id.'&amp;name='.$row-&gt;alias.$this-&gt;menu_id); $class = ''; if($found == $row-&gt;category_id){ $class=' current active'; } ?&gt; &lt;li class="hikashop_category_list_item&lt;?php echo $class; ?&gt;" &lt;?php echo $width; ?&gt;&gt; &lt;a href="&lt;?php echo $link; ?&gt;" &gt; &lt;?php echo $row-&gt;category_name; if($this-&gt;params-&gt;get('number_of_products',0)){ echo ' ('.$row-&gt;number_of_products.')'; } ?&gt; &lt;/a&gt; &lt;/li&gt; &lt;?php } ?&gt; &lt;/ul&gt; &lt;?php } break; case 'allchildsexpand': ?&gt; &lt;div id="category_panel_&lt;?php echo $this-&gt;params-&gt;get('id');?&gt;" class="pane-sliders"&gt; &lt;?php if(!empty($this-&gt;rows)){ foreach($this-&gt;rows as $k =&gt; $row){ if($only_if_products &amp;&amp; $row-&gt;number_of_products&lt;1) continue; $link = hikashop_completeLink('category&amp;task=listing&amp;cid='.$row-&gt;category_id.'&amp;name='.$row-&gt;alias.$this-&gt;menu_id); ?&gt; &lt;div class="panel"&gt; &lt;h3 class="jpane-toggler title" id="category_pane_&lt;?php echo $k;?&gt;" style="cursor:default;"&gt; &lt;span&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php echo $row-&gt;category_name; if($this-&gt;params-&gt;get('number_of_products',0)){ echo ' ('.$row-&gt;number_of_products.')'; } ?&gt; &lt;/a&gt; &lt;/span&gt; &lt;/h3&gt; &lt;div class="jpane-slider content"&gt; &lt;ul class="hikashop_category_list&lt;?php echo $this-&gt;params-&gt;get('ul_class_name'); ?&gt;"&gt;&lt;?php if(!empty($row-&gt;childs)){ $app =&amp; JFactory::getApplication(); $found=''; if(JRequest::getString('option')==HIKASHOP_COMPONENT &amp;&amp; in_array(JRequest::getString('ctrl','category'),array('category','product'))){ $found = $app-&gt;getUserState(HIKASHOP_COMPONENT.'.last_category_selected'); if(JRequest::getString('ctrl','category')=='product'&amp;&amp;JRequest::getString('task','listing')=='show'){ $cid = JRequest::getInt('category_pathway',0); }else{ $cid = JRequest::getInt('cid',0); } foreach($row-&gt;childs as $child){ if($cid == $child-&gt;category_id){ $found=$child-&gt;category_id; $app-&gt;setUserState(HIKASHOP_COMPONENT.'.last_category_selected',$child-&gt;category_id); break; } } } $limit = $this-&gt;params-&gt;get('child_limit'); $i = 0; foreach($row-&gt;childs as $child){ if($only_if_products &amp;&amp; $child-&gt;number_of_products&lt;1) continue; if(!empty($limit) &amp;&amp; $i &gt;= $limit){ break; } $i++; $link = hikashop_completeLink('category&amp;task=listing&amp;cid='.$child-&gt;category_id.'&amp;name='.$child-&gt;alias.$this-&gt;menu_id); $class = ''; if($found==$child-&gt;category_id){ $class=' current active'; } ?&gt; &lt;li class="hikashop_category_list_item&lt;?php echo $class; ?&gt;"&gt; &lt;a href="&lt;?php echo $link; ?&gt;"&gt; &lt;?php echo $child-&gt;category_name; if($this-&gt;params-&gt;get('number_of_products',0)){ echo ' ('.$child-&gt;number_of_products.')'; } ?&gt; &lt;/a&gt; &lt;/li&gt; &lt;?php } } ?&gt;&lt;/ul&gt; &lt;/div&gt; &lt;/div&gt;&lt;?php } } ?&gt;&lt;/div&gt;&lt;?php break; case 'allchilds': jimport('joomla.html.pane'); $found = -1; if(JRequest::getString('option')==HIKASHOP_COMPONENT &amp;&amp; in_array(JRequest::getString('ctrl','category'),array('category','product')) &amp;&amp; $cid = JRequest::getInt('cid',0)){ if(JRequest::getString('ctrl','category')=='product'&amp;&amp;JRequest::getString('task','listing')=='show'){ $cid = JRequest::getInt('category_pathway',0); } $i=0; if(!empty($this-&gt;rows)){ foreach($this-&gt;rows as $k =&gt; $row){ if($only_if_products &amp;&amp; $row-&gt;number_of_products&lt;1) continue; if($row-&gt;category_id==$cid){ $found = $i; break; } if(!empty($row-&gt;childs)){ foreach($row-&gt;childs as $child){ if($child-&gt;category_id==$cid){ $found = $i; break 2; } } } $i++; } $app = JFactory::getApplication(); if($found&gt;=0){ $app-&gt;setUserState(HIKASHOP_COMPONENT.'.last_category_selected',$found); }else{ $found = (int)$app-&gt;getUserState(HIKASHOP_COMPONENT.'.last_category_selected'); } } }else{ $cid = 0; } $this-&gt;tabs = hikashop_get('helper.sliders'); $this-&gt;tabs-&gt;setOptions(array('startOffset'=&gt;$found,'startTransition'=&gt;0)); echo $this-&gt;tabs-&gt;startPane( 'category_panel_'.$this-&gt;params-&gt;get('id')); if(!empty($this-&gt;rows)){ foreach($this-&gt;rows as $k =&gt; $row){ if($only_if_products &amp;&amp; $row-&gt;number_of_products&lt;1) continue; if($this-&gt;params-&gt;get('number_of_products',0)){ $row-&gt;category_name.= ' ('.$row-&gt;number_of_products.')'; } if( !$this-&gt;module &#124;&#124; $this-&gt;params-&gt;get('links_on_main_categories')){ $link = hikashop_completeLink('category&amp;task=listing&amp;cid='.$row-&gt;category_id.'&amp;name='.$row-&gt;alias.$this-&gt;menu_id); $row-&gt;category_name = '&lt;a href="'.$link.'"&gt;'.$row-&gt;category_name.'&lt;/a&gt;'; } echo $this-&gt;tabs-&gt;startPanel($row-&gt;category_name, 'category_pane_'.$k); if(!empty($row-&gt;childs)){ ?&gt;&lt;ul class="hikashop_category_list&lt;?php echo $this-&gt;params-&gt;get('ul_class_name'); ?&gt;"&gt;&lt;?php foreach($row-&gt;childs as $child){ if($only_if_products &amp;&amp; $child-&gt;number_of_products&lt;1) continue; $class = ''; if($cid==$child-&gt;category_id){ $class=' current active'; } $link = hikashop_completeLink('category&amp;task=listing&amp;cid='.$child-&gt;category_id.'&amp;name='.$child-&gt;alias.$this-&gt;menu_id); ?&gt; &lt;li class="hikashop_category_list_item&lt;?php echo $class; ?&gt;"&gt; &lt;a class="hikashop_category_list_item_link" href="&lt;?php echo $link; ?&gt;"&gt; &lt;?php echo $child-&gt;category_name; if($this-&gt;params-&gt;get('number_of_products',0)){ echo ' ('.$child-&gt;number_of_products.')'; } ?&gt; &lt;/a&gt; &lt;/li&gt; &lt;?php } ?&gt;&lt;/ul&gt;&lt;?php } echo $this-&gt;tabs-&gt;endPanel(); ?&gt;&lt;script type="text/javascript"&gt; if (window.addEventListener) { window.addEventListener('load', changeClass, false); } else { window.attachEvent('onload', changeClass); } function changeClass() { document.getElementById('&lt;?php echo 'category_pane_'.$k; ?&gt;').className="title pane-toggler"; } &lt;/script&gt;&lt;?php } } echo $this-&gt;tabs-&gt;endPane(); break; } ?&gt; &lt;/div&gt; &lt;?php if(in_array($pagination,array('bottom','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total &gt; $this-&gt;pageInfo-&gt;limit-&gt;value){ $this-&gt;pagination-&gt;form = '_bottom'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL();?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_bottom"&gt; &lt;div class="hikashop_subcategories_pagination hikashop_subcategories_pagination_bottom"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } } ?&gt;

I will try to see how to open by default as soon as possible.

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 11 months ago -  13 years 11 months ago [\#80225](#80225) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80225 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Thanks Xavier.

Regarding the codes, I inserted it but the category module is still not displaying properly. Can I send you the admin login (through contact us?) so you can make tests and adjustments directly?

I noticed in the category options, Hikashop already have an option called "Random items" (where a random category bounce up to top &amp; open up). Maybe for future release we can have another option there that allows the active category to bounce up &amp; open?

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

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

13 years 11 months ago [\#80521](#80521) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80521 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

I think that you should try instead to simply change the line:
$this-&gt;tabs-&gt;setOptions(array('startOffset'=&gt;$found,'startTransition'=&gt;0));

to:
$this-&gt;tabs-&gt;setOptions(array('startTransition'=&gt;0));

in that file.

And please make sure that you're editing it for your frontend template and not another one, otherwise, you won't see any change.

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

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 11 months ago -  13 years 11 months ago [\#80612](#80612) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80612 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Hi Nicolas

Can you please have a look in my back-end administrator? (did you receive the login I sent via "contact us"?). I have tried both suggestions but still cannot get it to work.

Thanks

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

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 11 months ago [\#80783](#80783) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#80783 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Hi

Is there any other solutions? I don't know if I can continue using Hikashop if this problem cannot be solved.

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

13 years 11 months ago [\#81037](#81037) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#81037 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Hi,

I looked at the problem on your website regarding the fact that the proper category didn't expand but couldn't find why that could have happened since the selection of the category in PHP was the correct one.
And you said in your first message that having no category open would be fine too.
So, the code change I gave you was to do that.
I checked your website and that's what it is actually doing.
No category is opened when a page is displayed.
So my suggestion is ok, as far as I can see.

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 11 months ago -  13 years 11 months ago [\#81142](#81142) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#81142 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Thanks Nicolas, that code worked (the changes did not come in effect until the next day, cookies?).

The menu is satisfactory in it's current state but an expanding one (with correct category) would be best. Is this possible?

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

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

13 years 11 months ago [\#81387](#81387) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#81387 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

That's how it should be actually by default.
As I said in my last post, the data sent by HikaShop to the accordion library of joomla is correct on your website. I debugged that myself. So I don't see why it doesn't work on your website and don't have a solution for you.

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 10 months ago [\#81872](#81872) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#81872 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

The problem is also present on my other domain.
[ ](http://shoptest.cloudaccess.net/cat-menu/category/18-sub-4.html)[ shoptest.cloudaccess.net/cat-menu/category/18-sub-4.html](http://shoptest.cloudaccess.net/cat-menu/category/18-sub-4.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2Mzc0LW9kZC1wcm9ibGVtLXdpdGgtY2F0ZWdvcnktbGlzdGluZy1tb2R1bGU/dG1wbD1tYXJrZG93bg==) 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: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 10 months ago [\#82027](#82027) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#82027 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Hi,

I have fixed the problem in your website and I have made a fix in HikaShop which would be include in the next package.
If you want a generic fix, please edit the file administrator/com_hikashop/helpers/sliders.php
and replace Code:

if($this-&gt;mode == 'pane') { jimport('joomla.html.pane'); $this-&gt;tabs = JPane::getInstance('sliders', $options); $ret .= $this-&gt;tabs-&gt;startPane($name); } elseif($this-&gt;mode == 'sliders') { $ret .= JHtml::_('sliders.start', $name, $options); } else {

By this: Code:

if($this-&gt;mode == 'pane') { jimport('joomla.html.pane'); if(!empty($this-&gt;options)) $options = array_merge($options, $this-&gt;options); $this-&gt;tabs = JPane::getInstance('sliders', $options); $ret .= $this-&gt;tabs-&gt;startPane($name); } elseif($this-&gt;mode == 'sliders') { if(!empty($this-&gt;options)) $options = array_merge($options, $this-&gt;options); $ret .= JHtml::_('sliders.start', $name, $options); } else {

Regards and sorry for the inconvenient.

---

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

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

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

13 years 10 months ago [\#82204](#82204) by [simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")  Replied by *[simon2012](/forum/user/6847-simon2012 "View simon2012's Profile")* on topic *[Odd problem with category listing module](/forum/4-how-to/76374-odd-problem-with-category-listing-module#82204 "Hi  I'm having a problem with the category listing module when set to show &quot;all direct sub categories&quot;.  On the &quot;Categories&quot; module to the left. That module always have the &quot;Motherboard&quot; category opened up (showing it's sub categories such as &quot;AMD (FM1)&quot;). No matter which category I click on, once the page loads up, the &quot;motherboard&quot; category will be opened again.  For example when I click on the &quot;Opteron&quot; category ( a sub category of &quot;CPU&quot;), it goes to a page displaying Opteron CPUs BUT the Categories listing module will have the &quot;Motherboards&quot; category open up again (instead of having CPU open up)  Is there any way to make the correct category open up? i.e. when I'm in &quot;Opteron&quot;, the &quot;CPU&quot; category will open up instead of &quot;Motherboards&quot; category?  If not, is there anyway to make no categories open up by default?  Thanks  regards Simon")*

Thanks Jerome ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2Mzc0LW9kZC1wcm9ibGVtLXdpdGgtY2F0ZWdvcnktbGlzdGluZy1tb2R1bGU/dG1wbD1tYXJrZG93bg==) 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.087 seconds

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