Post by gmoussa73 » Mon Oct 04, 2010 5:50 am

i want to remove the sub category images from my front end shop.....i just want to show the sub categories as text only...how can i do that?
Last edited by i2Paq on Sun Oct 17, 2010 2:44 pm, edited 1 time in total.
Reason: Topic moved

New member

Posts

Joined
Fri Oct 01, 2010 2:39 am

Post by opensc010 » Wed Oct 13, 2010 2:18 am

No one really knows how to delete those images? I also need an advice how to do that. I attach an image. Thanks

Image

Newbie

Posts

Joined
Wed Oct 13, 2010 12:27 am

Post by mystifier » Wed Oct 13, 2010 2:56 am

In catalog/view/theme/default/template/product/category.tpl, change lines 27..34
From:

Code: Select all

      <tr>
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        <td width="25%"><?php if (isset($categories[$j])) { ?>
          <a href="<?php echo $categories[$j]['href']; ?>"><img src="<?php echo $categories[$j]['thumb']; ?>" title="<?php echo $categories[$j]['name']; ?>" alt="<?php echo $categories[$j]['name']; ?>" style="margin-bottom: 3px;" /></a><br />
          <a href="<?php echo $categories[$j]['href']; ?>"><?php echo $categories[$j]['name']; ?></a>
          <?php } ?></td>
        <?php } ?>
      </tr>
To:

Code: Select all

      <tr>
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        <td width="25%"><?php if (isset($categories[$j])) { ?>
          <a href="<?php echo $categories[$j]['href']; ?>"><?php echo $categories[$j]['name']; ?></a>
          <?php } ?></td>
        <?php } ?>
      </tr>
If you are using a custom theme, the category.tpl file should be at ../yourtheme/.. rather than ../default/..

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by opensc010 » Sun Oct 17, 2010 4:35 am

mystifier wrote:In catalog/view/theme/default/template/product/category.tpl, change lines 27..34
From:

Code: Select all

      <tr>
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        <td width="25%"><?php if (isset($categories[$j])) { ?>
          <a href="<?php echo $categories[$j]['href']; ?>"><img src="<?php echo $categories[$j]['thumb']; ?>" title="<?php echo $categories[$j]['name']; ?>" alt="<?php echo $categories[$j]['name']; ?>" style="margin-bottom: 3px;" /></a><br />
          <a href="<?php echo $categories[$j]['href']; ?>"><?php echo $categories[$j]['name']; ?></a>
          <?php } ?></td>
        <?php } ?>
      </tr>
To:

Code: Select all

      <tr>
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        <td width="25%"><?php if (isset($categories[$j])) { ?>
          <a href="<?php echo $categories[$j]['href']; ?>"><?php echo $categories[$j]['name']; ?></a>
          <?php } ?></td>
        <?php } ?>
      </tr>
If you are using a custom theme, the category.tpl file should be at ../yourtheme/.. rather than ../default/..

Thank you very much. That is exactly what i was looking for.

Newbie

Posts

Joined
Wed Oct 13, 2010 12:27 am

Post by pabloctoledo » Sun May 11, 2014 4:20 pm

I can't find that lines in the 1.5.6 version.

I know this is old but any help would be much appreciated!

Newbie

Posts

Joined
Thu Jan 23, 2014 12:39 am

Post by gurcangozen » Thu Jan 29, 2015 4:39 pm

1- Find; catalog/view/theme/YOURTHEME/template/product/category.tpl
2- Backup the file first.
3- Find following code and delete.
<img src="<?php echo $image; ?>" alt="<?php echo $category['name']; ?>" />

It worked for me in Opencart 1.5.6

Newbie

Posts

Joined
Thu Jan 29, 2015 4:37 pm

Post by balakus » Wed Feb 04, 2015 12:01 am

hi all, please tell me, I am newbi. How to buy premium custom theme ? I want to add sms service for buyer

Prediksi Bola | Prediksi Skor Akurat


Newbie

Posts

Joined
Tue Feb 03, 2015 11:47 pm


Post by hussamalmoussa » Thu Sep 26, 2019 8:29 am

