Skip to content

BundleImportExport is missing selection_can_change_qty #9342

Closed
@barryvdh

Description

@barryvdh

Preconditions

  1. Magento 2.1.6

Steps to reproduce

  1. Create a Bundle product with options.
  2. Export the product, no information about selection_can_change_qty
  3. Import, no possibility to set selection_can_change_qty

image

Expected result

selection_can_change_qty is exported and imported correctly

Actual result

selection_can_change_qty is always true/1

Suggested solution

It seems that while importing, the value is hardcoded: https://github.com/magento/magento2/blob/2.1.6/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php#L310

I suggest a parameter can_change_qty will be added, while keeping the default on 1 to preserve BC.

'selection_can_change_qty' => (isset($selection['can_change_qty'])) ? ($selection['can_change_qty'] ? 1 : 0) : 1,

The value should also be added to the export of a bundle, to keep import <-> export in sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: ImportExportFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: 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 report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions