When the module is included in the contents of the left and right panel, so I want to hide javascript code in OpenCart

I have a little javascript code in the featured.tpl OpenCart module. So when, the module is included, included in the top and bottom of the content. therefore, I want to show (run) javascript code. but when Enabled is enabled in the left and right content pane. so i want to hide (not run) javascript code.

Please notify me :)

0
source share
1 answer

I have found a solution.

in the .tpl file

<?php if ($module['position'] == 'content_bottom' || $module['position'] == 'content_top') { ?> //add your code Here <?php } ?> 

add .php file

 $this->data['module'] = $setting; 
0
source

Source: https://habr.com/ru/post/1209648/


All Articles