Advertisement
creacom

try2 for prestashop

Nov 21st, 2011
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. //1) My module is emptystockproducts
  2.  
  3. //2) my main admin page : emptystockproducts.php
  4.  
  5. class EmptyStockProducts extends Module
  6. {
  7. ...
  8. //array for display
  9. public function getEmptyStockProducts($id_lang, $id_category = true)
  10. {
  11.  
  12. return $myarray;
  13. }
  14. }
  15.  
  16. //3) My display page in the /module/emptystockproducts/
  17. named : displayemptystockproducts.php
  18.  
  19. <?php
  20. include_once(dirname(__FILE__).'/../../config/config.inc.php');
  21. include_once(dirname(__FILE__).'../../../init.php');
  22. include_once(dirname(__FILE__).'/emptystockproducts.php');
  23.  
  24. include_once(dirname(__FILE__).'/../../header.php');
  25. global $link, $smarty, $cookie;
  26. $smarty->assign(array(
  27. 'emptystockproducts' => EmptyStockProducts::getEmptyStockProducts((int)($cookie->id_lang), false)
  28. ));
  29. $smarty->display(dirname(__FILE__).'/emptystockproducts.tpl');
  30. include_once(dirname(__FILE__).'/../../footer.php');
  31.  
  32.  
  33. //4) and in my footer.tpl i set a link to /modules/emptystockproducts/displayemptystockproducts.php
  34.  
  35. But it doesn't work : i can't access to the class ( fatal error for EmptyStockProducts::getEmptyStockProducts )
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement