Skip to content

Commit a31a1cc

Browse files
author
Volodymyr Zaets
committed
MAGETWO-44405: Unable to change item cart qty from item configure page
- Merge remote-tracking branch 'origin/MAGETWO-44405' into PR - Conflicts: app/code/Magento/Msrp/view/base/web/js/msrp.js
2 parents dd9386c + 095e1f6 commit a31a1cc

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

app/code/Magento/Catalog/view/frontend/requirejs-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ var config = {
1111
relatedProducts: 'Magento_Catalog/js/related-products',
1212
upsellProducts: 'Magento_Catalog/js/upsell-products',
1313
productListToolbarForm: 'Magento_Catalog/js/product/list/toolbar',
14-
tierPrice: 'Magento_Catalog/js/tier-price',
15-
addToCart: 'Magento_Msrp/js/msrp',
1614
catalogGallery: 'Magento_Catalog/js/gallery',
1715
priceBox: 'Magento_Catalog/js/price-box',
1816
priceOptionDate: 'Magento_Catalog/js/price-option-date',

app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
<?php endif; ?>
2424
<div class="actions">
25-
<button type="button"
25+
<button type="submit"
2626
title="<?php /* @escapeNotVerified */ echo $buttonTitle ?>"
2727
class="action primary tocart"
2828
id="product-updatecart-button">

app/code/Magento/Msrp/view/base/web/js/msrp.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,29 @@ define([
226226
closePopup: function ($elem) {
227227
$elem.dropdownDialog('close');
228228
$(document).off('mouseup');
229+
},
230+
231+
/**
232+
* Handler for addToCart action
233+
*/
234+
_addToCartSubmit: function () {
235+
this.element.trigger('addToCart', this.element);
236+
237+
if (this.element.data('stop-processing')) {
238+
return false;
239+
}
240+
241+
if (this.options.addToCartButton) {
242+
$(this.options.addToCartButton).click();
243+
244+
return false;
245+
}
246+
247+
if (this.options.addToCartUrl) {
248+
$('.mage-dropdown-dialog > .ui-dialog-content').dropdownDialog('close');
249+
}
250+
$(this.options.cartForm).submit();
251+
229252
}
230253
});
231254

0 commit comments

Comments
 (0)