How to replace product quantity attribute if there's a multiple instance of that Product?
The scenario is this:
By configuration, Product A has a component Product B.
Product A has also the attribute Quantity which refers to the quantity of Product B.
Ex: New Install Order
Product Prouct Qty Action Code
Product A 1 add
Product B 5 add
Attribute: Qty = 5
Problem:
Modify Order to add another instance of Product B
Product Product Qty Action Code
Product A 1 -
Product B 5 -
Product B 10 add
Attribute Qty = 15 ; this is what happens now having the constraint "On select of Product B requires Attrib:Qty = Qty of Product B"
Requirement: Attribute Qty should have the value of the latest product instance; Qty should be equal to 10 and disregard previous instance of the product.