Jump to content

id_customer, come si recupera dai cookie?


moscariellop

Recommended Posts

Salve a tutti,
avrei bisogno di far apparire in un nuovo modulo, partendo dalla base di un semplice "Hello worl!", l'id_customer del cliente loggato. Ho spulciato diverse pagine a riguardo ma non riesco a venirne a capo!

Di seguito mi spiego meglio

- Prestashop 1.3.6

- Modulo hello world

<?php 

class blockfirstmodule extends Module {

   function __construct()
   {
       $this->name = "blockfirstmodule";
       $this->tab = 'Tab Name';
       $this->version = '0.1.0';
       parent::__construct();
       $this->displayName = $this->l('Our First PS Module');
       $this->description = $this->l('We have created a simple PS Module.');
   }

   function install()
   {
      if (!parent::install()
          OR !$this->registerHook('rightColumn')
          OR !$this->registerHook('leftColumn'))
               return false;
       return true;    
   }

   public function hookLeftColumn($params)    
   {
       echo "Hello World!";
   }

   public function hookRightColumn($params)
   {
       return $this->hookLeftColumn($params);
   }

   function uninstal()
   {
       if (!parent::uninstall())
           return false;
       return true;
   }

}
?>





- come recupero l'id_customer del cliente loggato per stamparlo a video in



public function hookLeftColumn($params)    
   {
       echo "Hello World!";
   }



Grazie a tutti per l'aiuto!

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...