bostamaster Posted April 24, 2014 Share Posted April 24, 2014 (edited) Hello everyone I want to know how to add date to CMS pages please. I added a date column in the table cms_lang (default value: null) I alsoadded date in CMS.php (in classes) I added this line in the definition array: date' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), i also tried date' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), and created the variable public $date; In adminCMScontroller.php I added this code array( 'type' => 'date', 'label' => $this->l('Date de publication:'), 'name' => 'date', 'size' => 20, 'maxlength' => 10, 'required' => false, 'desc' => $this->l('Format: 2011-12-31 ') ), I am using prestashop version 1.5.6.1 and I have this error when i try inserting date in the BO (when date is required) if it is not required no date is inserted. I can choose a date but when i click save I go the error: $message = $this->validateField($field, $value, $id_lang); 874. if ($message !== true) 875. { 876. if ($die) 877. throw new PrestaShopException($message); 878. return $error_return ? $message : false; 879. } 880. } 881. } Edited April 25, 2014 by bostamaster (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now