Description
Preconditions
- Magento >= 2.4.2 (not tested on older versions)
Steps to reproduce
- Create a configurable product
- Add a custom option of type select (drop down) and set it as optional (Uncheck Required field)
- Order this product without choosing any custom option (as it is optional) from front end
- Try to reorder from the admin view - Sales - Orders - View Order - Click on Reorder
- 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
- The reorder page is shown without any error and it is possible to reorder
Actual result
- An error message is shown at the configurable product:
Some of the selected options are not currently available.
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
Type
Projects
Status