File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
skin/frontend/rwd/default/js Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ Minicart.prototype = {
91
91
} ) . done ( function ( result ) {
92
92
cart . hideOverlay ( ) ;
93
93
if ( result . success ) {
94
+ cart . refreshIfOnCartPage ( ) ;
94
95
cart . updateCartQty ( result . qty ) ;
95
96
cart . updateContentOnRemove ( result , el . closest ( 'li' ) ) ;
96
97
} else {
@@ -155,6 +156,7 @@ Minicart.prototype = {
155
156
} ) . done ( function ( result ) {
156
157
cart . hideOverlay ( ) ;
157
158
if ( result . success ) {
159
+ cart . refreshIfOnCartPage ( ) ;
158
160
cart . updateCartQty ( result . qty ) ;
159
161
if ( quantity !== 0 ) {
160
162
cart . updateContentOnUpdate ( result ) ;
@@ -176,7 +178,6 @@ Minicart.prototype = {
176
178
el . hide ( 'slow' , function ( ) {
177
179
$j ( cart . selectors . container ) . html ( result . content ) ;
178
180
cart . showMessage ( result ) ;
179
-
180
181
} ) ;
181
182
} ,
182
183
@@ -224,5 +225,11 @@ Minicart.prototype = {
224
225
225
226
showSuccess : function ( message ) {
226
227
$j ( this . selectors . success ) . text ( message ) . fadeIn ( 'slow' ) ;
228
+ } ,
229
+
230
+ refreshIfOnCartPage : function ( ) {
231
+ if ( document . body . classList . contains ( "checkout-cart-index" ) ) {
232
+ window . location . reload ( true ) ;
233
+ }
227
234
}
228
235
} ;
You can’t perform that action at this time.
0 commit comments