public function hookExtraRight($params) { global $smarty; $id_product = Tools::getValue('id_product'); if (is_numeric($id_product)) { $product = new Product(intval($id_product)); if (Validate::isLoadedObject($product)) { $points = LoyaltyModule::getNbPointsByProduct($product); $smarty->assign(array('points' => $points, 'voucher' => LoyaltyModule::getVoucherValue($points))); return $this->display(__FILE__, 'product.tpl'); } } return false; }