Jump to content

[SOLVED] Remove ADD TO CART button and SHORT DESCRIPTION


Recommended Posts

Hello

 

I would make some changes to the Leo Mega Store  theme that I'm using in Prestashop 1.5.6.1, but it's too difficult for me:

 

1. I want to remove the ADD TO CART button in the main page and others (not on the product page)

 

2. Also I want to remove the short description that is above the ADD TO BASKET button

 

Thank you

Regards

 

(SORRY FOR MY ENGLISH)

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

1) modify homefeatured.tpl file

there (by default) is a code like:

						{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
							{if ($product.quantity > 0 OR $product.allow_oosp)}
							<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
							{else}
							<span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
							{/if}
						{else}
							<div style="height:23px;"></div>
						{/if}

just remove it.

Link to comment
Share on other sites

1) modify homefeatured.tpl file

there (by default) is a code like:

						{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
							{if ($product.quantity > 0 OR $product.allow_oosp)}
							<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
							{else}
							<span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
							{/if}
						{else}
							<div style="height:23px;"></div>
						{/if}

just remove it.

 

 

I've removed it, but still appears. If you want to check it, I send you the url via pm

Link to comment
Share on other sites

hello

to remove add to cart button from homefeatured it's nececssary to remove whole code:

		{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
							{if ($product.quantity > 0 OR $product.allow_oosp)}
							<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
							{else}
							<span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
							{/if}
						{else}
							<div style="height:23px;"></div>
						{/if}

if it doesnt want to work, recompile entire theme and clear cache, also manually

Link to comment
Share on other sites

hello

to remove add to cart button from homefeatured it's nececssary to remove whole code:

		{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
							{if ($product.quantity > 0 OR $product.allow_oosp)}
							<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
							{else}
							<span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
							{/if}
						{else}
							<div style="height:23px;"></div>
						{/if}

if it doesnt want to work, recompile entire theme and clear cache, also manually

 

Hi vekia

 

I've clear cache manually, but I don't know to recompile entire theme. How can i do it?

 

Thank you for your patience

Regards

Link to comment
Share on other sites

If you want everything to recompile from scratch, you can get rid of everything inside cache/smarty/compile (preserve index.php)

 

I did everything:

 

Remove whole code from:

  • modules/homefeatured/homefeatured.tpl
  • themes/leomega/modules/homefeatured/homefeatured.tpl

 

Clear cache manually in:

  • cache/smarty/cache (except of index.php)
  • cache/smarty/compile (except of index.php)

 

But the ADD TO CART button is still there  :(What I'm doing wrong?

 

Regards and thank you

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

all modifications above is related to only one part of store: featured products.

all other pages / features where the "add to cart" button appears need additional modifications.

 

so, i just simple noticed (but im not sure of course) that you checked also other parts of shop, and you just see "add to cart" button there, this is why you think that it doesnt work? am i right?

 

add to cart button disappear from featured products?

you use default featured products module?

Link to comment
Share on other sites

so, i just simple noticed (but im not sure of course) that you checked also other parts of shop, and you just see "add to cart" button there, this is why you think that it doesnt work? am i right?

 

Actually, the button still is in the main page (and now I think that maybe it's there because I don't remove the code in proper module :rolleyes:)

 

 

add to cart button disappear from featured products?

 
No.
 

 

you use default featured products module?

 

The module that shows the featured products on the home page is called blockleoproducttabs

 

 

 

¡Thanks a million!

Link to comment
Share on other sites

/public/modules/blockleoproducttabs/blockleoproducttabs.tpl:




{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}


<!-- MODULE Block specials -->
<div id="leoproducttabs" class="block products_block exclusive blockleoproducttabs">
<div class="block_content">            
<ul id="productTabs" class="nav nav-tabs">
 {if $special}
              <li><a href="#tabspecial" data-toggle="tab">{l s='Special' mod='blockleoproducttabs'}</a></li>
 {/if}
               {if $newproducts}
              <li><a href="#tabnewproducts" data-toggle="tab"><span></span>{l s='New Arrivals' mod='blockleoproducttabs'}</a></li>
 {/if}
 {if $bestseller}
              <li><a href="#tabbestseller" data-toggle="tab"><span></span>{l s='Best Seller' mod='blockleoproducttabs'}</a></li>
 {/if}
 {if $featured}
              <li><a href="#tabfeaturedproducts" data-toggle="tab"><span></span>{l s='Featured Products' mod='blockleoproducttabs'}</a></li>
 {/if}
            </ul>


            <div id="productTabsContent" class="tab-content">
  {if $special}
<div class="tab-pane" id="tabspecial">
{$products=$special}{$tabname='tabspecialcarousel'}
{include file="{$product_tpl}"}
             </div>
  {/if}
 {if $newproducts}
              <div class="tab-pane " id="tabnewproducts">
{$products=$newproducts} {$tabname='tabnewproducts-carousel'}
{include file="{$product_tpl}"}
              </div>   
{/if}
{if $bestseller}
              <div class="tab-pane " id="tabbestseller">
{$products=$bestseller} {$tabname='tabbestseller-carousel'}
{include file="{$product_tpl}"}
              </div>   
{/if}
{if $featured}
              <div class="tab-pane " id="tabfeaturedproducts">
{$products=$featured} {$tabname='tabfeaturedproducts-carousel'}
{include file="{$product_tpl}"}
              </div>   
{/if}


</div>
        


</div>
</div>
<!-- /MODULE Block specials -->
<script>
$(document).ready(function() {
    $('.carousel').each(function(){
        $(this).carousel({
            pause: true,
            interval: false
        });
    });
$(".blockleoproducttabs").each( function(){
$(".nav-tabs li", this).first().addClass("active");
$(".tab-content .tab-pane", this).first().addClass("active");
} );
});
</script>

Link to comment
Share on other sites

have you got any other tpl file in module directory?

 

Yes, one more:

/public/modules/blockleoproducttabs/products.tpl:

{if !empty($products)}
<div class=" carousel slide" id="{$tabname}">
{if count($products)>$itemsperpage} 
<a class="carousel-control left" href="#{$tabname}"   data-slide="prev">‹</a>
<a class="carousel-control right" href="#{$tabname}"  data-slide="next">›</a>
{/if}
<div class="carousel-inner">
{$mproducts=array_chunk($products,$itemsperpage)}
{foreach from=$mproducts item=products name=mypLoop}
<div class="item {if $smarty.foreach.mypLoop.first}active{/if}">
{foreach from=$products item=product name=products}
{if $product@iteration%$columnspage==1&&$columnspage>1}
 <div class="row-fluid">
{/if}
<div class="span{$scolumn} product_block ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item p-item{else}p-item{/if} clearfix">
<div class="product-container">


<div class="center_block">
<a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='blockleoproducttabs'}</span>{/if}</a>


{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!' mod='blockleoproducttabs'}</span>


{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!' mod='blockleoproducttabs'}</span>


{/if}


</div>
<div class="right_block">


<h3 class="s_title_block"><a href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name}</a></h3>


{if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="content_price price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}
<div class="product_desc">
<a href="{$product.link}" title="{l s='More' mod='blockleoproducttabs'}">{$product.description_short|strip_tags|truncate:65:'...'}</a>
</div>
{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
{if ($product.quantity > 0 OR $product.allow_oosp)}
<div class="leo-add-to-cart"><a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='blockleoproducttabs'}">{l s='Add to cart' mod='blockleoproducttabs'}</a></div>
{else}
<div class="leo-add-to-cart"><span class="exclusive">{l s='Add to cart' mod='blockleoproducttabs'}</span></div>
{/if}
{else}
<div style="height:23px;"></div>
{/if}




</div>
</div>
</div>


{if ($product@iteration%$columnspage==0||$smarty.foreach.products.last)&&$columnspage>1}
</div>
{/if}


{/foreach}
</div> 
{/foreach}
</div>
</div>
{/if}
Link to comment
Share on other sites

so, 

here it is:

{if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="content_price price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}
<div class="product_desc">
<a href="{$product.link}" title="{l s='More' mod='blockleoproducttabs'}">{$product.description_short|strip_tags|truncate:65:'...'}</a>
</div>
{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
{if ($product.quantity > 0 OR $product.allow_oosp)}
<div class="leo-add-to-cart"><a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='blockleoproducttabs'}">{l s='Add to cart' mod='blockleoproducttabs'}</a></div>
{else}
<div class="leo-add-to-cart"><span class="exclusive">{l s='Add to cart' mod='blockleoproducttabs'}</span></div>
{/if}
{else}
<div style="height:23px;"></div>
{/if}

:)

Link to comment
Share on other sites

oops! my bad 

 

paste this code:

{if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="content_price price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}

there, where you removed code i suggested before

Link to comment
Share on other sites

now please show contents of /themes/YOUR_THEME/product-list.tpl file :)

 

/public/themes/leomega/product-list.tpl:

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}


{if isset($products)}
<!-- Products list -->
<div id="product_list" class="products_block "><div class="rows-fluid">
{foreach from=$products item=product name=products}
{if Configuration::get('productlistcols')>1&&($product@iteration%Configuration::get('productlistcols')==1)}
        <div class="row-fluid">
        {/if}


<div class="p-item span{(12/Configuration::get('productlistcols'))} product_block ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix">


<div class="product-container clearfix">


<div class="center_block">
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}
</a>


{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span>


{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span>


{/if}


</div>
<div class="right_block">
<h3 class="s_title_block"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name}</a></h3>
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<p class="content_price price_container">
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if}
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}<span class="warning_inline">{l s='Out of stock'}</span>{/if}</span>{/if}
</p>


{if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only!'}</span>{/if}
{/if}
<div class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></div>
{if isset($comparator_max_item) && $comparator_max_item}
<p class="compare">
<input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} /> 
<label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label>
</p>
{/if}




{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
{if ($product.allow_oosp || $product.quantity > 0)}
{if isset($static_token)}
<div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a></div>
{else}
<div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)} title="{l s='Add to cart'} ">{l s='Add to cart'}
</a></div>
{/if} 
{else}
<div class="leo-add-to-cart"><span class="exclusive">{l s='Add to cart'}</span></div>
{/if}
{/if}
</div>
</div>
</div>
{if Configuration::get('productlistcols')>1&&($product@iteration%Configuration::get('productlistcols')==0||$smarty.foreach.products.last)}
</div>
{/if}
{/foreach}
</div></div>
<!-- /Products list -->
{/if}
Link to comment
Share on other sites

to hide add to cart button remove this code:
 

{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
    {if ($product.allow_oosp || $product.quantity > 0)}
        {if isset($static_token)}
        <div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a></div>
        {else}
        <div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)} title="{l s='Add to cart'} ">{l s='Add to cart'}
        </a></div>
        {/if} 
    {else}
    <div class="leo-add-to-cart"><span class="exclusive">{l s='Add to cart'}</span></div>
    {/if}
{/if}

