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"?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rhovland created an issue. See original summary.

rhovland’s picture

Title: Variation information entered is not saved when clicking "Save and add variations" » "Save and add variations" does not save variation information entered during product creation
rhovland’s picture

Issue summary: View changes
bojanz’s picture

Version: 8.x-2.10 » 8.x-2.x-dev

This 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.

bojanz’s picture

Status: Active » Needs review
FileSize
608 bytes

Committed #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").

bojanz’s picture

Here's a patch with a test.

Also fixes the #access on the "Save and add variations" button to actually check the product type setting.

bojanz’s picture

Status: Needs review » Fixed

Committed #6.

  • bojanz committed e3ac453 on 8.x-2.x
    Issue #3010632 by bojanz: "Save and add variations" does not save...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.