A small problem with the category listing module.

  • Posts: 27
  • Thank you received: 2
12 years 3 hours ago #76957

Hi,

I have a Product Categories module in my sidebar. Click on the category and it opens to show the sub-categories. Click on the sub-category and up pops the category page with all its products.

Unfortunately, if a Category has products but no sub-categories clicking on the Category does nothing.

Is there any way to make the behaviour of the Product Categories module the same for categories and sub-categories?

Many thanks,

Ian P.


Regards,


Ian P.
Griffin Grove Gaming
www.griffingrove.com.au

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 11 months ago #77157

Hi,

You can edit the view "category / listing_list".
With a screenshot of your configuration or a link to a page, we could give you more information about the modifications.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 27
  • Thank you received: 2
11 years 11 months ago #77204

Hi!

Jerome wrote: With a screenshot of your configuration or a link to a page, we could give you more information about the modifications.


The website is in the sig. HikaShop pages are under the "Store" menu tab.

Here is my Product Categories default view:



When Casting is selected, Bases closes but nothing else happens -- there is no display of the products under Casting.

If Link on Main Categories is set to Yes, then when Casting is selected the products under the Casting category are displayed (yay!!) but when Fantasy Football is selected the menu opens briefly to display the sub-categories -- but then closes again and displays the sub-categories in the main body position (boo!!!).

Is there a configuration that allows Link on Main Categories to operate if there are no sub-categories, but otherwise displays the sub-categories beneath the category in the Product Categories module?

Many thanks,


Regards,


Ian P.
Griffin Grove Gaming
www.griffingrove.com.au
Last edit: 11 years 11 months ago by ian.plumb.

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 11 months ago #77323

Hi,

There is no option for it. I made some tests and it would require to modify the category listing.
It uses a javascript slider library.

There are two different solutions.
1/ Do not set the classname "jpane-toggler" if the row does not have children.
2/ Add a link to open the category as "child" if there is no children.

Here the modification of code for the first solution.

		case 'allchildsexpand':
			?>
			<div id="category_panel_<?php echo $this->params->get('id');?>" class="pane-sliders">
			<?php
			if(!empty($this->rows)){
				foreach($this->rows as $k => $row){
					if($only_if_products && $row->number_of_products<1) continue;
					$link = hikashop_completeLink('category&task=listing&cid='.$row->category_id.'&name='.$row->alias.$this->menu_id);
					?>
					<div class="panel">
						<h3 class="<?php if(!empty($row->childs)) { echo 'jpane-toggler'; } ?> title" id="category_pane_<?php echo $k;?>" style="cursor:default;">
							<span>
								<a href="<?php echo $link;?>">
									<?php
										echo $row->category_name;
										if($this->params->get('number_of_products',0)){
											echo ' ('.$row->number_of_products.')';
										}
									?>
								</a>
							</span>
						</h3>

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 11 years 11 months ago by Jerome.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum