Skip to content

Import customizable options adds it to another product if same SKU is filled #9457

@DependencyHell

Description

@DependencyHell

When creating a new product, if by mistake I set the SKU of an already existing product, and import customizable options from this one, these options will be imported to the first product with same SKU, althougth an error shows that same SKU is existing.

Preconditions

Magento 2.1.5

Steps to reproduce

  1. Create a simple product with customizable options (i.e SKU : product-test)
  2. Create a product and set same SKU
  3. Import customizable options from the first product
  4. Save

Expected result

  1. Information message indicates that SKU has been changed (should explain it is already in use)
  2. Confirmation message indicates that Product is saved
  3. Customizables options should be imported in this new product

Actual result

  1. Information message indicates that SKU has been changed
  2. Confirmation message indicates that Product is saved
  3. Imported customizable options are saved to the already existing product that had SKU set first

First Product with sku 'product-test', and 2 customizable options :
create-first-product

Create a new product and by mistake set same sku 'product-test', then on Customizable Options click on Import Options :
create-second-product

Select first product, and click Import :
create-second-product-import-a

Everything looks fine, click on Save button :
create-second-product-import-b

Oops, by mistake I set an already existing SKU, the system changes it, no pb. I can leave happy.
Wait NO! Look at the bottom of the product page, check the new custom options, nothing!
create-second-product-import-c

Return to first product, used to import Customizable options, and here it is duplicated...
final-first-product-is-edited

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug reporttriage wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions