Disable Checkout button while script is loading

New Member
5 0 0

I noticed that some sites have the checkout button disabled while the page finishes loading. I use the quantity breaks app so it would be useful do disable the button while the new price loads. 

 

Does anyone know how to do this?

 

 

0 Likes
Shopify Expert
9764 86 1512

You would need to set the button as disable (hide, remove, whatever) first, then on load use JavaScript to enable it. It's not often a recommended practice because if the JavaScript fails at any point it's possible that your checkout button won't be made active (aka: broken).

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
New Member
5 0 0

Thanks for the reply.

There has to be another way. I think it uses something with Ajax. I see these buttons work my fading similar to my add to cart ajax button. 

 

I guess the best way to do it is with a time delay. How would I make the button delay for a certain amount of time like the add to cart button does?

0 Likes
Highlighted
Excursionist
13 1 0

I am not using checkout button only paypal for my store. How can i hide it or remove it? Thanks

0 Likes