to remove product description, remove this code:
 

<div class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></div>

Link to comment
Share on other sites

Sorry, I've found another ADD TO CART button and short description in a "related products" module. I think the code is into these files:

 

/public/themes/leomega/modules/blockleorelatedproducts/blockleorelatedproducts.tpl:

{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}


<!-- MODULE Block specials -->
<div id="relatedproducts" class="block exclusive nopadding blockleorelatedproducts">
<h2 class="title_block"><span class="title_block_content">{l s='Related Products' mod='blockleorelatedproducts'}</span>
</h2>
<div class="block_content"> 
{if !empty($products )}
{$tabname="leorelatedcarousel"}
{include file="{$product_tpl}"} 
{/if}
</div>
</div>
<!-- /MODULE Block specials -->
<script>
$(document).ready(function() {
    $('.blockleorelatedproducts .carousel').each(function(){
        $(this).carousel({
            pause: true,
            interval: false
        });
    });


});
</script>

 

 

/public/themes/leomega/modules/blockleorelatedproducts/products.tpl:

{if !empty($products)}
<div class=" carousel slide" id="{$tabname}">
{if count($products)>$itemsperpage} 
<a class="carousel-control left" href="#{$tabname}"   data-slide="prev">‹</a>
<a class="carousel-control right" href="#{$tabname}"  data-slide="next">›</a>
{/if}
<div class="carousel-inner">
{$mproducts=array_chunk($products,$itemsperpage)}
{foreach from=$mproducts item=products name=mypLoop}
<div class="products_block item {if $smarty.foreach.mypLoop.first}active{/if}">
{foreach from=$products item=product name=products}
{if $product@iteration%$columnspage==1&&$columnspage>1}
 <div class="row-fluid">
{/if}
<div class="span{$scolumn} product_block ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}p-item{/if} clearfix">
<div class="list-products">
<div class="product-container clearfix">


