Example #1
0
 /**
  *
  */
 public function initContent()
 {
     parent::initContent();
     $module = new now_block_customer_references();
     $this->context->smarty->assign('module_dir', $module->module_uri . 'uploads/');
     $this->context->smarty->assign('nowBlockCustomerReferencesList', NowBlockCustomerReferences::getItems());
     $this->setTemplate('list-customers-references.tpl');
 }
 /**
  * Right Column
  * @param $params
  * @return mixed
  */
 public function hookRightColumn($params)
 {
     if (Configuration::get('NOW_CUST_REFERENCE_ENABLE')) {
         if (Context::getContext()->controller->php_self == 'product') {
             require_once _PS_MODULE_DIR_ . 'now_product_type/classes/NowProductTypeProduct.php';
             $nowProductTypeProduct = NowProductTypeProduct::getObjectByProductId(Tools::getValue('id_product'));
             if (!$nowProductTypeProduct || !Validate::isLoadedObject($nowProductTypeProduct)) {
                 // Si il s'agit d'un type de produit, on n'affiche pas le module
                 return false;
             }
         }
         // Lists of items
         $aItems = NowBlockCustomerReferences::getItems();
         $this->context->smarty->assign(array('module_dir' => $this->module_uri . 'uploads/', 'aItems' => $aItems));
         return $this->context->smarty->fetch($this->module_dir . 'views/templates/hook/footer.tpl');
     }
 }