K
K
kickass772021-08-27 18:24:18
opencart
kickass77, 2021-08-27 18:24:18

Why doesn't a simple OpenCart condition work?

Hello.

I'm trying to display my text if there is an installed option in the product card, but the condition does not work to the end.

Version 3.X

{% if option.type == 'file' %}
                      {%if option.required %}
                        <p>Нужно</p>
                      {%else%}
                        <p>Не нужно</p>
                      {% endif %}
                    {% else %}
                        <p>Опция отсутствует</p>
                    {% endif %}


Only the condition for necessary and not necessary is triggered, below - no.
That is, when the option is disabled, the text "Option is missing" should be displayed, but it does not work.

Why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question