Jump to content


Photo

Custom Fields - Products

staff response

  • Please log in to reply
4 replies to this topic

#1 Fer

Fer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 23 December 2014 - 01:55 PM

Hello. Is there a way to add custom fields in products?

 

The dropdown menu on Mange Fields doesn't include a product model.

 

Thank you.

 

 

 

 

Attached Files



#2 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 972 posts
  • LocationSanta Cruz, CA

Posted 23 December 2014 - 04:41 PM

Unfortunately we haven't yet expanded the flexibility of the Products and Quotes modules.

Right now, if you wanted to customize the fields you would need to modify X2 manually. This involves not only creating the new columns in the MySQL table which holds all of the Products (table "x2_products"), but also create new Fields records for the new field (in the table "x2_fields"). These Fields records hold the associated metadata about each field. Ensure that your new fields have custom = 1, and that the name is prefixed with "c_". This prefix marks a field as custom so that internal fields don't wipe out your custom fields on update.

 

You can find an example of the Fields records which are used to populate the defaults for the Products module in the file protected/modules/products/data/install.sql.

 

Raymond



#3 Fer

Fer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 12 January 2015 - 10:32 AM

Thank you for your answer.

 

I'm struggling with custom fields.

 

I already added the field in products table, inserted a new line in fields table. I also modified the layout (json) in form_layouts.

 

The form doesn't change.

 

What can I do?

 

Thank you.



#4 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 972 posts
  • LocationSanta Cruz, CA

Posted 12 January 2015 - 03:40 PM

You still should be able to use the "Form Editor" to modify the Product forms. If the form hasn't changed please make sure that the form layout you are modifying has been set to be "default" for either View or Form. Was the new field available in the list of fields when you were customizing the form layout?



#5 Fer

Fer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 14 January 2015 - 11:07 AM

the field "visible" in modules table was 0, I changed to 1.
 
Now I can add custom fields in products.
 
Thank you.






Also tagged with one or more of these keywords: staff response

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users