Skip to content

Imposible to reorder configurable products with one checkbox selected custom option #38736

@RetroProgrammist

Description

@RetroProgrammist

Preconditions and environment

  • Magento version 2.4.7
  • clear install Magento

Steps to reproduce

  1. create Simple product (i used sampledata)
  2. Create custom option:
    • Checkbox type
    • Require
    • 1 or 2 option values

screenshot_1

  1. Go to front, log in
  2. Add the product to cart !!WARNING choose only 1 option value, eg. Checkbox 1 on screen above
  3. Create an Order
  4. Then go to Accaunt and reorder this order

Expected result

Successful basket creation

Actual result

We're getting an error
Could not add the product with SKU "24-MB01" to the shopping cart: Some of the selected item options are not currently available.
screenshot_2

Additional information

I found out that the problem is that when reordering the option is taken from $buyRequest (vendor/magento/module-catalog/Model/Product/Type/AbstractType.php:583)
$optionsFromRequest = $buyRequest->getOptions();
However, it is not interpreted as an array, but as a scalar
screenshot_3

As a result, when validating \Magento\Catalog\Model\Product\Option\Type\Select::validateUserValue
and we get an error on line 97.

screenshot_4

Release note

No response

Triage and priority

  • 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: CatalogComponent: CheckoutIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.7Indicates 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

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions