Jump to content

Custom field in back office product page


vkiran

Recommended Posts

Hi Everyone,

                   I am new to prestashop. Please help me to solve this . I want to add new custom text fields for product page in back office and that has to reflect on front office what i have given from back end.

 

I am using prestashop 1.6.1.4

 

 

Sorry if my english is not good. Please help me out in this,

 

Thanks in Advance. 

Link to comment
Share on other sites

I have done this in Prestashop 1.5, I think it should work in 1.6:

 

1. Create field in table ps_product_lang

 

2. Modify class Product.php (doing an override) and add new field in:

public static $definition = array(
        'table' => 'product',
        'primary' => 'id_product',
        'multilang' => true,
        'multilang_shop' => true,
        'fields' => array(

3. Add the field in  adminXXXX/themes/default/template/controllers/products/informations.tpl

 

4. Modify the class Category.php (doing an override).

 

In the query which begins so:

$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) 

About the line 607 you have to add the new field.

 

I don't have the exact code, I hope it helps.

 

Besides, there is a way to do this creating a module. The problem of this way is that you can't override the file informations.tpl of the admin directory, so if you update Prestashop, this modification will be lost.

 

EDIT: this guide can be very useful for you:

 

http://blog.belvg.com/how-to-create-a-custom-product-tab-in-prestashop.html

Edited by FranciscoVillen (see edit history)
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...