Jump to content

feature logo ?


ricsavoy

Recommended Posts

at the moment feature like that in prestashop doesnt exist

all what we can do is a modificaiton of product.tpl file

 

in features foreach loop you just have to check value of feature, and based on that - display image instead of value :-)

 

you can do it with {if} condition

Link to comment
Share on other sites

in product.tpl file there i a code like:

						{if isset($feature.value)}
						<td>{$feature.name|escape:'html':'UTF-8'}</td>
						<td>{$feature.value|escape:'html':'UTF-8'}</td>
						{/if}

you can change it to (for example)

						{if isset($feature.value)}
                        {if $feature.name=="size" && $feature.value=="120"}
                        <img src="http://thisis.my/image/for/120/value.jpg"/>
                        {elseif $feature.name=="size" && $feature.value=="180"}
                        <img src="http://thisis.my/image/for/180/value.jpg"/>
                        {else}
						<td>{$feature.name|escape:'html':'UTF-8'}</td>
						<td>{$feature.value|escape:'html':'UTF-8'}</td>
						{/if}

as you can see with if condition i checked:

- name of feature

- value of feature

 

depending on that i display image with <img> code

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