Jump to content

[SOLVED]How to add new text field to a product which will only be available from the BO?


Recommended Posts

Hi guys,

Here is the situation:

 

What I need is another text field which I can add to a product. This text field should be similar to a field where you put the product name.

 

This filed should be only visible in the back office and not to be available on the front end.

The reason why I need this filed is the following.

 

Product names which I use on my web store are usually full names, with full words, numbers and descriptions of the product like manufacturer, type, model etc...These are used for SEO purposes.

Product names which I use in my offline retail stores are usually shortened for practical purposes like when I'm printing the labels with the prices, when printing fiscal receipts etc...

Here is one simple example form my website:

 

Webstore product name: Grejač bojlera 2000w 5/4 bakarni, fi 8,1mm 482873 / Gorenje Tiki
My retail product name:  Gr. bojlera 2000w 5/4 bak. fi8,1mm 482873 Gor.

This is just one example probably not the best one either but that's basically how the names of the products are shortened in my retail stores. 

For my and my employees I would like to add another text filed where I can give them short version of the name as well and this is only for our internal purposes and not needs to be visible on the website.

How can I make this happen? Can I use some module that extends product fields so I can add new text field? Someother way?

 

Thank you in advance
Dean
 

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

hello

 

you can easily modify the core and database, i will show you step by step tutorial below. So we want to create field name: internal name

 

(1)

For the first, we need to create new field in ps_product table. so, open phpmyadmin and alter ps_product table.

add new VARCHAR(200) field (i think that 200 chars for internal name are enough, am i right? ;) )

field name: internal_name, specification:

Egpegua.png

 

(2)

Now it's time to extend object, open classes/product.php file

there is code like:

 

....

 

 

read full tutorial here: new field for products in back office

  • Like 1
Link to comment
Share on other sites

Nice! It worked like a charm.

This is a really nice and elegant solution Miloš and hopefully one less problem for me.

I just need to check if this data will also be included once I export the products using Store Manager.

 

I will label this thread as SOLVED and report back once I test this export part.

Thanks a million. 
Dean

Link to comment
Share on other sites

Why do you think that Miloš?

Without that I'm afraid I cannot use it.

Don't get me wrong, its a great customization its just that we are working totally automated so I would need to have this exported for over a 4000 products and prior to that imported as well.

P.S. 
For some unknown reason Im unable to connect to my test website using Store Manager due to some a2 hosting limitation probably so Im waiting for them to replay to my ticket...

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

hello

 

woohoo! store manager is powerful tool!

btw. i created article on my website and added there little advertise about dekom ;) once again! ;)

 

 

unfortunately, to get new fields in back office like i described it's necessary to modify the core.

it mean that module is not as good option as modification of these files manually

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hi Vekia, is it possible to make this field visible in FO too? if so this is exactly what i need.

I'm developing a computer parts shop based on Prestashop and i want to add a Warranty line below the product name stating what kind of warranty and duration an item have.

it would be great even if it can be a text box so i can even use html code in order to link to the warranty provider if ppl click on it.

 

any thought?

Link to comment
Share on other sites

×
×
  • Create New...