Jump to content

Product features in cart summary - Prestashop 1.7.6.4


grupaperun

Recommended Posts

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

  • 1 month later...
  • 4 months later...
  • 3 weeks later...
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}

 

  • Thanks 3
Link to comment
Share on other sites

  • 1 month later...
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

  • 6 months later...
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

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

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