File tree 1 file changed +7
-3
lines changed
app/code/Magento/Checkout/view/frontend/web/js/view/configure
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ require([
7
7
8
8
var selectors = {
9
9
qtySelector : '#product_addtocart_form [name="qty"]' ,
10
- productIdSelector : '#product_addtocart_form [name="product"]'
10
+ productIdSelector : '#product_addtocart_form [name="product"]' ,
11
+ itemIdSelector : '#product_addtocart_form [name="item"]'
11
12
} ,
12
13
cartData = customerData . get ( 'cart' ) ,
13
14
productId = $ ( selectors . productIdSelector ) . val ( ) ,
15
+ itemId = $ ( selectors . itemIdSelector ) . val ( ) ,
14
16
productQty ,
15
17
productQtyInput ,
16
18
@@ -40,8 +42,10 @@ require([
40
42
return ;
41
43
}
42
44
product = data . items . find ( function ( item ) {
43
- return item [ 'product_id' ] === productId ||
44
- item [ 'item_id' ] === productId ;
45
+ if ( item [ 'item_id' ] == itemId ) {
46
+ return item [ 'product_id' ] === productId ||
47
+ item [ 'item_id' ] === productId ;
48
+ }
45
49
} ) ;
46
50
47
51
if ( ! product ) {
You can’t perform that action at this time.
0 commit comments