Magento 2 cart keeps loadingMagento - Can't reach shopping cart - redirect straight to checkoutcart vs. mini cart issue … rwd themeIs there an event for apply coupon action in cartAdd to cart not working for configurable productsQuantity in checkout shopping cart doesn't work properly for MagentoHow to trigger a minicart update after adding to cartMagento 2: Add to cart URL incorrectAdd Free Product to Cart price threshold doesn't work after discount appliedCustomer name not appearing and products not showing in mini-cart, Magento 2Add product with customized option in the cart through API

Does C++20 mandate source code being stored in files?

Stuffing in the middle

Did the twin engined Lazair ultralight have a throttle for each engine?

Earliest evidence of objects intended for future archaeologists?

How could Tony Stark wield the Infinity Nano Gauntlet - at all?

Sous vide chicken without an internal temperature of 165

Would it be illegal for Facebook to actively promote a political agenda?

Have only girls been born for a long time in this village?

Is there any road between the CA State Route 120 and Sherman Pass Road (Forest Route 22S0) that crosses Yosemite/Serria/Sequoia National Park/Forest?

Why doesn't mathematics collapse down, even though humans quite often make mistakes in their proofs?

Using は before 欲しい instead が

Was Switzerland really impossible to invade during WW2?

90s(?) book series about two people transported to a parallel medieval world, she joins city watch, he becomes wizard

Church Booleans

How does the Saturn V Dynamic Test Stand work?

How much code would a codegolf golf if a codegolf could golf code?

Why would the President need briefings on UFOs?

E: Sub-process /usr/bin/dpkg returned an error code (1) - but how do I find the meaningful error messages in APT's output?

"Silverware", "Tableware", and "Dishes"

Is a butterfly one or two animals?

Does git delete empty folders?

Is "stainless" a bulk or a surface property of stainless steel?

How to dismiss intrusive questions from a colleague with whom I don't work?

Are there categories whose internal hom is somewhat 'exotic'?



Magento 2 cart keeps loading


Magento - Can't reach shopping cart - redirect straight to checkoutcart vs. mini cart issue … rwd themeIs there an event for apply coupon action in cartAdd to cart not working for configurable productsQuantity in checkout shopping cart doesn't work properly for MagentoHow to trigger a minicart update after adding to cartMagento 2: Add to cart URL incorrectAdd Free Product to Cart price threshold doesn't work after discount appliedCustomer name not appearing and products not showing in mini-cart, Magento 2Add product with customized option in the cart through API






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a weird bug.



Every time I add a product to my cart it shows as if it were loading.



enter image description here



However, it adds the product to the cart, if I switch to another page or reload the loading disappears and shows the amount in the cart.
Do you know what could it be?



This problem began when I moved the cart to top links.










share|improve this question


























  • Could you check the magento log and browser console?

    – Khoa TruongDinh
    Aug 8 at 2:46











  • There are no errors related to this case in my logs

    – Oscar Vazquez
    Aug 8 at 14:08

















0















I have a weird bug.



Every time I add a product to my cart it shows as if it were loading.



enter image description here



However, it adds the product to the cart, if I switch to another page or reload the loading disappears and shows the amount in the cart.
Do you know what could it be?



This problem began when I moved the cart to top links.










share|improve this question


























  • Could you check the magento log and browser console?

    – Khoa TruongDinh
    Aug 8 at 2:46











  • There are no errors related to this case in my logs

    – Oscar Vazquez
    Aug 8 at 14:08













0












0








0








I have a weird bug.



Every time I add a product to my cart it shows as if it were loading.



enter image description here



However, it adds the product to the cart, if I switch to another page or reload the loading disappears and shows the amount in the cart.
Do you know what could it be?



This problem began when I moved the cart to top links.










share|improve this question
















I have a weird bug.



Every time I add a product to my cart it shows as if it were loading.



enter image description here



However, it adds the product to the cart, if I switch to another page or reload the loading disappears and shows the amount in the cart.
Do you know what could it be?



This problem began when I moved the cart to top links.







magento2 product cart addtocart shopping-cart






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 8 at 7:05









Anas Mansuri

1,4252 silver badges16 bronze badges




1,4252 silver badges16 bronze badges










asked Aug 7 at 22:55









Oscar VazquezOscar Vazquez

408 bronze badges




408 bronze badges















  • Could you check the magento log and browser console?

    – Khoa TruongDinh
    Aug 8 at 2:46











  • There are no errors related to this case in my logs

    – Oscar Vazquez
    Aug 8 at 14:08

















  • Could you check the magento log and browser console?

    – Khoa TruongDinh
    Aug 8 at 2:46











  • There are no errors related to this case in my logs

    – Oscar Vazquez
    Aug 8 at 14:08
















Could you check the magento log and browser console?

– Khoa TruongDinh
Aug 8 at 2:46





Could you check the magento log and browser console?

– Khoa TruongDinh
Aug 8 at 2:46













There are no errors related to this case in my logs

– Oscar Vazquez
Aug 8 at 14:08





There are no errors related to this case in my logs

– Oscar Vazquez
Aug 8 at 14:08










1 Answer
1






active

oldest

votes


















1














I once got that problem when tried to overwrite catalog-add-to-cart.js. This file is located in vendormagentomodule-catalogviewfrontendwebjs.



At line 95 of that file:
$(self.options.minicartSelector).trigger('contentLoading');
this will execute whenever Add to cart button is clicked.



From line 153 to line 156:

