Jump to content

Modules complémentaires s'affichant dans le bloc MyAccount


Recommended Posts

Bonjour tous,

Je ne sais pas si on peut vraiment appeler ça un bug, mais je vous explique tout de même :
J'utilise 3 modules : blockmyaccount (bloc mon compte dans la colonne gauche ou droite, referralprogram (parrainage) et wishlist (liste de cadeaux)

Quand je suis sur la page Mon Compte (my-account.php), dans le blockmyaccount, j'ai bien les liens vers Parrainage et Liste de cadeaux, jusqu'ici tout va bien ;)

Mais dès que je suis sur une autre page, les liens vers Parrainage et Liste de cadeaux disparaissent!

J'ai trouvé une solution à ça (je ne sais pas si c'est la meilleure, mais elle a le mérite de fonctionner :P)

J'ai modifié le fichier header.php, qui est à l'origine comme ceci dans la V1.1 :

...
$smarty->assign(array(
   'HOOK_HEADER' => Module::hookExec('header'),
   'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),
   'HOOK_TOP' => Module::hookExec('top'),
   'static_token' => Tools::getToken(false),
   'token' => Tools::getToken(),
   'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,
   'content_only' => intval(Tools::getValue('content_only')));
...



Et j'ai ajouté la dernière ligne que vous pouvez voir ici :

...
$smarty->assign(array(
   'HOOK_HEADER' => Module::hookExec('header'),
   'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),
   'HOOK_TOP' => Module::hookExec('top'),
   'static_token' => Tools::getToken(false),
   'token' => Tools::getToken(),
   'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,
   'content_only' => intval(Tools::getValue('content_only')),
   'HOOK_CUSTOMER_ACCOUNT' => Module::hookExec('customerAccount')));
...



Si ça peut en aider certains^^ Je suis aussi ouvert a toute remarque/conseil/insulte/autre^^
Benoth

Link to comment
Share on other sites

Ezact!
Manquerai un petit test isLogged, je vais regarder ça :P

[EDIT]
Voilà avec le test qui va bien ;)

...
$smarty->assign(array(
   'HOOK_HEADER' => Module::hookExec('header'),
   'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),
   'HOOK_TOP' => Module::hookExec('top'),
   'static_token' => Tools::getToken(false),
   'token' => Tools::getToken(),
   'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,
   'content_only' => intval(Tools::getValue('content_only'))));

if ($cookie->isLogged())
   $smarty->assign('HOOK_CUSTOMER_ACCOUNT', Module::hookExec('customerAccount'));
...

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