Jump to content

Output product features in PHP?


Pentarou

Recommended Posts

Hello,

How do I output a particular product feature value, using ID in a PHP file, so that it appears on the product page?

A little background. I am using widgets with crazy elements and need to output a product feature value between two widgets within the same widget group. If I use custom code from the tpl file to call product featue value by ID, the whole code will be output as text, therefore it must be in PHP.

Link to comment
Share on other sites

This is the custom code I'm using in my template file, but I have no idea how to output it in PHP.

{block name='product_features'}
	{if $product.features}
		<div class="hmt-huidtype">
			{if $feature.id_feature == 4}
				{$feature.value}
			{/if}        
		</div>
	{/if}
{/block}

 

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