Ecommerce Shopify WordPress Discussion

Notify me popup disappears after few seconds in shopify

I am trying to add notify me popup that appears within the product div when a customer clicks on soldout sizes. It works fine and appears when there is only one size variant and that is out of stock but popup box disappears after a few seconds when we have mix instock and soldout sizes. Here is the liquid file code: {% if settings.enable_notify_form %} <div id="nofify_sold-out" data-form-notify {% if current_variant.available %} {% if product.available and variantCount > 0 %}style="display: none"{% endif %} {% endif %} {% if variantCount > 0 and product.variants[0].title != 'Default Title' %} data-success="{{ 'products.notify_form.success_variant' | t }}" {% else %} data-success="{{ 'products.notify_form.success_product' | t }}" {% endif %} data-error="{{ 'products.notify_form.error' | t }}"> <h4 class="title">{{ 'products.notify_form.title' | t }}</h4> {% form 'contact', id: 'sold-out_form' %} {% if form.posted_successfully? %} {% if variantCount > 0 and product.variants[0].title != 'Default Title' %} <div class="note form-success" style="display: none"> {{ 'products.notify_form.success_variant' | t }} </div> {% else %} <div class="note form-success" style="display: none"> {{ 'products.notify_form.success_product' | t }} </div> {% endif %} <script> $(document).ready(function(){ if ($.cookie('soldOut') == 'closed') { // $('#sold-out_form .form-success').show(); var success = $('#nofify_sold-out').data('success'); $('#notify-soldout .modal-body').html(success); $('#notify-soldout').modal(); var newURL = location.href.split("?")[0]; window.history.pushState('object', document.title, newURL); } }); </script> {% endif %} <div id="notify-me-wrapper" class="clearfix form-content"> <!-- <input type="hidden" class="form-input" name="contact[NOTIFY ME OUT OF STOCK]" /> --> <input type="hidden" class="form-input" name="contact[Product Title]" value="{{ product.title }}" /> <input type="hidden" class="form-input" name="contact[Product Link]" value="{{ shop.url | append: current_variant.url }}" data-value-email /> <input type="email" name="contact[email]" required id="contactFormEmail" placeholder="{{ 'products.notify_form.placeholder' | t }}" class="form-input input-field" value="{{}}"> <input type="submit" class="button btn btn--secondary" id="soldOut-button" value="{{ 'products.notify_form.submit' | t }}"> </div> {% endform %} </div> {% endif %} To display on the product page: {% render 'nofify-sold-out', product: product, variantCount: variantCount, current_variant: current_variant %}
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.