Jump to content

Product feature


teralite

Recommended Posts

Hi all!

 

i want to be able to add an image to the product->features. So if i add a feature then connect it to an image so it can display both the image and the text of the feature.

 

Is this possible to do?

 

Also, i have now added an image manually to each feature by this code:

 

 

{if isset($product.features)}
                <div class="features">
                        {foreach from=$product.features item=feature name=pr_features}
                       
                 
                    {if $feature.id_feature == 1}<span id="diameter" title="Diameter: {$feature.value}"></span><span id="feature_text">{$feature.value}</span> {/if}
                        
                    {if $feature.id_feature == 2}<span id="håltagning" title="Håltagning: {$feature.value}"></span><span id="feature_text">{$feature.value}</span> {/if}
                        
                    {if $feature.id_feature == 3}<span id="ipklass" title="IPklass: {$feature.value}"></span><span id="feature_text">{$feature.value}</span> {/if}

 

Since im a beginner at this, i want to ask if there is any better way to write this code?

I also have trouble in the display, i would like to show them with 3 in each row, and depending on which feature we have added text and image to, it should be displayed.

 

For example:

i have 17 features, i add 3 to a specific product and want to show those 3 on this product. I add 5 other features to next product and then want them to be showed with this product. Is this possible to do?

 

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