Hi again.
Thank you so much for your response. You have been very helpful.
Unfortunately, the ParentProduct property comes up with an error when I try to set it becaues it is read only. This thought though pointed me in the right direction to solve what I was tasked with.
I was browsing the COM_ShoppingCartSKU and saw the field, CartItemParentGuid. This is my golden ticket right here. I am able to set this property and it works great.
The only downfall/problem is that this new product option doesn't get deleted when I delete the parent item, on step 1 for example. Maybe there is something I can add the btnUpdate to loop through and see if the parent exists in the "remove" conditional part of that function.
I am going to post my code snippet, in case someone else is looking to accomplish some type of similar functionality.
foreach (RepeaterItem item in rptr_gift_wrap.Items)
{
System.Web.UI.WebControls.HiddenField hdn_giftWrap = (System.Web.UI.WebControls.HiddenField)item.FindControl("hdn_giftWrap");
System.Web.UI.WebControls.HiddenField hdn_giftWrapGuid = (System.Web.UI.WebControls.HiddenField)item.FindControl("hdn_giftWrapGuid");
System.Web.UI.WebControls.CheckBox cb_giftWrap = (System.Web.UI.WebControls.CheckBox)item.FindControl("cb_giftWrap");
if (cb_giftWrap.Checked)
{
ShoppingCartItemInfo addedItem = ShoppingCartItemInfoProvider.GetShoppingCartItemInfo(new Guid(hdn_giftWrapGuid.Value));
if (addedItem != null)
{
// Get cart item parameters
ShoppingCartItemParameters cartItemParams = GetGiftWrapShoppingCartItemParameters();
// Add item to shopping cart
addedItem = ShoppingCart.SetShoppingCartItem(cartItemParams);
//this sets this new item's parent
addedItem.CartItemParentGUID = new Guid(hdn_giftWrapGuid.Value);
foreach (ShoppingCartItemInfo option in addedItem.ProductOptions)
{
ShoppingCartItemInfoProvider.SetShoppingCartItemInfo(option);
}
// Update shopping cart item in database
ShoppingCartItemInfoProvider.SetShoppingCartItemInfo(addedItem);
ShoppingCartInfoProvider.SetShoppingCartInfo(ShoppingCart);
}
}
}