Skip to content

Imposible to reorder configurable products with optional custom options #35409

Closed
@Axel29

Description

@Axel29

Preconditions

  1. Magento >= 2.4.2 (not tested on older versions)

Steps to reproduce

  1. Create a configurable product
  2. Add a custom option of type select (drop down) and set it as optional (Uncheck Required field)
  3. Order this product without choosing any custom option (as it is optional) from front end
  4. Try to reorder from the admin view - Sales - Orders - View Order - Click on Reorder
  5. Error message displayed and clicking on Submit Order - Does not work - Issue
    Temporary workaround: Click on Configure button - do not select anything - click OK and submit order - Order is created - No issue

Expected result

  1. The reorder page is shown without any error and it is possible to reorder

Actual result

  1. An error message is shown at the configurable product: Some of the selected options are not currently available.

image

Additional information

From what I've debugged, it seems like the issue is caused by the method \Magento\Catalog\Model\Product\Option\Type\Select::getEditableOptionValue.

This one doesn't check if the custom option is required or optional.

Thus, when fetching the value with $_result = $option->getValueById($_value);, which is null, the else statement is reached and then a $this->getListener()->setHasError(true)->setMessage($this->_getWrongConfigurationMessage()); is set.

Finally, this triggers the error in \Magento\Quote\Model\Quote\Item\AbstractItem::checkData because of the if ($this->getProduct()->getHasError()) { ... } condition.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: OrderComponent: ConfigurableProductIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.2Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions