Jump to content

How to remove this lines from cart block ?


Recommended Posts

So you don't want customers to be able to see the attributes they selected in the cart block? I'm not sure why you want to do this, but I suppose they are displayed on the cart summary. To remove the attributes and customisation lines from the cart block, {* comment out *} lines 50-72 (in PrestaShop v1.3.2) of modules/blockcart/blockcart.tpl:

>
{if isset($product.attributes_small)}

   <a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)}" title="{l s='Product detail'}">{$product.attributes_small}
{/if}

<!-- Customizable datas -->
{if isset($customizedDatas.$productId.$productAttributeId)}
   {if !isset($product.attributes_small)}{/if}
</pre>
<ul>
       {foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization' name='customizations'}

 
{$customization.quantity}x{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)}{t text=$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value length='28' encode='true'}
               {else}
               {l s='Customization #' mod='blockcart'}{$id_customization|intval}{l s=':' mod='blockcart'}
               {/if}

       {/foreach}
</ul>
<br>   {if !isset($product.attributes_small)}{/if}<br>{/if}<br><br>{if isset($product.attributes_small)}{/if

Link to comment
Share on other sites

Change the above code to:

>
{*{if isset($product.attributes_small)}

   <a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)}" title="{l s='Product detail'}">{$product.attributes_small}
{/if}

<!-- Customizable datas -->
{if isset($customizedDatas.$productId.$productAttributeId)}
   {if !isset($product.attributes_small)}{/if}
</pre>
<ul>
       {foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization' name='customizations'}

 
{$customization.quantity}x{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)}{t text=$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value length='28' encode='true'}
               {else}
               {l s='Customization #' mod='blockcart'}{$id_customization|intval}{l s=':' mod='blockcart'}
               {/if}

       {/foreach}
</ul>
<br>   {if !isset($product.attributes_small)}{/if}<br>{/if}<br><br>{if isset($product.attributes_small)}{/if}*

Link to comment
Share on other sites

Something must have gone wrong when you copied the code. It's working fine on my test site, though I noticed that you will also need to change lines 373-377 of modules/blockcart/ajax-cart.js from:

if (this.hasAttributes)
     content += '' + this.attributes + '';
if (this.hasCustomizedDatas)
   content += ajaxCart.displayNewCustomizedDatas(this);
if (this.hasAttributes) content += '';



to:

/*if (this.hasAttributes)
     content += '' + this.attributes + '';
if (this.hasCustomizedDatas)
   content += ajaxCart.displayNewCustomizedDatas(this);
if (this.hasAttributes) content += '';*/

Link to comment
Share on other sites

Hi rocky, i have the same problem and tried your method with both posts but still white blank screen. When customers click buy a product they get a flash of the cart box before getting directed to the summary (disabled ajax), small matter but slightly annoying

Link to comment
Share on other sites

×
×
  • Create New...