File tree 3 files changed +5
-5
lines changed
Catalog/view/frontend/templates/product/view
Checkout/view/frontend/web/js/view/configure
ConfigurableProduct/view/frontend/web/js
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
22
<input type="hidden" name="product" value="<?= /* @escapeNotVerified */ $ _product ->getId () ?> " />
23
23
<input type="hidden" name="selected_configurable_option" value="" />
24
24
<input type="hidden" name="related_product" id="related-products-field" value="" />
25
- <input type="hidden" name="item" value="<?= $ block ->getRequest ()->getParam ('id ' ) ?> " />
25
+ <input type="hidden" name="item" value="<?= /* @noEscape */ $ block ->getRequest ()->getParam ('id ' ) ?> " />
26
26
<?= $ block ->getBlockHtml ('formkey ' ) ?>
27
27
<?= $ block ->getChildHtml ('form_top ' ) ?>
28
28
<?php if (!$ block ->hasOptions ()):?>
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ require([
42
42
return ;
43
43
}
44
44
product = data . items . find ( function ( item ) {
45
- if ( item [ 'item_id' ] == itemId ) {
45
+ if ( item [ 'item_id' ] === itemId ) {
46
46
return item [ 'product_id' ] === productId ||
47
47
item [ 'item_id' ] === productId ;
48
48
}
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ define([
8
8
var selectors = {
9
9
formSelector : '#product_addtocart_form' ,
10
10
productIdSelector : '#product_addtocart_form [name="product"]' ,
11
- itemIdSelector :'#product_addtocart_form [name="item"]'
11
+ itemIdSelector : '#product_addtocart_form [name="item"]'
12
12
} ,
13
13
cartData = customerData . get ( 'cart' ) ,
14
14
productId = $ ( selectors . productIdSelector ) . val ( ) ,
15
- itemId = $ ( selectors . itemIdSelector ) . val ( ) ,
15
+ itemId = $ ( selectors . itemIdSelector ) . val ( ) ,
16
16
17
17
/**
18
18
* set productOptions according to cart data from customer-data
@@ -27,7 +27,7 @@ define([
27
27
return false ;
28
28
}
29
29
changedProductOptions = data . items . find ( function ( item ) {
30
- if ( item [ 'item_id' ] == itemId ) {
30
+ if ( item [ 'item_id' ] === itemId ) {
31
31
return item [ 'product_id' ] === productId ;
32
32
}
33
33
} ) ;
You can’t perform that action at this time.
0 commit comments