Closed (duplicate)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Apr 2017 at 14:49 UTC
Updated:
2 May 2017 at 20:01 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
SpartyDan commentedIt appears to me that the issue is with the add product form. A "Create variation" button is displayed on the form even though no Product Attributes yet exist.
I think that the "Create variation" button should not be displayed on the Add Product form unless at least one Product Attribute exists.
Products can exist without a Product Variation but Product Variations seem to directly require the existence of at least one Product Attribute.
Comment #3
SpartyDan commentedSorry, wrong status.
Comment #4
mglamanWe allow this. The real problem, that I can see, is that the price field is not required. You do not have to use product attributes. That needs to be tidied up in #2690681: Simplify the variation UX when each product has a single variation
The price field is not required because
I think we need to change this. We need to ensure there is some form of price always available.
Comment #5
mglamanAssigning to bojanz to give feedback on #4
Comment #6
rattusrattus commentedmglaman in my experience the issue wasn't due to a field not being required as a price was supplied it just appeared not be saved.
Comment #7
nimbfire@gmail.com commentedThe Price (and all variants fields, for what I can see) is only saved after we submit the form. If you create two variants and save, they will work correctly.
The "price not appearing" I think its a problem of the default value. If you let the price as default, it will not appear even on products without variants, or whith correctly configured variants.
After creating an product only providing an title and an SKU, submitting and returning to the edit page, the "title" and "price" in the variants table are empty. Considering that we haven't added an product attribute yet.
Since the "Title" in the table seems to use the Product Attributes , I think the correct would be the "add variant" button to not appear, since there would be no way of discerning two variants.
But, this would mean that we need to present the price and sku again in the edit page. Now, this is made by the variants table... I don't know if we shouldn't just update the variants table to not allow to add more, and hide the title... What do you think?
Anyway, I do believe we should not allow an user to add an variant if there aren't Product Attributes yet.
Comment #8
mglamanOkay, more and more this sounds like it is #2690681: Simplify the variation UX when each product has a single variation. Where if there are no attributes prevent adding multiple variants. Instead act as if cardinality is one.
Anyone involved, feel free to revert status if I am incorrect.