Skip to content

Commit d54ae8d

Browse files
author
Andrii Lugovyi
committed
MAGETWO-45114: Custom option, checkbox, required - requires all options to be selected
1 parent 180ca97 commit d54ae8d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function getValuesHtml()
142142
' name="options[' .
143143
$_option->getId() .
144144
']' .
145-
(!empty($arraySign) ? '[' . $htmlValue . ']' : '') .
145+
$arraySign .
146146
'" id="options_' .
147147
$_option->getId() .
148148
'_' .

app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ define([
8989
},
9090
_getElementData: function(element) {
9191
var data = {},
92-
elementName = $(element).attr('name'),
92+
elementName = $(element).attr('id').replace(/[^_]+/, 'options').replace(/_(\d+)/g, '[$1]'),
9393
elementValue = $(element).val();
9494
if ($(element).is('select[multiple]') && elementValue !== null) {
9595
if (elementName.substr(elementName.length - 2) == '[]') {

0 commit comments

Comments
 (0)