Jump to content

How to show only one attribute in the product list ?


D.Mahe

Recommended Posts

Hello all,
I need help to change something in the product list.
I have several attributes displayed just below the picture of the product when i hover on a product (Size, color, Composition).
But i only want to show the Size (screenshot below)

image.png.0ece7894abd606c60c5627e4addd7aa8.png

How can i get rid of the other attributes without deleting them in the back office ?

EDIT :
In product-list.tpl i have this :

<div class="button-container">
						{* Added for attributes *}
						{if $product.combinations}
						<div class="att_list" style="display:block;">
							<fieldset>
							<ul>
								{foreach from=$product.combinations.values key=id_product_attribute item=combination}
									{if $combination.unit_impact}
										<li>{$combination.attributes_names|escape:'html':'UTF-8'}</li>
									{else}
										<li class="strikethrough">{$combination.attributes_names|escape:'html':'UTF-8'}</li>
									{/if}
								{/foreach}
							</ul>
						</div>

I guess i have to change the combination.attributes_names to show only the one attribute I want but i dont' know how.
Thanks for any help,

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