lixotuka Posted February 17, 2014 Share Posted February 17, 2014 (edited) 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 February 28, 2014 by lixotuka (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 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 More sharing options...
lixotuka Posted February 18, 2014 Author Share Posted February 18, 2014 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 More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 1) what file you changed? homefeatuerd.tpl located in /modules/ directory or in themes/YOURTHEME/modules/homefeatured/ ? Link to comment Share on other sites More sharing options...
lixotuka Posted February 18, 2014 Author Share Posted February 18, 2014 1) what file you changed? homefeatuerd.tpl located in /modules/ directory or in themes/YOURTHEME/modules/homefeatured/ ? I've tried both, but neither works. Link to comment Share on other sites More sharing options...
lixotuka Posted February 21, 2014 Author Share Posted February 21, 2014 1) what file you changed? homefeatuerd.tpl located in /modules/ directory or in themes/YOURTHEME/modules/homefeatured/ ? Hi Vekia Any other idea to erase ADD TO CART button? Regards Link to comment Share on other sites More sharing options...
vekia Posted February 22, 2014 Share Posted February 22, 2014 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 More sharing options...
lixotuka Posted February 24, 2014 Author Share Posted February 24, 2014 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 More sharing options...
NemoPS Posted February 24, 2014 Share Posted February 24, 2014 If you want everything to recompile from scratch, you can get rid of everything inside cache/smarty/compile (preserve index.php) Link to comment Share on other sites More sharing options...
lixotuka Posted February 24, 2014 Author Share Posted February 24, 2014 (edited) 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 February 24, 2014 by lixotuka (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 25, 2014 Share Posted February 25, 2014 btw. this code (modification) is only related to homepage featured produts module Link to comment Share on other sites More sharing options...
lixotuka Posted February 25, 2014 Author Share Posted February 25, 2014 btw. this code (modification) is only related to homepage featured produts module Hi vekia I do not understand your comment well. I've done something wrong or it is not possible to do this with my template? Thank you for your patience Regards Link to comment Share on other sites More sharing options...
vekia Posted February 25, 2014 Share Posted February 25, 2014 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 More sharing options...
lixotuka Posted February 25, 2014 Author Share Posted February 25, 2014 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 ) 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 More sharing options...
vekia Posted February 25, 2014 Share Posted February 25, 2014 this is why it doesnt work you changed: modules/homefeatured/homefeatured.tpl themes/leomega/modules/homefeatured/homefeatured.tpl and it's not blockleoproducttabs module Link to comment Share on other sites More sharing options...
lixotuka Posted February 25, 2014 Author Share Posted February 25, 2014 this is why it doesnt work you changed: and it's not blockleoproducttabs module I've searched the code in the blockleoproducttabs.tpl file but I can't find it. Maybe the code to remove it is different. Link to comment Share on other sites More sharing options...
vekia Posted February 25, 2014 Share Posted February 25, 2014 definitely different. it's because it's non default addon with non default design. please show contents of this file Link to comment Share on other sites More sharing options...
lixotuka Posted February 25, 2014 Author Share Posted February 25, 2014 /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 More sharing options...
vekia Posted February 26, 2014 Share Posted February 26, 2014 contents of product list is in file: {include file="{$product_tpl}"} have you got any other tpl file in module directory? Link to comment Share on other sites More sharing options...
lixotuka Posted February 26, 2014 Author Share Posted February 26, 2014 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 More sharing options...
vekia Posted February 26, 2014 Share Posted February 26, 2014 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 More sharing options...
lixotuka Posted February 26, 2014 Author Share Posted February 26, 2014 I finally managed to remove the ADD TO CART button! But it has now gone one important thing, THE PRICE! Have I deleted more than necessary? Link to comment Share on other sites More sharing options...
vekia Posted February 27, 2014 Share Posted February 27, 2014 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 More sharing options...
lixotuka Posted February 27, 2014 Author Share Posted February 27, 2014 ¡FANTASTIC! We're almost there. Also I want to remove the damn button (and short description) in the list of products, inside categories, and in the results of searches, but I do not know which is the module containing the code. Regards Link to comment Share on other sites More sharing options...
vekia Posted February 27, 2014 Share Posted February 27, 2014 now please show contents of /themes/YOUR_THEME/product-list.tpl file Link to comment Share on other sites More sharing options...
lixotuka Posted February 27, 2014 Author Share Posted February 27, 2014 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 More sharing options...
vekia Posted February 27, 2014 Share Posted February 27, 2014 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 More sharing options...
lixotuka Posted February 28, 2014 Author Share Posted February 28, 2014 Excellent! One more thing solved Thank you very much, Vekia Link to comment Share on other sites More sharing options...
lixotuka Posted February 28, 2014 Author Share Posted February 28, 2014 (edited) 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 February 28, 2014 by lixotuka (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 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 More sharing options...
lixotuka Posted February 28, 2014 Author Share Posted February 28, 2014 Everything is SOLVED Vekia, thank you for your time. Regards Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 you're very very welcome and thank you for your another donation, really appreciate Link to comment Share on other sites More sharing options...
lixotuka Posted March 9, 2014 Author Share Posted March 9, 2014 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 More sharing options...
vekia Posted March 9, 2014 Share Posted March 9, 2014 here it is: <div class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</div> just remove this code Link to comment Share on other sites More sharing options...
lixotuka Posted March 16, 2014 Author Share Posted March 16, 2014 Solved! Thank you Link to comment Share on other sites More sharing options...
max1960 Posted August 11, 2014 Share Posted August 11, 2014 Sorry, all instructions do not work in version 1.6.8 with themes default-bootstrap, I have tried everything, I wont remove short description and add to shopping cart button only in featured products. thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now