Checkout button stuck loading after changing cart notes to required field.

DanielKoburn
New Member
9 0 0

Hello Everyone,

 

I have cart notes enabled on my site and I recently added some code to make the cart notes field required in order to checkout.  The code works, however, if someone tries to checkout without putting anything in the field, it will display " please enter required field" and then the checkout button displays the spinning wheel graphic.  Once the customer enters info into the order notes I would like for the spinning wheel to stop but it persists even though text has been entered into the required field.  You can click the spinning wheel and it will bring you to checkout but visually it looks as if the button is broken due to the spinning wheel graphic.  

 

I would like to know if there is any way to disable that spinning wheel graphic completely or what code I need to change in order for the text field to update the checkout button so it stops displaying the spinning wheel graphic once the required text is entered into the field.

I have attached images of the two areas where I manipulated code, the curser highlights the exact lines that were manipulated, and an screenshot of the resulting error.

Screenshot (14).png

Screenshot (15).png

Screenshot (16).png

Replies 3 (3)

Developer-G
Shopify Partner
3032 593 846

Hello @DanielKoburn ,

Yes there is way. 
You have to use a JS 'keyup' function
e.g.

// When someone press a click in textarea after clicking the checkout button 
$("#yourtextarea-id").keyup(function(){
    // Hide the loader which is on checkout button.
    $("#loader-ID").hide();
  });

 

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
DanielKoburn
New Member
9 0 0

Thanks so much for the response,  I am not a total novice when it comes to code, but pretty dang close.  Do you think you could point me in the right direction as to where to place this code?  

DanielKoburn
New Member
9 0 0

Hey Thanks for your response,

 

I am still trying to implement this code and cannot figure it out.  Could you perhaps tell me in which file or area to paste this code?  Also, I am able to find my text area ID easily, however, I am having trouble finding the loader ID.