Sivo Posted March 31, 2014 Share Posted March 31, 2014 (edited) I made my own product-list.tpl Seems like it works perfectly, but as long as I want to add two languages, it only translates the categories, not the product. Full code: {if isset($products)} <!-- Products list --> <div class="wrapper" itemscope itemtype="http://schema.org/EducationEvent"> <ul class="accordion"> <li class="nav-dropdown"> <input type="radio" name="accordion" id="{$subcategory.name}" /> <label for="{$subcategory.name}"> <span class="subcat"><h1>{$subcategory.name}</h1></span> <span class="descsubcat">{$subcategory.description|truncate:250:'...'}</span> <br /> </label> <div class="cursos"> {foreach from=$products item=product name=products} {if $products != ''} <div class="float_left"> <div itemprop="name" class="titcurs"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name}"><h2>{$product.name|escape:'htmlall':'UTF-8'}</a></h2></div> <div itemprop="description"><p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:600:'...'}</a></p></div> </div> {/if} {/foreach} </li> </ul> </div> {/if} The important one (wich displays the product): {foreach from=$products item=product name=products} {if $products != ''} <div class="float_left"> <div itemprop="name" class="titcurs"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name}"><h2>{$product.name|escape:'htmlall':'UTF-8'}</a></h2></div> <div itemprop="description"><p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:600:'...'}</a></p></div> </div> {/if} {/foreach} Maybe am I missing something? Thanks in advance! EDIT SOLUTION: on Category.tpl i had a line with the following parameters: {include file="./product-list-cat.tpl" products=$subcategory_object->getProducts('1','1','100')} and I had to replace it for: {include file="./product-list-cat.tpl" products=$subcategory_object->getProducts($cart->id_lang,'1','100')} Just modified: getProducts('1','1','100') for getProducts($cart->id_lang,'1','100') So it makes the product display as multilanguage. Edited March 31, 2014 by Sivo (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts