@@ -20,68 +20,70 @@ $viewModel = $block->getData('validateQuantityViewModel');
20
20
</label>
21
21
<div class="control">
22
22
<div class="nested options-list">
23
- <?php if ($ block ->showSingle ()) : ?>
23
+ <?php if ($ block ->showSingle ()): ?>
24
24
<?= /* @noEscape */ $ block ->getSelectionTitlePrice ($ _selections [0 ]) ?>
25
25
<?= /* @noEscape */ $ block ->getTierPriceRenderer ()->renderTierPrice ($ _selections [0 ]) ?>
26
26
<input type="hidden"
27
- class="bundle-option-<?= (int )$ _option ->getId () ?> product bundle option"
28
- name="bundle_option[<?= (int )$ _option ->getId () ?> ]"
29
- value="<?= (int )$ _selections [0 ]->getSelectionId () ?> "
30
- id="bundle-option-<?= (int )$ _option ->getId () ?> -<?= (int )$ _selections [0 ]->getSelectionId () ?> "
31
- checked="checked"
27
+ class="bundle-option-<?= (int )$ _option ->getId () ?> product bundle option"
28
+ name="bundle_option[<?= (int )$ _option ->getId () ?> ]"
29
+ value="<?= (int )$ _selections [0 ]->getSelectionId () ?> "
30
+ id="bundle-option-<?= (int )$ _option ->getId () ?> -<?= (int )$ _selections [0 ]->getSelectionId () ?> "
31
+ checked="checked"
32
32
/>
33
- <?php else : ?>
34
- <?php if (!$ _option ->getRequired ()) : ?>
33
+ <?php else : ?>
34
+ <?php if (!$ _option ->getRequired ()): ?>
35
35
<div class="field choice">
36
36
<input type="radio"
37
37
class="radio product bundle option"
38
38
id="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> "
39
39
name="bundle_option[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
40
40
data-selector="bundle_option[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
41
- <?= ($ _default && $ _default ->isSalable ())?'' :' checked="checked" ' ?>
41
+ <?= ($ _default && $ _default ->isSalable ())?'' :' checked="checked" ' ?>
42
42
value=""/>
43
43
<label class="label" for="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ">
44
44
<span><?= $ block ->escapeHtml (__ ('None ' )) ?> </span>
45
45
</label>
46
46
</div>
47
47
<?php endif ; ?>
48
- <?php foreach ($ _selections as $ _selection ) : ?>
48
+ <?php foreach ($ _selections as $ _selection ): ?>
49
49
<div class="field choice">
50
50
<input type="radio"
51
51
class="radio product bundle option change-container-classname"
52
- id="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> -<?= $ block ->escapeHtmlAttr ($ _selection ->getSelectionId ()) ?> "
53
- <?php if ($ _option ->getRequired ()) { echo 'data-validate="{ \'validate-one-required-by-name \':true}" ' ; }?>
52
+ id="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?>
53
+ -<?= $ block ->escapeHtmlAttr ($ _selection ->getSelectionId ()) ?> "
54
+ <?php if ($ _option ->getRequired ()) {
55
+ echo 'data-validate="{ \'validate-one-required-by-name \':true}" ' ;
56
+ } ?>
54
57
name="bundle_option[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
55
58
data-selector="bundle_option[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
56
- <?php if ($ block ->isSelected ($ _selection )) { echo ' checked="checked" ' ; } ?>
57
- <?php if (!$ _selection ->isSaleable ()) { echo ' disabled="disabled" ' ; } ?>
58
- value="<?= $ block ->escapeHtmlAttr ($ _selection ->getSelectionId ()) ?> "
59
- data-errors-message-box="#validation-message-box-radio"/>
59
+ <?php if ($ block ->isSelected ($ _selection )) { echo ' checked="checked" ' ; } ?>
60
+ <?php if (!$ _selection ->isSaleable ()) { echo ' disabled="disabled" ' ; } ?>
61
+ value="<?= $ block ->escapeHtmlAttr ($ _selection ->getSelectionId ()) ?> "/>
60
62
<label class="label"
61
- for="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> -<?= $ block ->escapeHtmlAttr ($ _selection ->getSelectionId ()) ?> ">
63
+ for="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?>
64
+ -<?= $ block ->escapeHtmlAttr ($ _selection ->getSelectionId ()) ?> ">
62
65
<span><?= /* @noEscape */ $ block ->getSelectionTitlePrice ($ _selection ) ?> </span>
63
66
<br/>
64
67
<?= /* @noEscape */ $ block ->getTierPriceRenderer ()->renderTierPrice ($ _selection ) ?>
65
68
</label>
66
69
</div>
67
70
<?php endforeach ; ?>
68
71
<div id="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> -container"></div>
69
- <div id="validation-message-box-radio"></div>
70
72
<?php endif ; ?>
71
73
<div class="field qty qty-holder">
72
74
<label class="label" for="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> -qty-input">
73
75
<span><?= $ block ->escapeHtml (__ ('Quantity ' )) ?> </span>
74
76
</label>
75
77
<div class="control">
76
78
<input <?php if (!$ _canChangeQty ) { echo ' disabled="disabled" ' ; } ?>
77
- id="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> -qty-input"
78
- class="input-text qty<?php if (!$ _canChangeQty ) { echo ' qty-disabled ' ; } ?> "
79
- type="number"
80
- min="0"
81
- data-validate="<?= $ block ->escapeHtmlAttr ($ viewModel ->getQuantityValidators ()) ?> "
82
- name="bundle_option_qty[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
83
- data-selector="bundle_option_qty[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
84
- value="<?= $ block ->escapeHtmlAttr ($ _defaultQty ) ?> "/>
79
+ id="bundle-option-<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> -qty-input"
80
+ class="input-text qty<?php if (!$ _canChangeQty ) { echo ' qty-disabled ' ; } ?> "
81
+ type="number"
82
+ min="0"
83
+ data-validate="<?= $ block ->escapeHtmlAttr ($ viewModel ->getQuantityValidators ()) ?> "
84
+ name="bundle_option_qty[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
85
+ data-selector="bundle_option_qty[<?= $ block ->escapeHtmlAttr ($ _option ->getId ()) ?> ]"
86
+ value="<?= $ block ->escapeHtmlAttr ($ _defaultQty ) ?> "/>
85
87
</div>
86
88
</div>
87
89
</div>
0 commit comments