Jump to content

How to remove picture option for Categories


Recommended Posts

I do not want to add a picture for my main categories, but would like to keep the pictures for subcategoires. If I do not add the picture it creates a picture holder with ?.  Suggestions?

 

Also, how do I remove the "THERE IS 1 PRODUCT" under the category title? All I would like to see at the top of the page is the category title.

 

See Example

 

Using Magma Theme

PrestaShop 1.6.0.9

 

Thanks,

Barb

Edited by FairyDreamLand (see edit history)
Link to comment
Share on other sites

by default it's not possible without some custom coding.

in this case it's necessary to alter category.tpl file

 

there is a code:

background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; 

change it to:

{if $category->level_depth!=3}background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat;{/if}
Link to comment
Share on other sites

 

by default it's not possible without some custom coding.

in this case it's necessary to alter category.tpl file

 

there is a code:

background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; 

change it to:

{if $category->level_depth!=3}background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat;{/if}

 

Had to change it a little but got rid of the cateogry images, but there is a part I could not get rid of showing below and to the right of the category title  EXAMPLE: Cat%20Fix.JPG

Page Link

Link to comment
Share on other sites

scenes.tpl

alter the same code :-)

 

I did not find the same to alter:

{if $scenes}
<div id="scenes">
	<div>
		{foreach $scenes as $scene_key=>$scene}
		<div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url({$base_dir}img/scenes/{$scene->id}-scene_default.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px;{if !$scene@first} display:none;{/if}">
			{foreach $scene->products as $product_key=>$product}
			{if isset($product.id_image)}
				{assign var=imageIds value="`$product.id_product`-`$product.id_image`"}
			{/if}
				<a href="{$product.link|escape:'html':'UTF-8'}" class="popover-button" style="width:{$product.zone_width}px; height:{$product.zone_height}px; margin-left:{$product.x_axis}px ;margin-top:{$product.y_axis}px;" data-id_product_scene="{$scene_key|intval}_{$product_key|intval}_{$product.id_product|intval}">
					<span style="margin-top:{math equation='a/2 -10' a=$product.zone_height}px; margin-left:{math equation='a/2 -10' a=$product.zone_width}px;"></span>
				</a>
				<div id="scene_products_cluetip_{$scene_key}_{$product_key}_{$product.id_product}" style="display:none;">
                	<div class="product-image-container">
						{if isset($imageIds)}
							<img class="img-responsive replace-2x" src="{$link->getImageLink($product.id_product, $imageIds, 'home_default')|escape:'html':'UTF-8'}" alt="" />
						{/if}
                    </div>
					<p class="product-name"><span class="product_name">{$product.details->name}</span></p>
					<div class="description">{$product.details->description_short|strip_tags|truncate:170:'...'}</div>
                    {if !$PS_CATALOG_MODE AND $product.details->show_price}
					<div class="prices">
						{if isset($product.details->new) AND $product.details->new}<span class="new-box"><span class="new-label">{l s='New'}</span></span>{/if}
						<p class="price product-price">{if $priceDisplay}{convertPrice price=$product.details->getPrice(false, $product.details->getDefaultAttribute($product.id_product))}{else}{convertPrice price=$product.details->getPrice(true, $product.details->getDefaultAttribute($product.id_product))}{/if}</p>
							{if $product.details->on_sale}
							<span class="sale-box"><span class="sale-label">{l s='Sale'}</span></span>
						{elseif isset($product.reduction) && $product.reduction}
							<span class="discount">{l s='Reduced price!'}</span>
						{/if}
					</div>
					{/if}
				</div>
			{/foreach}
		</div>
		{/foreach}
	</div>
	{if isset($scenes.1)}
	<div class="thumbs_banner" style="height:{$thumbSceneImageType.height}px;">
		<span class="space-keeper">
			<a class="prev" href="#" style="height:{math equation='a+2' a=$thumbSceneImageType.height}px;"> </a>
		</span>
		<div id="scenes_list">
			<ul style="width:{math equation='(a*b + (a-1)*10)' a=$scenes|@count b=$thumbSceneImageType.width}px; height:{$thumbSceneImageType.height}px;">
			{foreach $scenes as $scene}
				<li id="scene_thumb_{$scene->id}" style="{if !$scene@last} padding-right:10px;{/if}">
					<a style="width:{$thumbSceneImageType.width}px; height:{$thumbSceneImageType.height}px" title="{$scene->name|escape:'html':'UTF-8'}" href="{$base_dir}" data-id_scene="{$scene->id|intval}" class="scene_thumb">
						<img alt="{$scene->name|escape:'html':'UTF-8'}" src="{$content_dir}img/scenes/thumbs/{$scene->id}-m_scene_default.jpg" width="{$thumbSceneSize.width}" height="{$thumbSceneSize.height}" />
					</a>
				</li>
		 	{/foreach}
		 	</ul>
		</div>
		<span class="space-keeper">
			<a class="next" href="{$base_dir}" style="height:{math equation='a+2' a=$thumbSceneImageType.height}px;"> </a>
		</span>
	</div>
	{/if}
</div>
{strip}
{addJsDefL name=i18n_scene_close}{l s='Close' js=1}{/addJsDefL}
{addJsDef li_width=($thumbSceneImageType.width|intval+10)}
{/strip}
{/if}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...