Skip to content

Commit dd8bf80

Browse files
ENGCOM-5525: [Catalog] Fix user value verification when adding product with multiselect custom option to cart #23871
- Merge Pull Request #23871 from magenius-team/magento2:bug/multiselect-options-verification - Merged commits: 1. 1acde36
2 parents d3c55bb + 1acde36 commit dd8bf80

File tree

1 file changed

+3
-0
lines changed
  • app/code/Magento/Catalog/Model/Product/Option/Type

1 file changed

+3
-0
lines changed

app/code/Magento/Catalog/Model/Product/Option/Type/Select.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public function validateUserValue($values)
8484
);
8585
}
8686
if (!$this->_isSingleSelection()) {
87+
if (is_string($value)) {
88+
$value = explode(',', $value);
89+
}
8790
$valuesCollection = $option->getOptionValuesByOptionId($value, $this->getProduct()->getStoreId())->load();
8891
$valueCount = is_array($value) ? count($value) : 0;
8992
if ($valuesCollection->count() != $valueCount) {

0 commit comments

Comments
 (0)