33
33
$ defaultMinSaleQty = $ block ->getDefaultConfigValue ('min_sale_qty ' );
34
34
if (!is_numeric ($ defaultMinSaleQty )) {
35
35
$ defaultMinSaleQty = json_decode ($ defaultMinSaleQty , true );
36
- $ defaultMinSaleQty = (float ) $ defaultMinSaleQty [\Magento \Customer \Api \Data \GroupInterface::CUST_GROUP_ALL ] ?? 1 ;
36
+ $ defaultMinSaleQty = (float ) ( $ defaultMinSaleQty [\Magento \Customer \Api \Data \GroupInterface::CUST_GROUP_ALL ] ?? 1 ) ;
37
37
}
38
38
?>
39
39
<div class="fieldset-wrapper form-inline advanced-inventory-edit">
@@ -52,17 +52,19 @@ if (!is_numeric($defaultMinSaleQty)) {
52
52
<div class="control">
53
53
<div class="fields-group-2">
54
54
<div class="field">
55
- <select id="inventory_manage_stock" name="<?= /* @noEscape */ $ block ->getFieldSuffix () ?> [manage_stock]"
55
+ <select id="inventory_manage_stock"
56
+ name="<?= /* @noEscape */ $ block ->getFieldSuffix () ?> [manage_stock]"
56
57
class="select" disabled="disabled">
57
58
<option value="1"><?= $ block ->escapeHtml (__ ('Yes ' )) ?> </option>
58
59
<option value="0"
59
- <?php if ($ block ->getFieldValue ('manage_stock ' ) == 0 ) :?>
60
+ <?php if ($ block ->getFieldValue ('manage_stock ' ) == 0 ):?>
60
61
selected="selected"
61
62
<?php endif ; ?> ><?= $ block ->escapeHtml (__ ('No ' )) ?> </option>
62
63
</select>
63
64
</div>
64
65
<div class="field choice">
65
- <input name="<?= /* @noEscape */ $ block ->getFieldSuffix () ?> [use_config_manage_stock]" type="checkbox"
66
+ <input name="<?= /* @noEscape */ $ block ->getFieldSuffix () ?> [use_config_manage_stock]"
67
+ type="checkbox"
66
68
id="inventory_use_config_manage_stock" data-role="toggle-editability" value="1"
67
69
checked="checked" disabled="disabled"/>
68
70
<label for="inventory_use_config_manage_stock"
@@ -211,13 +213,15 @@ if (!is_numeric($defaultMinSaleQty)) {
211
213
disabled="disabled">
212
214
<option value="0"><?= $ block ->escapeHtml (__ ('No ' )) ?> </option>
213
215
<option value="1"
214
- <?php if ($ block ->getDefaultConfigValue ('is_qty_decimal ' ) == 1 ) :?>
216
+ <?php if ($ block ->getDefaultConfigValue ('is_qty_decimal ' ) == 1 ):?>
215
217
selected="selected"
216
218
<?php endif ; ?> ><?= $ block ->escapeHtml (__ ('Yes ' )) ?> </option>
217
219
</select>
218
220
</div>
219
221
<div class="field choice">
220
- <input type="checkbox" id="inventory_is_qty_decimal_checkbox" data-role="toggle-editability-all"/>
222
+ <input type="checkbox"
223
+ id="inventory_is_qty_decimal_checkbox"
224
+ data-role="toggle-editability-all"/>
221
225
<label for="inventory_is_qty_decimal_checkbox"
222
226
class="label"><span><?= $ block ->escapeHtml (__ ('Change ' )) ?> </span></label>
223
227
</div>
@@ -238,10 +242,12 @@ if (!is_numeric($defaultMinSaleQty)) {
238
242
name="<?= /* @noEscape */ $ block ->getFieldSuffix () ?> [backorders]"
239
243
class="select"
240
244
disabled="disabled">
241
- <?php foreach ($ block ->getBackordersOption () as $ option ) :?>
242
- <?php $ _selected = ($ option ['value ' ] == $ block ->getDefaultConfigValue ('backorders ' )) ? ' selected="selected" ' : '' ?>
243
- <option
244
- value="<?= $ block ->escapeHtmlAttr ($ option ['value ' ]) ?> "<?= /* @noEscape */ $ _selected ?> ><?= $ block ->escapeHtml ($ option ['label ' ]) ?> </option>
245
+ <?php foreach ($ block ->getBackordersOption () as $ option ):?>
246
+ <?php $ _selected = ($ option ['value ' ] == $ block ->getDefaultConfigValue ('backorders ' ))
247
+ ? ' selected="selected" ' : '' ?>
248
+ <option value="<?= $ block ->escapeHtmlAttr ($ option ['value ' ]) ?> "
249
+ <?= /* @noEscape */ $ _selected ?> ><?= $ block ->escapeHtml ($ option ['label ' ]) ?>
250
+ </option>
245
251
<?php endforeach ; ?>
246
252
</select>
247
253
</div>
@@ -291,7 +297,9 @@ if (!is_numeric($defaultMinSaleQty)) {
291
297
class="label"><span><?= $ block ->escapeHtml (__ ('Use Config Settings ' )) ?> </span></label>
292
298
</div>
293
299
<div class="field choice">
294
- <input type="checkbox" id="inventory_notify_stock_qty_checkbox" data-role="toggle-editability-all"/>
300
+ <input type="checkbox"
301
+ id="inventory_notify_stock_qty_checkbox"
302
+ data-role="toggle-editability-all"/>
295
303
<label for="inventory_notify_stock_qty_checkbox"
296
304
class="label"><span><?= $ block ->escapeHtml (__ ('Change ' )) ?> </span></label>
297
305
</div>
@@ -314,7 +322,7 @@ if (!is_numeric($defaultMinSaleQty)) {
314
322
disabled="disabled">
315
323
<option value="1"><?= $ block ->escapeHtml (__ ('Yes ' )) ?> </option>
316
324
<option value="0"
317
- <?php if ($ block ->getDefaultConfigValue ('enable_qty_increments ' ) == 0 ) :?>
325
+ <?php if ($ block ->getDefaultConfigValue ('enable_qty_increments ' ) == 0 ):?>
318
326
selected="selected"
319
327
<?php endif ; ?> ><?= $ block ->escapeHtml (__ ('No ' )) ?> </option>
320
328
</select>
@@ -330,7 +338,9 @@ if (!is_numeric($defaultMinSaleQty)) {
330
338
class="label"><span><?= $ block ->escapeHtml (__ ('Use Config Settings ' )) ?> </span></label>
331
339
</div>
332
340
<div class="field choice">
333
- <input type="checkbox" id="inventory_enable_qty_increments_checkbox" data-role="toggle-editability-all"/>
341
+ <input type="checkbox"
342
+ id="inventory_enable_qty_increments_checkbox"
343
+ data-role="toggle-editability-all"/>
334
344
<label for="inventory_enable_qty_increments_checkbox"
335
345
class="label"><span><?= $ block ->escapeHtml (__ ('Change ' )) ?> </span></label>
336
346
</div>
@@ -364,7 +374,9 @@ if (!is_numeric($defaultMinSaleQty)) {
364
374
class="label"><span><?= $ block ->escapeHtml (__ ('Use Config Settings ' )) ?> </span></label>
365
375
</div>
366
376
<div class="field choice">
367
- <input type="checkbox" id="inventory_qty_increments_checkbox" data-role="toggle-editability-all"/>
377
+ <input type="checkbox"
378
+ id="inventory_qty_increments_checkbox"
379
+ data-role="toggle-editability-all"/>
368
380
<label for="inventory_qty_increments_checkbox"
369
381
class="label"><span><?= $ block ->escapeHtml (__ ('Change ' )) ?> </span></label>
370
382
</div>
@@ -385,11 +397,15 @@ if (!is_numeric($defaultMinSaleQty)) {
385
397
name="<?= /* @noEscape */ $ block ->getFieldSuffix () ?> [is_in_stock]" class="select"
386
398
disabled="disabled">
387
399
<option value="1"><?= $ block ->escapeHtml (__ ('In Stock ' )) ?> </option>
388
- <option value="0"<?php if ($ block ->getDefaultConfigValue ('is_in_stock ' ) == 0 ) :?> selected<?php endif ; ?> ><?= $ block ->escapeHtml (__ ('Out of Stock ' )) ?> </option>
400
+ <option value="0"<?php if ($ block ->getDefaultConfigValue ('is_in_stock ' ) == 0 ):?>
401
+ selected<?php endif ; ?> ><?= $ block ->escapeHtml (__ ('Out of Stock ' )) ?>
402
+ </option>
389
403
</select>
390
404
</div>
391
405
<div class="field choice">
392
- <input type="checkbox" id="inventory_stock_availability_checkbox" data-role="toggle-editability-all"/>
406
+ <input type="checkbox"
407
+ id="inventory_stock_availability_checkbox"
408
+ data-role="toggle-editability-all"/>
393
409
<label for="inventory_stock_availability_checkbox"
394
410
class="label"><span><?= $ block ->escapeHtml (__ ('Change ' )) ?> </span></label>
395
411
</div>
0 commit comments