Jluis Posted July 25, 2019 Share Posted July 25, 2019 salut , j'ai ajouté à la partie combinaison une zone de texte gràce au hook "hookDisplayAdminProductsCombinationBottom" et "hookActionAttributeCombinationSave" . le champ apparît pour chaque combinaison , mais l'enregistrement de sa valeur n'est pas pris en compte public function hookDisplayAdminProductsCombinationBottom($params) { $combination = new Combination($params['id_product_attribute']); $this->context->smarty->assign(array( 'custom_field_attribute' => $combination->custom_field_attribute, ) ); return $this->display(__FILE__, 'views/templates/hook/combinationfields.tpl'); } public function hookActionAttributeCombinationSave($params) { $combination = new Combination($params['id_product_attribute']); $this->context->smarty->assign(array( 'custom_field_attribute' => $combination->custom_field_attribute, ) ); $combination->custom_field_attribute = Tools::getValue('custom_field_attribute'); $combination->save(); return $this->display(__FILE__, 'views/templates/hook/combinationfields.tpl'); return $this->display(__FILE__, 'views/templates/hook/combinationfields.tpl'); } une idée svp ? Link to comment Share on other sites More sharing options...
korvent Posted July 7, 2021 Share Posted July 7, 2021 Hello, As-tu réussi à sauvegarder ton attribut custom ? Merci 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