tatamimi Posted June 17, 2014 Share Posted June 17, 2014 (edited) Hello!I'm looking for to the way to show the id (or something else) of features value.( To show specific icon which depends on the features value by CSS). If someone know good idea, please help me! Thank you in advance. Edited June 19, 2014 by tatamimi (see edit history) Link to comment Share on other sites More sharing options...
tatamimi Posted June 17, 2014 Author Share Posted June 17, 2014 If there is no way, I'll add another features type for identify the icon type. But if there is the way to show the feature's value in text and show the specific id(or something) at the same time, it's more simple... <span class="icon_featuresvalue_id">{$feature.value|escape:'html':'UTF-8'}</span> Link to comment Share on other sites More sharing options...
PSfever.com Posted June 17, 2014 Share Posted June 17, 2014 Have you tried this? {$feature.id_feature|escape:'html':'UTF-8} 1 Link to comment Share on other sites More sharing options...
tatamimi Posted June 17, 2014 Author Share Posted June 17, 2014 Dear PSfever.com. Thank you so much for your reply very rapid!I tried that code but that display the id of feature type, not the value's id... Anyway thank you for your help. Link to comment Share on other sites More sharing options...
PSfever.com Posted June 17, 2014 Share Posted June 17, 2014 Oh, sorry, my bad -misunderstood... How about this? {$feature.id_feature_value|escape:'html':'UTF-8} 2 Link to comment Share on other sites More sharing options...
vekia Posted June 17, 2014 Share Posted June 17, 2014 and if you want to display icon depending on id of value you can use something like: {if $feature.id_feature_value==3} <img src="myimagehere.gif" /> {/if} 1 Link to comment Share on other sites More sharing options...
tatamimi Posted June 18, 2014 Author Share Posted June 18, 2014 (edited) Thank you again PSfever.com and vekia (It is also good idea to show icons)I tested like this {if isset($features) && $features} feature's value :{$feature.value|escape:'html':'UTF-8'} value's id : {$feature.id_feature_value|escape:'html':'UTF-8'} {/if} It shows "feature's value" only, "value's id" is not shown...Is there something wrong? Edited June 18, 2014 by tatamimi (see edit history) Link to comment Share on other sites More sharing options...
PSfever.com Posted June 18, 2014 Share Posted June 18, 2014 Thank you again PSfever.com and vekia (It is also good idea to show icons) I tested like this {if isset($features) && $features} feature's value :{$feature.value|escape:'html':'UTF-8'} value's id : {$feature.id_feature_value|escape:'html':'UTF-8'} {/if} It shows "feature's value" only, "value's id" is not shown... Is there something wrong? That's odd, what version of PS are you using? 1 Link to comment Share on other sites More sharing options...
vekia Posted June 18, 2014 Share Posted June 18, 2014 i checked it in prestashop 1.6 at the moment there are 3 variables: name, value, id_feature unfortunately, id of feature value doesnt exist. you can check name variable for example: {if $feature.id_feature ==5 && $feature.value=="valueName"} do something {/if} at the moment (without touching controllers) this is one possible way to achieve it. 4 Link to comment Share on other sites More sharing options...
tatamimi Posted June 19, 2014 Author Share Posted June 19, 2014 Thank you again and again PSfever.com and vekia!I use version 1.6.0.6.OK, I understand that there is no way to show id of feature value in 1.6...The way which vekia says is much more useful than add another feature type for only show the icon. Thank you a lot! Link to comment Share on other sites More sharing options...
Recommended Posts