Glowned Posted August 12, 2014 Share Posted August 12, 2014 Hello, I started to develop a module for my 1.6 prestashop website The installation didn't fail, i put the module in the right hook but.. The module doesn't display the TPL File associated with the hook . :/ here is my code: <?php if (!defined('_PS_VERSION_')) exit; class CarteBancaire extends Module { public function __construct() { $this->name = 'cartebancaire'; $this->tab = 'perso'; $this->version = '1.0'; $this->author = 'Adrien QUINT'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.6'); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Carte Bancaire -B\' COMM'); $this->description = $this->l('Module B\'Comm de paiement par carte bancaire'); $this->confirmUninstall = $this->l('etes-vous sur(e)? vous ne pourrez-plus payer par carte bancaire !!'); if (!Configuration::get('CARTEBANCAIRE_NAME')) $this->warning = $this->l('Pas de nom defini'); } public function install() { if (!parent::install() || !$this->registerHook('payment')) return false; return true; } public function hookPayment($params) { return $this->display(__FILE__, 'cartebancaire.tpl'); } } but, the file : /modules/cartebancaire/views/templates/hook/cartebancaire.tplexists! i'm lost :/Thanks in advance ! Link to comment Share on other sites More sharing options...
vekia Posted August 12, 2014 Share Posted August 12, 2014 maybe im blind but i don't see there function hookdisplayRightColumn (as you stated that you added module to right hook - you mean right column ? ) Link to comment Share on other sites More sharing options...
Glowned Posted August 12, 2014 Author Share Posted August 12, 2014 Hi Vekia,Sorry for my bad French English ^^' . By saying "The right hook" i want to say "The good one" Indeed, the hook where i want the module to be implemented is "Payment" Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2014 Share Posted August 13, 2014 your payment module is enabled under modules > payment you will see there a several forms with checkboxes, your module must be ticked for currencies, countries and also for customer groups 1 Link to comment Share on other sites More sharing options...
Glowned Posted August 13, 2014 Author Share Posted August 13, 2014 Yeah ! This is it ! I had to put the module in payment_gateway like this : $this->tab = 'payments_gateways'; and set : $this->currencies = true; $this->currencies_mode = 'checkbox'; Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now