V
V
Valery Vitalievich2020-03-02 17:04:31
opencart
Valery Vitalievich, 2020-03-02 17:04:31

How to make the layout in Opencart adapt correctly?

There is such a design:

<?php if ($column_left && $column_right) { ?>
<?php $class = 'col-sm-6'; ?>
<?php } elseif ($column_left || $column_right) { ?>
<?php $class = 'col-sm-9'; ?>
<?php } else { ?>
<?php $class = 'col-sm-12'; ?>
<?php } ?>

It's not clear why it doesn't work. Always sets the block width to col-sm-9
Can someone tell me where to dig? I will be very grateful

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
liza2019, 2020-03-03
@valera_91

try changing this line
<?php } elseif ($column_left || $column_right) { ?>
like this
<?php } elseif (($column_left and !$column_right) || ($column_right and !$column_left)) { ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question