if (res.minicart)
$(self.options.minicartSelector).replaceWith(res.minicart);
$(self.options.minicartSelector).trigger('contentUpdated');


this block of code must be excuted to make the minicart status become normal. I'm using magento 2.3.2 CE. Hope that may help you.






share|improve this answer

























  • thank you, but what should I do in that file?

    – Oscar Vazquez
    Aug 9 at 17:28











  • In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

    – Hieu Duong
    Aug 10 at 1:21











  • Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

    – Hieu Duong
    Aug 10 at 1:29












  • hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

    – Oscar Vazquez
    Aug 12 at 15:03













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284754%2fmagento-2-cart-keeps-loading%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I once got that problem when tried to overwrite catalog-add-to-cart.js. This file is located in vendormagentomodule-catalogviewfrontendwebjs.



At line 95 of that file:
$(self.options.minicartSelector).trigger('contentLoading');
this will execute whenever Add to cart button is clicked.



From line 153 to line 156:

if (res.minicart)
$(self.options.minicartSelector).replaceWith(res.minicart);
$(self.options.minicartSelector).trigger('contentUpdated');


this block of code must be excuted to make the minicart status become normal. I'm using magento 2.3.2 CE. Hope that may help you.






share|improve this answer

























  • thank you, but what should I do in that file?

    – Oscar Vazquez
    Aug 9 at 17:28











  • In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

    – Hieu Duong
    Aug 10 at 1:21











  • Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

    – Hieu Duong
    Aug 10 at 1:29












  • hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

    – Oscar Vazquez
    Aug 12 at 15:03















1














I once got that problem when tried to overwrite catalog-add-to-cart.js. This file is located in vendormagentomodule-catalogviewfrontendwebjs.



At line 95 of that file:
$(self.options.minicartSelector).trigger('contentLoading');
this will execute whenever Add to cart button is clicked.



From line 153 to line 156:

if (res.minicart)
$(self.options.minicartSelector).replaceWith(res.minicart);
$(self.options.minicartSelector).trigger('contentUpdated');


this block of code must be excuted to make the minicart status become normal. I'm using magento 2.3.2 CE. Hope that may help you.






share|improve this answer

























  • thank you, but what should I do in that file?

    – Oscar Vazquez
    Aug 9 at 17:28











  • In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

    – Hieu Duong
    Aug 10 at 1:21











  • Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

    – Hieu Duong
    Aug 10 at 1:29












  • hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

    – Oscar Vazquez
    Aug 12 at 15:03













1












1








1







I once got that problem when tried to overwrite catalog-add-to-cart.js. This file is located in vendormagentomodule-catalogviewfrontendwebjs.



At line 95 of that file:
$(self.options.minicartSelector).trigger('contentLoading');
this will execute whenever Add to cart button is clicked.



From line 153 to line 156:

if (res.minicart)
$(self.options.minicartSelector).replaceWith(res.minicart);
$(self.options.minicartSelector).trigger('contentUpdated');


this block of code must be excuted to make the minicart status become normal. I'm using magento 2.3.2 CE. Hope that may help you.






share|improve this answer













I once got that problem when tried to overwrite catalog-add-to-cart.js. This file is located in vendormagentomodule-catalogviewfrontendwebjs.



At line 95 of that file:
$(self.options.minicartSelector).trigger('contentLoading');
this will execute whenever Add to cart button is clicked.



From line 153 to line 156:

if (res.minicart)
$(self.options.minicartSelector).replaceWith(res.minicart);
$(self.options.minicartSelector).trigger('contentUpdated');


this block of code must be excuted to make the minicart status become normal. I'm using magento 2.3.2 CE. Hope that may help you.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 8 at 10:34









Hieu DuongHieu Duong

286 bronze badges




286 bronze badges















  • thank you, but what should I do in that file?

    – Oscar Vazquez
    Aug 9 at 17:28











  • In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

    – Hieu Duong
    Aug 10 at 1:21











  • Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

    – Hieu Duong
    Aug 10 at 1:29












  • hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

    – Oscar Vazquez
    Aug 12 at 15:03

















  • thank you, but what should I do in that file?

    – Oscar Vazquez
    Aug 9 at 17:28











  • In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

    – Hieu Duong
    Aug 10 at 1:21











  • Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

    – Hieu Duong
    Aug 10 at 1:29












  • hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

    – Oscar Vazquez
    Aug 12 at 15:03
















thank you, but what should I do in that file?

– Oscar Vazquez
Aug 9 at 17:28





thank you, but what should I do in that file?

– Oscar Vazquez
Aug 9 at 17:28













In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

– Hieu Duong
Aug 10 at 1:21





In my situation, I tried to override this file in my module, and made the function return before the minicart can trigger the 'contentUpdated' event. So if you also try to override this file like I did, take a look at this file in your module.

– Hieu Duong
Aug 10 at 1:21













Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

– Hieu Duong
Aug 10 at 1:29






Open your browser's developer tool (press F12 in many browsers), go to network tab and try to add a product to cart. You will see something like ?sections=cart%2Cmessages&force_new_section_timestamp=true&_=1565400355595. This is update cart request which contain updated minicart's html in server's response.

– Hieu Duong
Aug 10 at 1:29














hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

– Oscar Vazquez
Aug 12 at 15:03





hello I think it works now, I moved $(self.options.minicartSelector).trigger('contentLoading'); function before $(self.options.minicartSelector).replaceWith(res.minicart); and it seems to work.

– Oscar Vazquez
Aug 12 at 15:03

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284754%2fmagento-2-cart-keeps-loading%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?