Answers for "prestashop add variables to view"

PHP
0

prestashop add variables to view

<?php
    public function hookDisplayLeftColumn($params)
    {
        $this->context->smarty->assign([
            'my_module_name' => Configuration::get('MYMODULE_NAME'),
           
        ]);

        return $this->display(__FILE__, 'mymodule.tpl');
    }

    ?>
 
<!-- Inside smarty or twig file -->
     {if isset($my_module_name) && $my_module_name}
          {$my_module_name}
     {else}
           World
     {/if}
Posted by: Guest on August-07-2021

Code answers related to "prestashop add variables to view"

Browse Popular Code Answers by Language