Jump to content

Problem when adding a custom input in a combination


Khalindr

Recommended Posts

Hi, 

 

I'm a beginner at Prestashop, for an internship (and I'm French, so, sorry for my english), and my boss needs two custom fields in the products' combinations. 

 

I tried to use the infos on this page : https://www.prestashop.com/forums/topic/455645-erreur-apres-ajout-champ-declinaison/?hl=%2Bdeclinaison (in french, but the code is the same). I replaced every instance of "referenceTDU" (the field created by the author) in the code by "prixconstate" (my field). 

 

I have my custom field appearing in my combinations' form, in the back office. I also created a "prixconstate" column in the table ps_product_attribute in the database. 

 

But, when I try to modify my combination with the "prixconstate" field in the back office, none of it is transferred to the database, and the field is blank when I go back to the combination's form.

 

I'm on version 1.6.0.14, if it is of any help.

 

I would really appreciate any advice on this matter, I'm a little bit at a loss here, for the past couple of days... And I don't really want my boss having to buy a module for this...

 

Thanks in advance!

 

ps : I know there is a french forum, and I already asked there, but I want to double my chances here by asking you too.

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

Hi Irder, first thank you for your reply. I modified AdminAttributeGeneratorController.php following your advice. I added my custom field to the function addAttribute(), but it did nothing... I am now also searching for a module that could to this for me, but didn't even find one! I am becoming a little bit desperate here...

Link to comment
Share on other sites

Hi Irder, first thank you for your reply. I modified AdminAttributeGeneratorController.php following your advice. I added my custom field to the function addAttribute(), but it did nothing... I am now also searching for a module that could to this for me, but didn't even find one! I am becoming a little bit desperate here...

 

sorry,i made a mistake,there is no relation with  \controllers\admin\AdminAttributeGeneratorController.php,

it seems you modified the right codes,

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...