Disable Add to Cart Button until app is loaded

To ensure the Add to Cart button is only available after the app has fully loaded, you can edit the button code by adding the disabled attribute to the button when the page is loaded initially.


This prevents users from clicking the button while the app is still loading. Once the app has finished loading, the data-live-enabled attribute will automatically remove the disabled attribute, making the button clickable again.

Button HTML

The code below is an example of how you can modify the button. The exact  code may vary depending on your theme.

<div class="product-form__buttons">
  <button type="submit" name="add" class="submit" disabled data-live-enabled>         
   Add to cart
 </button>
</div>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.