Jump to content

affichage dans la commande des infos de la base de donnée


Recommended Posts

Bonjour,

j'esseille en vain d'afficher les resultat de ma base dans la commande du client cote admin pouvez vous m'aider.

Je vous joint le code Hookadminorder.

public function isModulepaymentOrder($id_order,$ref,$etat)
   {
       $db = Db::getInstance();
       $result = $db->getRow('
           SELECT * FROM `'._DB_PREFIX_.'order_modulepay`
           WHERE `id_order` = "'.$id_order.'"');

       return  intval($result["id_order"]) != 0 ? true : false;
       return  intval($result["ref"]) != 0 ? true : false;
       return  intval($result["etat"]) != 0 ? true : false;

   }



   function hookAdminOrder($params)
   {
       $id_order = $params['id'];
       $ref = $params['ref'];
       $etat = $params['etat'];
       if($this->isModulepaymentOrder($id_order,$ref,$etat))
       {

           global $smarty;
           $smarty->assign(array(
               'id_order'            => $id_order,
               'ref'        => $this->ref,
               'etat'        => $this->etat,
               'this_page'            => $_SERVER['REQUEST_URI'],
               'this_path'         => $this->_path,
               'this_path_ssl'     => Configuration::get('PS_FO_PROTOCOL').$_SERVER['HTTP_HOST'].__PS_BASE_URI__."modules/{$this->name}/"));
           return $this->display(__FILE__, 'modulepayment_info.tpl');
       }
       else
           return "";
   }



Merci pour votre aide

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...