File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
app/code/Magento/Wishlist/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ define([
2525 /** @inheritdoc */
2626 _create : function ( ) {
2727 this . _bind ( ) ;
28+ this . _triggerWishlistFormUpdate ( ) ;
2829 } ,
2930
3031 /**
@@ -58,16 +59,22 @@ define([
5859 }
5960 }
6061 this . _on ( events ) ;
61- this . _ready ( ) ;
6262 } ,
6363
6464 /**
65- * Update wishlist on page load
65+ * Update wishlist on page load and before submit
6666 *
6767 * @private
6868 */
69- _ready : function ( ) {
69+ _triggerWishlistFormUpdate : function ( ) {
70+ var key ;
71+
7072 $ ( this . options . qtyInfo ) . trigger ( 'change' ) ;
73+ for ( key in this . options . productType ) {
74+ if ( this . options . productType . hasOwnProperty ( key ) && this . options . productType [ key ] + 'Info' in this . options ) {
75+ $ ( this . options [ this . options . productType [ key ] + 'Info' ] ) . trigger ( 'change' ) ;
76+ }
77+ }
7178 } ,
7279
7380 /**
@@ -277,6 +284,8 @@ define([
277284 _validateWishlistQty : function ( event ) {
278285 var element = $ ( this . options . qtyInfo ) ;
279286
287+ this . _triggerWishlistFormUpdate ( ) ;
288+
280289 if ( ! ( element . validation ( ) && element . validation ( 'isValid' ) ) ) {
281290 event . preventDefault ( ) ;
282291 event . stopPropagation ( ) ;
You can’t perform that action at this time.
0 commit comments