Advertisement
creacom

prestashop specific

Nov 21st, 2011
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. //in my module php page
  2.  
  3. function hookMySoldoutModule {
  4. global $link, $smarty, $cookie;
  5. $smarty->assign(array(
  6. 'mysoldoutvar' => $cms_titles
  7. ));
  8. return $this->display(__FILE__, 'mysoldoutmodule.tpl');
  9. }
  10.  
  11. //I registered my hook, hooked it in admin, added it in FrontController.php
  12. ...
  13. self::$smarty->assign(array(
  14. ...
  15. 'HOOK_MYSOLDOUTMODULE' => Module::hookExec('mysoldoutmodule')
  16. )};
  17.  
  18. //and i want to have a link to display it only on ONE page
  19. <a href="WhatCouldBeTheLink">See all soldout products</a>
  20.  
  21. //And the display
  22. in header.tpl
  23. ...
  24. <!-- Center -->
  25. <div id="center_column">
  26. {if WhatTestCouldISet to display my module only on the specific link )
  27. {HOOK_MYSOLDOUTMODULE}
  28. {else}
  29. //display the standard code
  30. {/if}
  31.  
  32. //I need to know WhatCouldBeTheLink and WhatTestCouldISet
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement