Keyword

Categories/Item Show Style K2

  • Stefano Tangorra
  • Stefano Tangorra's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #162669 by Stefano Tangorra
Categories/Item Show Style K2 was created by Stefano Tangorra
Hi,
I have a stupid problem with the item show in categories/subcategories.
Like the image attached (in yellow the subcategories) the style of the subcategories is perfect, excactly what I need.
The problem is about the "summary" at the end of the page (in red) that I don't want showed.
What I need to do for hide this?
[img size=738x1260]www.espositori-packaging.it/images/Cattura1.PNG[/img]
tks
Stefano
Last edit: 7 years 2 months ago by Stefano Tangorra. Reason: added K2

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #162679 by Krikor Boghossian
Replied by Krikor Boghossian on topic Categories/Item Show Style K2
Hello Stefano,

I think I'll need a link in order to better understand the issue.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Stefano Tangorra
  • Stefano Tangorra's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #162687 by Stefano Tangorra
Replied by Stefano Tangorra on topic Categories/Item Show Style K2

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #162713 by Krikor Boghossian
Replied by Krikor Boghossian on topic Categories/Item Show Style K2
By default, there are no items inside the subcategory's block.
How did you add these items there?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Stefano Tangorra
  • Stefano Tangorra's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #162738 by Stefano Tangorra
Replied by Stefano Tangorra on topic Categories/Item Show Style K2
I know, so I've eidted the code using this solution

www.joomlaworks.net/forum/k2-en/41386-group-items-by-subcategory#147328

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #162751 by Krikor Boghossian
Replied by Krikor Boghossian on topic Categories/Item Show Style K2
Got it,

In the category.php override file, you need to remove the lower foreach loops. The lower foreach loops are generating the duplicate items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Stefano Tangorra
  • Stefano Tangorra's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #162753 by Stefano Tangorra
Replied by Stefano Tangorra on topic Categories/Item Show Style K2
Ok, thanks.
Can you indicate me exactly wich part of code I need to modify?

thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #162757 by Krikor Boghossian
Replied by Krikor Boghossian on topic Categories/Item Show Style K2
There are the foreach loops you added and are therefore duplicates.
Search for the same you loop you added lower in the same file.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Stefano Tangorra
  • Stefano Tangorra's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #162758 by Stefano Tangorra
Replied by Stefano Tangorra on topic Categories/Item Show Style K2
I regret, but I canno't understand you very well. Can you propose me the correct code using the actual code below?

?php if($this->params->get('subCategories') && isset($this->subCategories) && count($this->subCategories)): ?>
<div class="subcategories">
<div class="subcategory-inner">
<?php foreach($this->subCategories as $key=>$subCategory): ?>
<h2 class="subcategory"><?php echo $subCategory->name; ?></h2>
<div class="subcategoryname" id="<?php echo $subCategory->name; ?>">
<?php if(isset($this->leading) && count($this->leading)): ?>
<?php foreach($this->leading as $key=>$item): ?>
<?php if($item->catid == $subCategory->id): ?>

<?php
// Load category_item.php by default
$this->item=$item;
echo $this->loadTemplate('item');
?>
<?php endif;?>
<?php endforeach; ?>
<div class="clearfix"></div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>

<div class="clearfix"></div>
</div>
<?php endif; ?>

thanks

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


Powered by Kunena Forum