<div class="center_block">
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
{if isset($product.new) && $product.new == 1}<span class="new">{l s='New!' mod='blockleorelatedproducts'}</span>{/if}
</a>
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!' mod='blockleorelatedproducts'}</span>
{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!' mod='blockleorelatedproducts'}</span>{/if}
</div>
<div class="right_block">
<h3 class="s_title_block"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}</a></h3>
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<p class="content_price price_container">
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} 
</p>
{/if}
<div class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</div> 
{if isset($comparator_max_item) && $comparator_max_item}
<p class="compare">
<input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} /> 
<label for="comparator_item_{$product.id_product}">{l s='Select to compare' mod='blockleorelatedproducts'}</label>
</p>
{/if} 
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
{if ($product.allow_oosp || $product.quantity > 0)}
{if isset($static_token)}
<div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}">{l s='Add to cart' mod='blockleorelatedproducts'}</a></div>
{else}
<div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)}" title="{l s='Add to cart'}">{l s='Add to cart' mod='blockleorelatedproducts'}</a></div>
{/if} 
{else}
<div class="leo-add-to-cart"><span class="exclusive">{l s='Add to cart' mod='blockleorelatedproducts'}</span></div>
{/if}
{/if}


</div>
</div>
</div>
</div>


{if ($product@iteration%$columnspage==0||$smarty.foreach.products.last)&&$columnspage>1}
</div>
{/if}


