Question

I modified a little bit the category-list.tpl for make it look as i wanted to.

The problem comes when I switch to different languages, since it changes the category name but not the product name.

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}

Ignoring some part of the first code. This is what 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}

What's the point? Why categories translate and not the products?

Thanks in advance

Was it helpful?

Solution

Solved it.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top