Riva Posted March 24, 2017 Share Posted March 24, 2017 (edited) Стоит задача создать поле c описанием значения характеристик. Само поле добавил, но данные этого поля не сохраняются. Кто-то решал такую задачу на Prestashop 1.6 ? так Edited March 24, 2017 by Riva (see edit history) Link to comment Share on other sites More sharing options...
Riva Posted March 24, 2017 Author Share Posted March 24, 2017 (edited) Это уже сделано, как на картинке показано. Но не сохраняются данные в базу. Внёс в базу ALTER TABLE `ps_feature_value_lang` ADD `value_description` text AFTER `value`; В AdminFeaturesController.php в RenderView 'value_descripton_value' => array( 'title' => $this->l('Value Description'), 'align' => 'center', 'class' => 'fixed-width-xs' ), В AdminFeaturesController.php в RenderForm array( 'type' => 'textarea', 'label' => $this->l('Value Descripton'), 'name' => 'value_descripton', 'autoload_rte' => true, 'lang' => true, 'rows' => 10, 'cols' => 100, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ) В AdminFeaturesController.php в initFormFeatureValue array( 'type' => 'textarea', 'label' => $this->l('Value Descripton'), 'name' => 'value_descripton', 'autoload_rte' => true, 'lang' => true, 'rows' => 10, 'cols' => 100, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), В FeatureValue.php /** @var string */ public $value_descripton; В FeatureValue.php в public static $definition 'value_description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'), Edited March 24, 2017 by Riva (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