Advertisement
Guest User

datepicker.php

a guest
Feb 18th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <?php
  2. if ( !defined( '_PS_VERSION_' ) )
  3. exit;
  4.  
  5. class DatePicker extends Module
  6. {
  7. public function __construct()
  8. {
  9. $this->name = 'datepicker';
  10. $this->tab = 'Products';
  11. $this->version = 1.0;
  12. $this->author = 'PeteAH';
  13. $this->need_instance = 0;
  14. $this->registerHook('productFooter')
  15.  
  16. parent::__construct();
  17.  
  18. $this->displayName = $this->l( 'Date Picker' );
  19. $this->description = $this->l( 'Allows a date to be picked' );
  20. }
  21.  
  22. public function install()
  23. {
  24. if ( parent::install() == false )
  25. return false;
  26. return true;
  27. }
  28.  
  29. public function hookLeftColumn( $params )
  30. {
  31. return $this->display( __FILE__, 'datepicker.tpl' );
  32. }
  33.  
  34. public function hookProductFooter( $params )
  35. {
  36. return $this->display( __FILE__, 'datepicker.tpl' );
  37.  
  38. }
  39.  
  40. public function hookRightColumn( $params )
  41. {
  42. return $this->hookLeftColumn( $params );
  43. }
  44.  
  45. if ( !parent::uninstall() )
  46. Db::getInstance()->Execute( 'DELETE FROM `' . _DB_PREFIX_ . 'datepicker`' );
  47. parent::uninstall();
  48. }
  49. }
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement