Thomas Mayet Posted May 17, 2016 Share Posted May 17, 2016 Bonjour, Je suis entrain de rajouter un champs dans mon back office sur mes produits. Ce champs s'apelle nombre d'um j'ai rajouter un champs de type varchar 255 nbrum après description shot dans la table product_lang J'ai ensuite crée un fichier Product.php dans /override/classe dont voici le contenu: <?php class Product extends ProductCore { public $nbrum; public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) { Product::$definition['fields']['nbrum'] = array('type' => self::TYPE_FLOAT, 'lang' => true, 'validate' => 'isString'); parent::__construct($id_product, $full, $id_lang, $id_shop, $context); } } Puis j'ai crée le fichier information.tpl depuis celui d'origine puis je l'ai mis dans /override/controllers/admin/template/products/ J'ai insérer à la ligne 145 après UPC le Champs n'ombre d'UM <tr> <td class="col-left"><label>{$bullet_common_field} {l s='Nombre UM:'}</label></td> <td style="padding-bottom:5px;"> <input size="55" type="text" name="nbrum" value="{$product->nbrum|escape:html:'UTF-8'}" style="width: 130px; margin-right: 44px;" /> </td> </tr> Le champs s'affiche, j'ai vider le cache smarty et l'autoload mais rien n'y fais le champs ne s'enregistre pas lorsque je rentre le nombre de colis. D'ou cela peut il venir ? Merci. Link to comment Share on other sites More sharing options...
Olivier CLEMENCE Posted May 17, 2016 Share Posted May 17, 2016 Il faut aussi que tu modifie la table dans la base de données pour y stocker l'info. J'avais fait un article sur le sujet y a déjà un petit moment: http://www.reussir-mon-ecommerce.fr/2014/04/07/ajouter-un-nouveau-champ-sur-votre-fiche-produit/ Link to comment Share on other sites More sharing options...
Thomas Mayet Posted May 17, 2016 Author Share Posted May 17, 2016 C'est déjà fait. L'info s'envoi, mais impossible de l'afficher dans le champs après modification. Link to comment Share on other sites More sharing options...
Olivier CLEMENCE Posted May 17, 2016 Share Posted May 17, 2016 as tu supprimer le class_index dans le dossier cache ? 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