lunarphp / lunar

An open-source package that brings the power of modern headless e-commerce functionality to Laravel.
https://lunarphp.io
MIT License
2.7k stars 356 forks source link

Product variant attributes can not be edited if product has no options #1996

Open AidasK opened 4 weeks ago

AidasK commented 4 weeks ago

Expected Behaviour:

I should be able to fill in product variant attribute data event though product has only one product variant (e.g. it has no options)

Actual Behaviour:

I am not able to fill in any product variant attributes.

Steps To Reproduce:

  1. Assign some custom attributes to product variant.
  2. Create a product and you won't be able to fill in any custom attribute_data on product_variant.

On lunar 0.8 it was possible to fill in this data, not we can't. Solution might be to create same attributes for the product too, but it create additional code complexity as you must check two places for attributes in a product and in a product variant.

glennjacobs commented 1 week ago

That's a good point, it should support that.