Liath Posted December 29, 2016 Share Posted December 29, 2016 (edited) Hi, i'm searching for the right hook when i want to add a simple input textbox to the "create product" page. I've already seen the hook "displayAdminProductsExtra", but i dont want to create a new tab there, i just want to add a input field to the information tab there Edited December 29, 2016 by Liath (see edit history) Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted December 30, 2016 Share Posted December 30, 2016 Hi.. When you creating a new modules then you can register hook with "displayAdminProductsExtra" with modue install method or function.Like as public function install() { return parent::install() && $this->registerHook('displayAdminProductsExtra'); } Then after you can use this method display the extra tab in admin product view page public function hookDisplayAdminProductsExtra() { return $this->context->smarty->fetch($this->local_path . 'views/templates/hook/displayAdminProductsExtra.tpl'); } All the you input is "displayAdminProductsExtra.tpl" File. Link to comment Share on other sites More sharing options...
phinq1910 Posted December 30, 2016 Share Posted December 30, 2016 You can use javascript on .tpl to do that. Link to comment Share on other sites More sharing options...
vekia Posted December 30, 2016 Share Posted December 30, 2016 tutorial that will work: new field in product back office Link to comment Share on other sites More sharing options...
Liath Posted December 30, 2016 Author Share Posted December 30, 2016 Thanks for all your Suggestions... When you creating a new modules then you can register hook with "displayAdminProductsExtra" with modue install method or function. I've already seen the hook "displayAdminProductsExtra", but i dont want to create a new tab there tutorial that will work: new field in product back officeThanks for your help and tutorials here, it helped me alot for understanding the core working, but i wanted to do it as modul, to have it separately... You can use javascript on .tpl to do that. Can this do the job through a plugin? I think there isnt a proper hook to add this field to the product page... so i think i will use the direct add method from vekia... thank you all for your answers Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted December 31, 2016 Share Posted December 31, 2016 Hi...LiathHere download sample module Download now Link to comment Share on other sites More sharing options...
Liath Posted December 31, 2016 Author Share Posted December 31, 2016 (edited) Here download sample module Download now Hi Nishith, thank you for your effort, but i dont want to use this hook and its used in this modul too. I dont want to make a new tab on product page. I just was asking to another hook, where i can add some form field directly to the product page in the existing tabs. But it seems there are not exist, so i will try the method from vekia. I have my own Modul finished on the same way, but i wasnt happy with it xD thanks anyway Edited December 31, 2016 by Liath (see edit history) Link to comment Share on other sites More sharing options...
num47 Posted November 9, 2020 Share Posted November 9, 2020 I am actually looking for an idea to change the position of the input field that is displayed on front-office product page. I have types of products where customer need to write some instructions and that is why i needed to enable those input field. But, the problem is that the Input Field shows at the bottom of the product description and some new users are actually not aware of that. Its a bit trouble some for customers to get all the way to the bottom of the product page to find the field input box and then back to top again to add the product in the cart. Do any of you can give me an idea how i can put the input field right below the add to cart button. Btw, i am talking about Prestashop 1.6. Thank you all. 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