I wanna do something like this, but what I'm missing is how I should assign the size after choosing it, as the user should choose a size and Qty and add it to cart.
I created a block with gallery list to list the items, but when it came the choosing the size I don't know how to implement it, I wanna assign a variable for each list:
and Here's the data I have:
Hi Abeer,
As per the ERD - Each Product record can have association with multiple Product Attribute records (i.e. 1-M Relationship type)
i.e. In the stock, a cloth with multiple size are available
Solution:
1) Encapsulate the Size Dropdown inside a block i.e. let's call it ProductSize
2) Define an input parameter (i.e. InputProductId) to the ProductSize block and pass the ProductId as input parameter value
3) Within the ProductSize block scope, define an aggregate with
Source: ProductAttribute Entity
Filter condition: ProductAttribute.ProductId = InputProductId
4) Map the Aggregate Output list to Size Dropdown
5) On the selection of Size trigger an event and pass the selected size value from ProductSize block to the parent screen
If you are facing any challenges in implementation, if possible please share the .oml file..
Hope this helps you!
Regards,
Benjith Sam
Benjith Sam wrote:
Thanks a lot for your reply, that solves my problem!
Abeer ElAssal wrote:
You are most welcome, Abeer :)
Glad I could be of help :)