Post by mkemala » Thu Sep 21, 2017 8:55 pm

Hi to all,

i am new in opencart and maybe this question or problem comes around before. I have a problem with subcategories. I have a lot from those and on some pages there are empty places. the subs are with images, and on some brands ( Now only 2 alcatel and samsung) there are empty places.
I check all but find no abnormal situation. Can anybody help me???
http://www.tel-expert.com/index.php?rou ... ath=33_125
http://www.tel-expert.com/index.php?rou ... ath=33_129

thank you

Attachments

2017-09-21.png

2017-09-21.png (262.56 KiB) Viewed 369 times

2017-09-21 (3).png

2017-09-21 (3).png (423.91 KiB) Viewed 369 times

2017-09-21 (2).png

2017-09-21 (2).png (279.17 KiB) Viewed 369 times


Newbie

Posts

Joined
Thu Sep 21, 2017 8:46 pm

Post by grgr » Thu Sep 21, 2017 9:12 pm

You've added a subcategory image extension..........?

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by m.kemala » Thu Sep 21, 2017 10:30 pm

no extension, the coding below in category.tpl

<?php if ($categories) { ?>
<h3><?php echo $text_refine; ?></h3>
<?php if (count($categories) <= 5) { ?>
<div class="row">
<div class="col-sm-3">
<ul>
<?php foreach ($categories as $category) { ?>
<li> <a href="<?php echo $category['href']; ?>">
<?php if($category['image']){ ?>
<img src="<?php echo $category['image']; ?>" ><br>
<?php } ?>
<?php echo $category['name']; ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php } else { ?>
<div class="row">
<?php foreach (array_chunk($categories, ceil(count($categories) / 4)) as $categories) { ?>
<div class="col-sm-3">
<ul>
<?php foreach ($categories as $category) { ?>
<li><a href="<?php echo $category['href']; ?>">
<?php if($category['image']){ ?>
<img src="<?php echo $category['image']; ?>" ><br>
<?php } ?>
<?php echo $category['name']; ?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>

Newbie

Posts

Joined
Thu Feb 09, 2017 2:15 pm

Post by webcorvo » Thu Sep 21, 2017 10:51 pm

Can i ask why you do that?

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by m.kemala » Thu Sep 21, 2017 10:58 pm

i want that the subcategories shows up as images.. looks nice.. i have also an other problem with the sort order of the categories.
<div class="row">
<?php foreach (array_chunk($categories, ceil(count($categories) / 4)) as $categories) { ?>
<div class="col-sm-3">
<ul>
if i change the 4 to 100 than i get the sort order that i want, but i get also empty spaces. if i leave at 4 than the sort is not from left to right.

Newbie

Posts

Joined
Thu Feb 09, 2017 2:15 pm
Who is online

Users browsing this forum: No registered users and 280 guests