Jump to content

Get/show/display product combination/atribute price in product.tpl


Recommended Posts

Hello,

 

Little help needed with smarty and prestashop. I just need to show price near my product combinations. For example i have Size radio buttons.

 

I would like to show in product.tpl like this

http://gyazo.com/b691004040a4a5d79335cd15999a2224

 

100ml - 100 eur

50ml - 70 eur

 

{convertPrice price=$group_attribute.price} This gets me some nocences.

 

These prices should be shown with reductions ect. So i think i need to get right sytax for smarty in foreach loop.

 

{foreach from=$group.attributes key=id_attribute item=group_attribute}
<li>
<input type="radio" class="attribute_radio" name="{$groupName}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();" />
<span>{$group_attribute|escape:'html':'UTF-8'} - {convertPrice price=$group_attribute.price}</span>
</li>
{/foreach}

Do i need to change controler and bring the prices some how?

 

I would be verry thankfull for the help.

 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...