grupaperun Posted July 18, 2020 Share Posted July 18, 2020 Hey guys, any idea how to display product features in cart summary? {foreach from=$product.grouped_features item=feature} <dt class="name {$feature.name}"><span>{$feature.name}</span></dt> <dd class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</dd> {/foreach} Above code works only in product lists. In cart summary it returns nothing. I would like to add features here: /themes/classic/templates/checkout/_partials/cart-detailed-product-line.tpl Anyone can help? Link to comment Share on other sites More sharing options...
Pioupial Posted August 24, 2020 Share Posted August 24, 2020 Hello, I have the same problem to display features in the file cart-detailed-product-line.tpl. Thanks Link to comment Share on other sites More sharing options...
Jonathan Goetz Posted January 19, 2021 Share Posted January 19, 2021 Hi, Same Here, did you find an answer ? Link to comment Share on other sites More sharing options...
_Sergiy_ Posted February 5, 2021 Share Posted February 5, 2021 On 1/19/2021 at 7:49 PM, Jonathan Goetz said: Hi, Same Here, did you find an answer ? Try this: {assign var=features value=Product::getFrontFeaturesStatic($language.id,$product.id)} {foreach from=$features item=feat} {$feat.name} : {$feat.value} <br> {/foreach} 3 Link to comment Share on other sites More sharing options...
grupaperun Posted March 8, 2021 Author Share Posted March 8, 2021 On 2/5/2021 at 1:35 PM, _Sergiy_ said: Try this: {assign var=features value=Product::getFrontFeaturesStatic($language.id,$product.id)} {foreach from=$features item=feat} {$feat.name} : {$feat.value} <br> {/foreach} Works perfectly. Thank You! Link to comment Share on other sites More sharing options...
Borgas Posted September 27, 2021 Share Posted September 27, 2021 On 2/5/2021 at 12:35 PM, _Sergiy_ said: Try this: {assign var=features value=Product::getFrontFeaturesStatic($language.id,$product.id)} {foreach from=$features item=feat} {$feat.name} : {$feat.value} <br> {/foreach} Works great in 1.7.6 Is there a way to filter by id the feature? {if $feature.id_feature == 1 OR $feature.id_feature == 10 OR $feature.id_feature == 20 } This doens´t work in checkout, only in product pages Link to comment Share on other sites More sharing options...
hobek Posted October 2, 2021 Share Posted October 2, 2021 On 9/27/2021 at 5:43 PM, Borgas said: Works great in 1.7.6 Is there a way to filter by id the feature? {if $feature.id_feature == 1 OR $feature.id_feature == 10 OR $feature.id_feature == 20 } This doens´t work in checkout, only in product pages Try this: {assign var=features value=Product::getFrontFeaturesStatic($language.id,$product.id)} {foreach from=$features item=feature} {if $feature.id_feature == 1 OR $feature.id_feature == 10 OR $feature.id_feature == 20 } ........................... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now