Jump to content

Module PM Multifeatures - View of Product Features with Multiple Values - Coding Problem


sm5k

Recommended Posts

Hi there Prestashop Community,

 

here is my problem and i guess you can help :)

 

I bought the Module PM Multifeatures. Installing and conf. worked great.

Only problem was the view in Frontend. It was like:

 

Feature 1: Value 1

Feature 1: Value 2

Feature 1: Value 3

 

Feature 2: Value 1

Feature 2: Value 2

_________________________________________________

I needed it to be like:

Feature 1: Value 1, Value 2, Value 3

Feature 2: Value 1, Value 2.

_________________________________________________

 

So i asked the developer ---> They gave me a sample for Product.tpl

I used that code in my .tpl and it worked great as id should.

Here is the Code part of that product.tpl

    

{* Multiple Features *}

         {assign var="features" value=Module::getInstanceByName('pm_multiplefeatures')->getFrontFeatures($product->id, ', ')}

         {* /Multiple Features *}

              {foreach from=$features item=feature}

            {if isset($feature.value)}

                  <li><span><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b></span> {$feature.value|escape:'htmlall':'UTF-8'}</li>

            {/if}

         {/foreach}

 

See Screenshot 1: post-715146-0-86336000-1390227819_thumb.png

 

_________________________________________________

So far everything fine. I tryed to do the same on my product-list.tpl

but without any succsess.

 

Here is the Code part of that product-list.tpl

 

{if $product.features}

{* Multiple Features *}

         {assign var="features" value=Module::getInstanceByName('pm_multiplefeatures')->getFrontFeatures($product->id, ', ')}

         {* /Multiple Features *}

{foreach from=$product.features item=feature name=features}

 

<span class="sb_feature"><b>{$feature.name|escape:'htmlall':'UTF-8'}:</b> {$feature.value|escape:'htmlall':'UTF-8'} <br></span>

                       

{/foreach}

 {/if}     

 

See Screenshot 2: post-715146-0-90260400-1390227844_thumb.png

 

_________________________________________________

 

I did several trys but didn`t get it to work as it should.

 

Any of you Mastercoders got an idea where the mistake could be?

 

Thanx in advance.

SM5K

 

 

 

 

 

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