Page 1 of 1

Adding More properties to Product Table - BLC_Product

Posted: Tue Feb 14, 2012 4:31 pm
by om.singh
What is the best way to add more attributes to product or sku tables.

I looked at the URL - http://www.broadleafcommerce.org/conflu ... g+Entities. This is useful. Should we follow this for product / sku as well. Will adding more attributes to the entity also appear in the admin by default

Any associated example for product / sku table will be very helpful.

Regards
Om

Re: Adding More properties to Product Table - BLC_Product

Posted: Wed Feb 15, 2012 2:15 am
by avinash
Hi Om,

I am not sure about the best practices but as far as the additional attributes are concerned we have to use @AdminPresentation annotation on each of the attribute for them to appear in the Admin GUI.

Regards,
Avinash

Re: Adding More properties to Product Table - BLC_Product

Posted: Wed Feb 15, 2012 12:37 pm
by jefffischer
You are correct, that link shows the best practice for extending a Broadleaf Commerce entity and adding additional attributes. If those additional attributes are basic attributes (e.g. a new String, integer, boolean, etc... column) or a @ManyToOne or @OneToOne association, then they will automatically show up in the admin. Collection structures and/or Map using @OneToMany and @ManyToMany require some additional code support in admin extensions. I've attached some preliminary documentation we've written regarding the admin that you may find helpful.

Re: Adding More properties to Product Table - BLC_Product

Posted: Sat Feb 18, 2012 4:48 pm
by om.singh
Thanks ,

I will follow the documentation.

Regards
Om