Prestashop - 1.4 Guia do Utilizador Página 16

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 15
PrestaShop automatically creates a small config.xml file in the module's
folder, which stores a few configuration information. You should NEVER
edit it by hand.
On installation, PrestaShop also adds a line to the ps_module SQL table.
Hooking a module
Displaying data, starting a process at a specific time: in order for a
module to be "attached" to a location on the front-office or the back-
office, you need to give it access to one of the many PrestaShop hooks,
described earlier in this guide.
To that effect, we are going to change your module's code, and add these
lines:
mymodule.php (partial)
public function install()
{
if ( parent::install() == false OR !$this->registerHook( 'leftColumn' ) )
return false;
return true;
}
...
public function hookLeftColumn( $params )
{
global $smarty;
return $this->display( __FILE__, 'mymodule.tpl' );
}
public function hookRightColumn( $params )
{
return $this->hookLeftColumn( $params );
}
Let's explore these new or changed lines.
Vista de página 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 35 36

Comentários a estes Manuais

Sem comentários