Smarty 2.6.26

How to add one more condition on OR for another controller? I could not get through (syntax error).

How to add one more condition on OR for another controller? I could not get through (syntax error).

Please try

Please try

Thank you! Happened! But how! I thought that, by the condition 'I', the conditions must be fulfilled simultaneously. Can not more than two controllers be executed right away ?!

Thank you! Happened! But how! I thought that, by the condition 'I', the conditions must be fulfilled simultaneously. Can not more than two controllers be executed right away ?!


No, only one controller can be used according to CS-Cart logic. But each controller can have .pre and .post controllers. Even in these controllers you will have main controller value in the runtime.controller

No, only one controller can be used according to login in CS-Cart. But each controller can have .pre and .post controllers. Even in these controllers you will have main controller value in the runtime.controller

I first used the logical "OR" (||) in the condition {if .....}. That it was carried out at performance of one of conditions. I did not think I needed to use the logical "AND" (&&).

I first used the logical "OR" (||) in the condition {if .....}. That it was carried out at performance of one of conditions. I did not think I needed to use the logical "AND" (&&).


You can also use

{if !($runtime.controller=='checkout' || $runtime.controller=='orders')}

You can also use

{if !($runtime.controller=='checkout' || $runtime.controller=='orders')}

Thank you! It works!

Hello, help me understand. In the override of the template, I create a block with a selectbox:

{__("bc_cloud_storage.save_file")}:
{__("bc_cloud_storage.server")}
{__("bc_cloud_storage.dropbox")}
The variable save_type in the controller file is not defined. I try to get it in PHP to find out what is selected - ($save_type = Registry::get('view')->getTemplateVars('save_type'), but the answer comes empty. So the variable save_type is not automatically created and it should be assigned? Then where in the template or in the controller?

Значит переменная save_type автоматически не создается и ее надо назначить? Тогда где в самом шаблоне или в контроллере?

Не очень понятно, что за переменная save_type. Но скорее всего она не определена в контроллере

Tygh::$app['view']->assign('save_type', $save_type);

Переменная save_type нигде не определена. Мне она нужна только для того, чтоб узнать что выбрали dropbox. Как мне это сделать? Нужно определить её в шаблоне через {assign var="save_type" value=0}?

Переменную save_type я употребил в