Jump to content

[solved] How to hide a single product feature from product-list.tpl and product.tpl


Recommended Posts

Hi Community,

 

i need to hide a single product feature from beeing showed in the frontend of product list and product detail.

 

Tryed to ask google and find some topics here before but didn`t get it.

 

Anybody did that before ore knows how to fix it?

 

Greetz and Thank you.

 

SM5K

 

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

  • 2 months later...

HERE WE GO:

THIS IS HOW IT COULD BE DONE:

 

{foreach from=$features item=feature}

{* Feature ausschluss - SM5K *}
    {if $feature.name == "Epoche" or $feature.name == "Artikelstatus" }
    <span style="display:none;"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'}  <br></span>
    
    {else}
    <span class="sb_feature_sum"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'}  <br></span>
{/if}
{*/ Feature ausschluss - SM5K *}

{/foreach}
{/if}     

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

HERE WE GO:

THIS IS HOW IT COULD BE DONE:

 

{foreach from=$features item=feature}

 

{* Feature ausschluss - SM5K *}

    {if $feature.name == "Epoche" or $feature.name == "Artikelstatus" }

    <span style="display:none;"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'}  <br></span>

    

    {else}

    <span class="sb_feature_sum"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'}  <br></span>

{/if}

{*/ Feature ausschluss - SM5K *}

 

{/foreach}

{/if}     

Thank you VERY MUCH. That helped a lot with my shop. Just few tweaks for template and works like a charm!

Link to comment
Share on other sites

  • 8 months later...
  • 1 year later...

HERE WE GO:

THIS IS HOW IT COULD BE DONE:

 

{foreach from=$features item=feature}

 

{* Feature ausschluss - SM5K *}

    {if $feature.name == "Epoche" or $feature.name == "Artikelstatus" }

    <span style="display:none;"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'}  <br></span>

    

    {else}

    <span class="sb_feature_sum"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'}  <br></span>

{/if}

{*/ Feature ausschluss - SM5K *}

 

{/foreach}

{/if}     

Hi, I'm trying to implement this on prestashop 1.6 within the datasheet table that shows the features. However for some reason ti doesnt seem to work. Can you help?

See below the original code:

 

<!-- Data sheet -->
			<section class="page-product-box">
				
				<table class="table-data-sheet">
					{foreach from=$features item=feature}
					
                     
                    
                    <tr class="{cycle values="odd,even"}">
						 {if isset($feature.value)}
                        
                       			
                        
											<td>{$feature.name|escape:'html':'UTF-8'}</td>
											<td>{$feature.value|escape:'html':'UTF-8'}</td>
                        				
						                    
								 {/if}
                  
                       
					</tr>
					{/foreach}
				</table>
			</section>
			<!--end Data sheet -->
            
Link to comment
Share on other sites

×
×
  • Create New...