I have an online store using commerce
and rules
, with products that can be bought in different quantities. Commerce stores the line-items in an order as a list, but it stores the quantity-per-line-item as a flat number.
I have a rule that needs to fire once for each tangible product- ie. number of line-items
x quantity
.
Rules can loop over lists, but I don't have a way of representing the quantity as a list. Is there a way to loop using just a number? Is there a way to turn a raw number into a list Rules can loop over?