tomek003 Posted May 13, 2017 Share Posted May 13, 2017 (edited) Witam. Sposób vekia z tej strony https://mypresta.eu/en/art/developer/tags-on-product-page.html działa również w Presta 1.7.1.1 Tylko mam jeden problem. Wyświetla razem tagi ze wszystkich wersji językowych produktu. Czyli w jednej linii na np. produkcie polskim mam tagi polskie, niemieckie i angielskie. Czy jest możliwość zmiany tego kodu tak aby tagi grupował pod względem wersji językowej? Tak żeby na wersji polskiej wyświetlały się tylko tagi polskie (wpisane w polskiej wersji produktu), na wersji niemieckiej tylko niemieckie słowa itd. Edited May 13, 2017 by tomek003 (see edit history) Link to comment Share on other sites More sharing options...
atomek Posted May 13, 2017 Share Posted May 13, 2017 spróbuj w ten sposób: {assign var='id_lang' value=Context::getContext()->language->id} {foreach from=Tag::getProductTags(Tools::getValue('id_product')) key=k item=v} {if $k == $id_lang} {foreach from=$v item=value} <li><a href="{$link->getPageLink('search', true, NULL, "tag={$value|urlencode}")}">{$value|escape:html:'UTF-8'}</a></li> {/foreach} {/if} {/foreach} Link to comment Share on other sites More sharing options...
tomek003 Posted May 13, 2017 Author Share Posted May 13, 2017 Dziękuję Działa Sprawdzałem pod ver 1.7.1.1 Cały kod wygląda tak <ul class="producttags"> {assign var='id_lang' value=Context::getContext()->language->id} {foreach from=Tag::getProductTags(Tools::getValue('id_product')) key=k item=v} {if $k == $id_lang} {foreach from=$v item=value} <li><a href="{$link->getPageLink('search', true, NULL, "tag={$value|urlencode}")}">{$value|escape:html:'UTF-8'}</a></li> {/foreach} {/if} {/foreach} </ul> class="producttags" dodany do theme.css Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now