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
Reason: Topic moved
In catalog/view/theme/default/template/product/category.tpl, change lines 27..34
From:
To:
If you are using a custom theme, the category.tpl file should be at ../yourtheme/.. rather than ../default/..
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>
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>
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
mystifier wrote:In catalog/view/theme/default/template/product/category.tpl, change lines 27..34
From: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']; ?>"><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>
If you are using a custom theme, the category.tpl file should be at ../yourtheme/.. rather than ../default/..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>
Thank you very much. That is exactly what i was looking for.
I can't find that lines in the 1.5.6 version.
I know this is old but any help would be much appreciated!
I know this is old but any help would be much appreciated!
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
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
hi all, please tell me, I am newbi. How to buy premium custom theme ? I want to add sms service for buyer
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
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
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
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
Who is online
Users browsing this forum: No registered users and 7 guests