Hi, Thanks for the code, but my file is category.twig and the code is different
here is the code

{#==== Variables Device_res ==== #}
{% set devices = { 'lg' : 'Desktops','md' : 'Tablet Landscape','sm' : 'Tablet Portrait','xs' : 'Phones'} %}
{% set device_refine = 'form-group ' %}

{{ header }}
<div class="breadcrumbs">
<div class="container">
<div class="title-breadcrumb">
{% set last = breadcrumbs|length %}
{% set i = 0 %}
{% for breadcrumb, crumbInfo in breadcrumbs %}
{% set i = i + 1 %}
{% if i == last %}
{{ crumbInfo.text }}
{% endif %}
{% endfor %}
</div>
<ul class="breadcrumb-cate">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container page-category">
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-md-6 col-sm-4' %}
{% elseif column_left or column_right %}
{% set class = 'col-md-9 col-sm-12 col-xs-12' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
{% if column_left or column_right %}
<a href="javascript:void(0)" class="open-sidebar hidden-lg hidden-md"><i class="fa fa-bars"></i>{{ text_sidebar }}</a>
{% endif %}
<div class="sidebar-overlay "></div>
<div class="products-category">
{#===== Show Description Category =======#}
{% if description !='<p><br></p>' %}
<div class="form-group clearfix">
{% if soconfig.get_settings('lstimg_cate_status') %}
{% set short_by_category = thumb ? 'col-sm-9 col-xs-12' : 'col-sm-12 col-xs-12' %}
{% if thumb| trim is not empty or description !='<p><br></p>'%}
<div class="category-info row">
{% if thumb| trim is not empty %}
<div class="img-cate col-sm-3 col-xs-12"><img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="media-object" /></div>
{% endif %}
{% if description !='<p><br></p>' %}
<div class="form-group {{short_by_category}}">{{ description }}</div>
{% endif %}
</div>
{% endif %}
{% endif %}
<h3 class="title-category ">{{heading_title}}</h3>
</div>
{% endif %}

{#===== Show Sub Category =======#}
{% if categories and soconfig.get_settings('product_catalog_refine')!='2' %}

{% for key, subfix in devices %}
{% if soconfig.get_settings('catalog_refine_devices_'~key) == 5 %}
{% set device_refine = device_refine ~ ' col-'~key~'-15' %}
{% else %}
{% set device_refine = device_refine ~ ' col-'~key~'-'~(12 / soconfig.get_settings('catalog_refine_devices_'~key) ) %}

{% endif %}
{% endfor %}

<div class="refine-search form-group">
<div class="row">
<h3 class="col-xs-12 title-category">{{ text_refine }}</h3>
{% for category in categories %}
<div class="{{device_refine}}">
{%if soconfig.get_settings('product_catalog_refine') %}
<a href="{{ category.href }}">{{ category.name }}</a>
{% else %}
<a href="{{ category.href }}" class="thumbnail"><img src="{{category.thumb}}" alt="{{ category.name }}" /> </a>
<a href="{{ category.href }}">{{ category.name }}</a>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}

{% if products %}
{#==== Product Listing ==== #}
<div class="products-category">
{% include theme_directory~'/template/soconfig/listing.twig' with {listingType: listingType} %}
</div>
{% endif %}

{% if not categories and not products %}
<p>{{ text_empty }}</p>
<div class="buttons">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{% endif %}
{{ content_bottom }}
</div>
</div>
{{ column_right }}</div>
</div>
{{ footer }}

I tried to remove this line
<a href="{{ category.href }}" class="thumbnail"><img src="{{category.thumb}}" alt="{{ category.name }}" /> </a>


But it does nothing
Any Advice


Posts

Joined
Sun Feb 25, 2018 3:54 pm

Post by by mona » Thu Sep 26, 2019 10:46 am

well according to that .. and it is a theme - so YOU SHOULD ASK THEM ... there is an admin setting for that

other than that - clear you cache - DASHBOARD => cog top right
EXTENSIONS => MODIFICATIONS => top right => Clear cache

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 7 guests