Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If we attempt to use the form widget type "Single variation (Product Information)" for entering a variation on the product entry screen it does not get saved when clicking "Save and add variations". It will only save if "Save" is clicked.
I know this widget was intended to be used for product types that only have a single variation. However it is useful for other workflows as well.
- We want to allow an editor to enter a product quickly when there is only one variation.
- We want to require an editor to enter at least one variation before saving a product.
- We do not want to use the IEF variation form as it was confusing and cumbersome to our editors and the new variations tab is much easier to use for multiple variations.
Is it possible to implement saving the variation data entered when clicking "Save and add variations"?
Comment | File | Size | Author |
---|---|---|---|
#6 | 3010632-6-fix-save-add-variations-button.patch | 3.84 KB | bojanz |
| |||
#5 | 3010632-5-fix-save-add-variations-button.patch | 608 bytes | bojanz |
|
Comments
Comment #2
rhovland CreditAttribution: rhovland commentedComment #3
rhovland CreditAttribution: rhovland commentedComment #4
bojanz CreditAttribution: bojanz at Centarro commentedThis needs the same fix as #3079974: Offer configuration saved inconsistently when using "Save and add coupons" instead of "Save", setting the #button_type to "secondary" for this button. And a test.
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedCommitted #3079974: Offer configuration saved inconsistently when using "Save and add coupons" instead of "Save".
Attaching the relevant fix here. Needs a test case in ProductAdminTest (let's call it "testMixedMode").
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedHere's a patch with a test.
Also fixes the #access on the "Save and add variations" button to actually check the product type setting.
Comment #7
bojanz CreditAttribution: bojanz at Centarro commentedCommitted #6.