pierre bernard Posted August 31, 2011 Share Posted August 31, 2011 Bonjour, j'aimerais ajouter un champ dans l'adminSuppliers.php, Comment faire ? le champ on question est: meta tel Voila comment j'ai fais: ligne 201 de AdminSuppliers.php <label>'.$this->l('Meta tel:').' </label> <div class="margin-form">'; foreach ($this->_languages as $language) echo ' <div id="smeta_tel_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;"> <input type="text" name="meta_tel_'.$language['id_lang'].'" id="meta_tel_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($supplier, 'meta_tel', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /> <span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer"> </span></span> </div>'; $this->displayFlags($this->_languages, $this->_defaultFormLanguage, $langtags, 'smeta_tel'); echo ' <div class="clear"></div> </div> puis j'ai modifier la basse de donné ps_supplier_lang Structure de la table `ps_supplier_lang` -- CREATE TABLE IF NOT EXISTS `ps_supplier_lang` ( `id_supplier` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, `description` text, `meta_title` varchar(128) DEFAULT NULL, `meta_keywords` varchar(255) DEFAULT NULL, `meta_description` varchar(255) DEFAULT NULL, `meta_tel` varchar(255) DEFAULT NULL, PRIMARY KEY (`id_supplier`,`id_lang`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Contenu de la table `ps_supplier_lang` -- INSERT INTO `ps_supplier_lang` (`id_supplier`, `id_lang`, `description`, `meta_title`, `meta_keywords`, `meta_description`,`meta_tel`) VALUES (3, 1, '', '', '', '', ''), (3, 2, 'rueducommercail.fr', '', '', '', ''), (3, 3, '', '', '', '', ''), (4, 1, '', '', '', '', ''), (4, 2, '', '', '', '', ''), (4, 3, '', '', '', '', ''); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; voir image pour voir le résultat Mon problème, c'est que lorsque j’écris "test" dans le champ meta tel et je valide rien est enregistre dans la basse de donné. Objectif:ajouter d'autre champ comme meta description dans AdminSuppliers merci d’avance pour votre aide. AdminSuppliers.php 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