{/foreach}
</div> 
{/foreach}
</div>
</div>
{/if}
Edited by lixotuka (see edit history)
Link to comment
Share on other sites

indeed, code to remove is here:
 

{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
{if ($product.allow_oosp || $product.quantity > 0)}
{if isset($static_token)}
<div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}">{l s='Add to cart' mod='blockleorelatedproducts'}</a></div>
{else}
<div class="leo-add-to-cart"><a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)}" title="{l s='Add to cart'}">{l s='Add to cart' mod='blockleorelatedproducts'}</a></div>
{/if} 
{else}
<div class="leo-add-to-cart"><span class="exclusive">{l s='Add to cart' mod='blockleorelatedproducts'}</span></div>
{/if}
{/if}
Link to comment
Share on other sites

  • 2 weeks later...

Hello

 

Sorry to open a solved post, but I've found another short description and I'd like to remove it.

 

I think it's in this file: /public/themes/leomega/modules/blockleorelatedproducts/products.tpl

{if !empty($products)}
<div class=" carousel slide" id="{$tabname}">
{if count($products)>$itemsperpage} 
<a class="carousel-control left" href="#{$tabname}"   data-slide="prev">‹</a>
<a class="carousel-control right" href="#{$tabname}"  data-slide="next">›</a>
{/if}
<div class="carousel-inner">
{$mproducts=array_chunk($products,$itemsperpage)}
{foreach from=$mproducts item=products name=mypLoop}
<div class="products_block item {if $smarty.foreach.mypLoop.first}active{/if}">
{foreach from=$products item=product name=products}
{if $product@iteration%$columnspage==1&&$columnspage>1}
 <div class="row-fluid">
{/if}
<div class="span{$scolumn} product_block ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}p-item{/if} clearfix">
<div class="list-products">
<div class="product-container clearfix">


<div class="center_block">
<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
{if isset($product.new) && $product.new == 1}<span class="new">{l s='New!' mod='blockleorelatedproducts'}</span>{/if}
</a>
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!' mod='blockleorelatedproducts'}</span>
{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!' mod='blockleorelatedproducts'}</span>{/if}
</div>
<div class="right_block">
<h3 class="s_title_block"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}</a></h3>
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<p class="content_price price_container">
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} 
</p>
{/if}
<div class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</div> 
{if isset($comparator_max_item) && $comparator_max_item}
<p class="compare">
<input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} /> 
<label for="comparator_item_{$product.id_product}">{l s='Select to compare' mod='blockleorelatedproducts'}</label>
</p>
{/if} 




</div>
</div>
</div>
</div>


{if ($product@iteration%$columnspage==0||$smarty.foreach.products.last)&&$columnspage>1}
</div>
{/if}


{/foreach}
</div> 
{/foreach}
</div>
</div>
{/if}
Link to comment
Share on other sites

  • 4 months later...

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...