Product Script: Multiple same product instance
Dear Experts,
I have a product similar to the below structure with 2 attributes.
Root Product
|_ Component Product (CP)(Max Cardinality:999)
|_(Attr) Start Date
|_(Attr) End Date
When the End Date / Start Date is entered, we need to compare the dates and the difference between them should be 2 days, else we need to nullify the End Date.
We implemented it using Attribute Change event. And this works fine if only one Component Product is selected.
If the customer selects 2 CP like the below structure, we have issues in the validation.
Root Product
|_ (1)CP
|_ Start Date : Value X
|_ End Date : Value X+2