domdas Posted August 16, 2009 Share Posted August 16, 2009 Bonjour,Je rencontre un problème pour faire pointer 2 liens vers la page principale de mon module :- un dans le module blockmyaccount- un dans la page myaccountVoici la partie du code de ma page uploadftp.php : function install() { if(!parent::install() OR !$this->registerHook('customerAccount') OR !$this->registerHook('myAccountBlock')) return false; return true; } function hookCustomerAccount($params) { global $smarty; $smarty->assign('this_path', $this->_path); return $this->display(__FILE__, 'myaccount_page.tpl'); } function hookMyAccountBlock($params) { global $smarty; $smarty->assign('this_path', $this->_path); return $this->display(__FILE__, 'blockmyaccount_page.tpl'); } public function displayFrontForm() { global $smarty; $error = false; $confirm = false; if (isset($_POST['submitUploadftp'])) { //Instructions... } return $this->display(__FILE__, 'uploadftp.tpl'); } Si je laisse les 2 hook, je n'arrive pas à afficher ma page uploadftp.tpl, si je supprime le hook myAccountBlock, ma page s'affiche !!! Pourquoi ?J'aimerais bien comprendre et surtout ne pas être obligé de modifier le code du module blockmyaccount.Merci pour votre aide. Link to comment Share on other sites More sharing options...
Julien Breux Posted August 17, 2009 Share Posted August 17, 2009 Edit, j'ai écris des bêtises ! Link to comment Share on other sites More sharing options...
ningu Posted August 18, 2009 Share Posted August 18, 2009 N'aurais-tu pas une erreur de syntaxe dans le fichier *.tpl du block ? Link to comment Share on other sites More sharing options...
domdas Posted August 18, 2009 Author Share Posted August 18, 2009 Voici le code de blockmyaccount.tpl tel qu'il a été publié, je n'ai rien modifié. <!-- Block myaccount module --> {l s='My account' mod='blockmyaccount'} {l s='My orders' mod='blockmyaccount'} {if $returnAllowed} {l s='My merchandise returns' mod='blockmyaccount'} {/if} {l s='My credit slips' mod='blockmyaccount'} {l s='My addresses' mod='blockmyaccount'} {l s='My personal info' mod='blockmyaccount'} {if $voucherAllowed} {l s='My vouchers' mod='blockmyaccount'} {/if} {$HOOK_BLOCK_MY_ACCOUNT} {l s='Sign out' mod='blockmyaccount'} <!-- /Block myaccount module --> Link to comment Share on other sites More sharing options...
ningu Posted August 18, 2009 Share Posted August 18, 2009 Je pensais à une possible erreur de syntaxe dans l'un de tes fichiers blockmyaccount_page.tpl ou myaccount_page.tpl Link to comment Share on other sites More sharing options...
domdas Posted August 18, 2009 Author Share Posted August 18, 2009 Pour myaccount_page : {l s='Upload file FTP' mod='uploadftp'} Pour blockmyaccount_page : {l s='Upload file FTP' mod='uploadftp'} Dans les 2 cas, rien ne s'affiche. Si je supprime le hook blockmyaccount_page, ça fonctionne... bizarre, non !? Link to comment Share on other sites More sharing options...
ningu Posted August 18, 2009 Share Posted August 18, 2009 Ca parait correct.Peux-tu essayer en supprimant l'utilisation du {$this_path} dans tes tpl et prendre la même definiton que les tpl standards ({this_path_ssl}module/...) Link to comment Share on other sites More sharing options...
domdas Posted August 19, 2009 Author Share Posted August 19, 2009 Je viens de tester cela ne change rien.Je crois bien qu'il y a un problème avec {$HOOK_BLOCK_MY_ACCOUNT} et {$HOOK_CUSTOMER_ACCOUNT} ensemble !?Tans pis je ne vois pas d'autre solution que de coder directement le lien dans blockmyaccount.tplMerci quand même. 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