How to change the add to cart to notify me when available on sunrise shopify theme?

New Member
1 0 0

I need to know how to automatically change the add to cart button to Notify me when available once in stock and send an automated message to the customer that the item is available to purchase. I have included the product-loop.liquid code below.

{% comment %}
    Renders a product card using "Grid" style
    - max_height: {Number} Maximum height of the product's image (required)
    - product: {Object} Product Liquid object (required)
    - show_vendor: {Boolean} Show the product's vendor depending on the section setting (optional)
    - show_sale: {Boolean} show sale sticker
    {% render 'product-loop', max_height: max_height, product: product, show_vendor: section.settings.show_vendor, show_sale:section.settings.show_sale_sticker %}
{% endcomment %}
  <a class="prod-th" href="{{ product.url | within:collection }}" title="{{ product.title | escape }}">
    {% render 'product-grid-image',, img:product.featured_media.preview_image, max_height: max_height %}

    <span class="product-title">
      {% if show_vendor %}<i class="th-vendor">{{product.vendor}}</i>{% endif %}
      <span class="title">
        {{ product.title | escape }}
      {% render 'product-price', product: product %} 

    {% if product.compare_at_price > product.price %}
      {% if show_sale %}
        <span class="sale round">{{ '' | t }}</span>
          {% endif %}
    {% endif %}
<form method="post" action="/cart/add">
    <input type="hidden" name="id" value="{{ }}" />
    <input type="Submit" value="{% if product.variants.first.available%}Add To Cart{% else %}Email Me{% endif%}" class="btn" {% unless product.variants.first.available %}disabled{% endunless %} />
    <input type="text" id="input-email" name="input-email" value="Enter your email here"/>
   <input type="submit" title="Notify Me" value="Notify Me">