ilmtech Posted November 14, 2016 Share Posted November 14, 2016 Hi, I'm developing a module for PS1.7 I want to add extra tab for Product in Backoffice and there I need to configure my needs. Kindly help me how to work with formfileds in hookDisplayAdminProductsExtra. Thank You. Link to comment Share on other sites More sharing options...
Loboo Posted January 18, 2017 Share Posted January 18, 2017 I dont know how save additional fields to table product_lang .. someone help ? Link to comment Share on other sites More sharing options...
abriggs Posted April 15, 2017 Share Posted April 15, 2017 There's a few threads on this topic, yet no answers. A little help please, prestashop? Link to comment Share on other sites More sharing options...
Promokit Posted April 16, 2017 Share Posted April 16, 2017 @abriggs +1 Link to comment Share on other sites More sharing options...
razaro Posted April 17, 2017 Share Posted April 17, 2017 I did not check this in latest 1.7.0 but think new thing and bit confusing part is naming your form fields. Check this http://build.prestashop.com/news/module-development-changes-in-17/#changes-for-modules-targeting-the-product-page Form fieldsThe form field names must be created in an array hook of this format: [MODULE_NAME][iNPUT_NAME]. Not sure if there is better explanation somewhere in code or on github but here is what worked for me after some guessing. Here is one HTML, but if Helpers are used it is just naming input right. <input type="hidden" id="mymodule_id_my_field_{$attribute['id_product_attribute']}" name="hook[my_module][id_my_field][{$attribute['id_product_attribute']}]" value=""> So I used actual word "hook" and module name and field name: hook[my_module][id_my_field] Then in function hookActionProductUpdate code like this $hook_array = Tools::getValue("hook"); $id_my_field = (int)$hook_array["mymodule"]["id_my_field"]; Hope someone find this useful and could confirm. And if there is better, clear explanation, please share. 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