How to add new field in the new entity?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to add new field in the new entity?

AnandM
Hello Friends i need your great help
   
                I have to add a new entity in ofbiz under product package. While calling new entity method this entity is saving only those field which are in product table(entitymodel.xml).Then how i add new field in the new entity like color, size.

Thanks & regards:
Gopal Bisht
Reply | Threaded
Open this post in threaded view
|

Re: How to add new field in the new entity?

BJ Freeman
don't need a entity for this
best to get the data model books to get a handle on how things are put
together
and look at the examples in the products.
http://demo.hotwaxmedia.com/ecommerce/control/product/~category_id=PROMOTIONS/~product_id=WG-9943

AnandM sent the following on 7/24/2008 2:52 PM:
> Hello Friends i need your great help
>    
>                 I have to add a new entity in ofbiz under product package.
> While calling new entity method this entity is saving only those field which
> are in product table(entitymodel.xml).Then how i add new field in the new
> entity like color, size.
>
> Thanks & regards:
> Gopal Bisht

Reply | Threaded
Open this post in threaded view
|

Re: How to add new field in the new entity?

Ashish Vijaywargiya
In reply to this post by AnandM
Hello Gopal,

>> I have to add a new entity in ofbiz under product package.
I guess you are asking to add new fields in the Product table instead of new
entity in the Product package (org.ofbiz.product.*)  :-).

Color,Size can be treated as the Feature of any product.
ProductFeature is the table that can help you to put those values.

If you would like to add the fields to existing entities then
<extend-entity> can be used for this purpose.
For ex :-
    <extend-entity entity-name="Product">
        <field name="customComments" type="comment"></field>
        <field name="customAmount" type="currency-amount"></field>
    </extend-entity>

Please let us know if  you need more help on this.

--
Ashish

On Fri, Jul 25, 2008 at 3:22 AM, AnandM <[hidden email]> wrote:

>
> Hello Friends i need your great help
>
>                I have to add a new entity in ofbiz under product package.
> While calling new entity method this entity is saving only those field
> which
> are in product table(entitymodel.xml).Then how i add new field in the new
> entity like color, size.
>
> Thanks & regards:
> Gopal Bisht
> --
> View this message in context:
> http://www.nabble.com/How-to-add-new-field-in-the-new-entity--tp18641313p18641313.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


--
Ashish Vijaywargiya
Indore (M.P), India
http://en.wikipedia.org/wiki/Indore