Answer the question
In order to leave comments, you need to log in
How to correctly assign classes to images in the tpl.msGallery conditional modifier for old_price, new and regular products?
Hello. Help, please, to understand.
We are talking about the tpl.msGallery chunk.
Stuck on the implementation of the NEW and SALE classes, which should be assigned to the main image in the product card. NEW and SALE work, but in the case of a normal product, SALE is displayed again, although it should not. Can you throw in a couple of fresh ideas? The second day I fight.
Here is the code for conditional output modifiers that I use, the last else condition categorically does not want to be executed:
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item">
Answer the question
In order to leave comments, you need to log in
Greetings! To begin with, it is worth writing the then
modifier code in quotes:
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item">
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question