Jump to content

[SOLVED] Hide Product Features


Nicolas Lecloux

Recommended Posts

Hi guys, i need some help.

 

What i want to do:

 

I have some product features that i want to add in the Layered navigation block but because their descriptions are too long and it doesn't look nice i want to create a second feature with only a Yes or No description.

The second one is the one that i want to hide completely from the product.

 

Features example:

 

Washing Machine : Capacity: 9 kg - Spin speed: 1600 rpm - Quick wash time: 30 minutes - Energy rating: A+++

Washing Machine : Yes <<-- I want to hide this in the product

 

If there is another way for the Layered navigation block to

search by displaying if the there is any kind of value in the washing machine feature work for me too. But as far as i know it will display the exact value of the feature.

 

I hope that there is a solution to my problem.

 

 

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

I found the solution by editing the product.tpl and adding the if statement after the foreach

<section class="page-product-box">
				<h3 class="page-product-heading">{l s='Data sheet'}</h3>
				<table class="table-data-sheet">
					{foreach from=$features item=feature}
					{if ($feature.name !='the_name_of_the_feature') && ($feature.name !='the_name_of_the_feature2')}
					<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}
					{/if}	
					</tr>
					{/foreach}
				</table>
			</section>
Edited by Nicolas Lecloux (see edit history)
Link to comment
Share on other sites

hello

thank you for posting solution

im going to mark this topic as solved

 

with regards,

Milos

 

 

 

 

[sOLVED] Topic
If, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution.
Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED].

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.
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...