Jean Gangolf Posted July 3, 2020 Share Posted July 3, 2020 (edited) Hello I would be glad to get your help. Problem: in product-images-modal.tpl I'd like a text appearing under the product image, depending on the language in which the browser (shop) is instantly shown. To do so, I changed the "original standard" block: {block name='product_description_short'} <div id="product-description-short" itemprop="description">{$product.description_short nofilter}</div> {/block} into my own (example): {block name='product_description_short'} {if $current_language.iso_code == 'de'} {$good} {else} {$bad} {/if} {/block} where id_lang or iso_code = German. in the header, the two variables and their values have been assigned. No matter the language code is as shown, or (p.ex.) $current_language.id_lang == '1' the result is always the same. It is ignored and the "else" value is given. So I think that the "if" request is correct. But I don't have the right variable to determine the instantly used language? Thanks in advance for any help! Jean G. PS. my block is standing alone in an "override" theme... Edited July 3, 2020 by Jean Gangolf correections... (see edit history) Link to comment Share on other sites More sharing options...
Jean Gangolf Posted July 6, 2020 Author Share Posted July 6, 2020 Solved!! While trying (to?) many possibilities I was getting blind! Leaving aside the current brought the wanted effect! So now everything works fine! 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