ParentItemId in ac_OrderItems Table

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
jharri26
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Mon Feb 07, 2011 9:28 am

ParentItemId in ac_OrderItems Table

Post by jharri26 » Mon Feb 07, 2011 2:51 pm

I was wondering if someone could shed some light on what the ParentItemId field in the Order Items table is used for. I have a situation where I think that field will work for what I need it to but was wondering what it was and if it may impact something I am doing.

Thanks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ParentItemId in ac_OrderItems Table

Post by mazhar » Tue Feb 08, 2011 6:31 am

ParentItemId has major usage in application logic. Some times some items might be dependent upon some different items. For example consider kit product case where one product can have multiple child kitted items. When order is placed for that kit it will generate corresponding order item for main product and each of its child products where order items created for child products will point to their parent item created for kit using ParentItemId. So better don't try to use this field for custom purpose it can break things. OrderItem table has a field called custom fields that can contain name value pairs so you can look into that if you simply want to keep some information with each order item.

Post Reply