You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When more than one variant is used on an assembly product, if any one of the variants has an out of stock part, no variant can be added to the cart because the availability validator uses quantity_without_part_line_items on the line item to get the parts. This pulls all parts on the product as opposed to the variant specified.
For example:
Assembly Product
master
variant 1
part 1a
part 2a
variant 2
part 1b
part 2b
Whenever part 2b is OOS, variant 1 can not be added to the cart. It happens to work if one is already in the cart, b/c quantity_with_part_line_items is used in the availability validator in that case. But when the item is added the first time, it fails due to a stock error in the line item validation.
We can change the quantity_without_part_line_items method to use the chosen assembly variant's parts (this works for master when no variants as well as an assembly variant).
The text was updated successfully, but these errors were encountered:
jkelleyj
added a commit
to jkelleyj/spree-product-assembly
that referenced
this issue
Aug 25, 2017
When more than one variant is used on an assembly product, if any one of the variants has an out of stock part, no variant can be added to the cart because the availability validator uses
quantity_without_part_line_items
on the line item to get the parts. This pulls all parts on the product as opposed to the variant specified.For example:
Assembly Product
Whenever part 2b is OOS, variant 1 can not be added to the cart. It happens to work if one is already in the cart, b/c
quantity_with_part_line_items
is used in the availability validator in that case. But when the item is added the first time, it fails due to a stock error in the line item validation.We can change the
quantity_without_part_line_items
method to use the chosen assembly variant's parts (this works for master when no variants as well as an assembly variant).The text was updated successfully, but these errors were encountered: