PHP modifying Cart Items in Shopping Cart
I have a situation where I have to modify an eCart variable that I use for item discounts.
Each item may have a different discount value. I set the initial discount in the add to cart and it works as advertised. However, I now have a situation whereby I have to modify the discount when I get to the shopping cart based on all the contents in the shopping cart.
Not to make things worse (I even coupons for the shopping cart).
Based on the content items within the cart, how do I dynamically go through the rows of the cart (multiple nested loops) and reset the discount variable so that when the cart displays, all the new discount calculations are correct.
I know how to analyze the cart and nest the loops to make the calculations, but somehow the cart doesn't seem to be getting updated correctly.
Can I just directly access the items, like:
$eCart4->Items[$sib]->TotalItemDiscount = 12345;
or do I have to use a different methodoly (wa functions) to make this happen.