Jump to content

new input field to add product page


Recommended Posts

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

post-978473-0-38804800-1483048288_thumb.jpg

Edited by Liath (see edit history)
Link to comment
Share on other sites

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.

 

Capture.png

Link to comment
Share on other sites

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 office

Thanks 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

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 by Liath (see edit history)
Link to comment
Share on other sites

  • 3 years later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...