diff --git a/install.md b/install.md new file mode 100644 index 00000000..eb04cb9d --- /dev/null +++ b/install.md @@ -0,0 +1,10 @@ +/* override cms */ +ALTER TABLE `ps_cms` ADD `matrices` LONGTEXT AFTER `indexation` + +ALTER TABLE `ps_category` ADD `home` TEXT NOT NULL AFTER `is_root_category`, + +ALTER TABLE `ps_category_lang` ADD `description_univers` TEXT NOT NULL AFTER `description`, + ADD `liste_icons_univers` VARCHAR(255) NOT NULL AFTER `description_univers`, + ADD `long_description` TEXT NOT NULL AFTER `liste_icons_univers`, + + diff --git a/www/modules/advsitereviews/advsitereviews.php b/www/modules/advsitereviews/advsitereviews.php index 2fecf04b..4b4b8ca5 100644 --- a/www/modules/advsitereviews/advsitereviews.php +++ b/www/modules/advsitereviews/advsitereviews.php @@ -103,7 +103,7 @@ class AdvSiteReviews extends Module return $this->display(__FILE__, 'advsitereviews.tpl', $this->getCacheId()); } - + public function hookHeader($params) { $jsFiles = $this->context->controller->js_files; diff --git a/www/modules/advsitereviews/classes/AdvSiteReview.php b/www/modules/advsitereviews/classes/AdvSiteReview.php index 90d99349..6c5ae26b 100644 --- a/www/modules/advsitereviews/classes/AdvSiteReview.php +++ b/www/modules/advsitereviews/classes/AdvSiteReview.php @@ -10,6 +10,9 @@ class AdvSiteReview extends ObjectModel { public $firstname; public $lastname; public $content; + public $title; + public $place; + public $date; public static $definition = array( 'table' => 'advsitereviews', @@ -24,6 +27,10 @@ class AdvSiteReview extends ObjectModel { // Lang fields 'firstname' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), 'lastname' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), + 'lastname' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), + 'date' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), + 'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), + 'place' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), 'content' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isCleanHtml') ) ); diff --git a/www/modules/advsitereviews/controllers/admin/AdminAdvSiteReviews.php b/www/modules/advsitereviews/controllers/admin/AdminAdvSiteReviews.php index ccca899d..13b83cf9 100644 --- a/www/modules/advsitereviews/controllers/admin/AdminAdvSiteReviews.php +++ b/www/modules/advsitereviews/controllers/admin/AdminAdvSiteReviews.php @@ -90,6 +90,24 @@ class AdminAdvSiteReviewsController extends ModuleAdminController { 'label' => $this->l('Note'), 'name' => 'rank', ), + array( + 'type' => 'text', + 'label' => $this->module->l('Titre'), + 'name' => 'title', + 'lang' => TRUE, + ), + array( + 'type' => 'text', + 'label' => $this->module->l('Lieu'), + 'name' => 'place', + 'lang' => TRUE, + ), + array( + 'type' => 'text', + 'label' => $this->module->l('Date'), + 'name' => 'date', + 'lang' => TRUE, + ), array( 'type' => 'textarea', 'label' => $this->l('Contenu'), diff --git a/www/modules/advsitereviews/controllers/front/default.php b/www/modules/advsitereviews/controllers/front/default.php new file mode 100644 index 00000000..f781bdc9 --- /dev/null +++ b/www/modules/advsitereviews/controllers/front/default.php @@ -0,0 +1,39 @@ +auth = true; + parent::__construct(); + $this->context = Context::getContext(); + } + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + + $reviews = AdvSiteReview::getReviews(); + + if (!$reviews) { + return false; + } + + $this->context->smarty->assign('reviews', $reviews); + + $this->setTemplate('advsitereviewspage.tpl'); + } + +} diff --git a/www/modules/advsitereviews/controllers/front/index.php b/www/modules/advsitereviews/controllers/front/index.php new file mode 100644 index 00000000..8761a003 --- /dev/null +++ b/www/modules/advsitereviews/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2016 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../'); +exit; \ No newline at end of file diff --git a/www/modules/advsitereviews/controllers/index.php b/www/modules/advsitereviews/controllers/index.php new file mode 100644 index 00000000..8761a003 --- /dev/null +++ b/www/modules/advsitereviews/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2016 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../'); +exit; \ No newline at end of file diff --git a/www/modules/advsitereviews/views/templates/front/advsitereviewspage.tpl b/www/modules/advsitereviews/views/templates/front/advsitereviewspage.tpl new file mode 100644 index 00000000..a6d1c773 --- /dev/null +++ b/www/modules/advsitereviews/views/templates/front/advsitereviewspage.tpl @@ -0,0 +1,23 @@ +{if isset($reviews)} +