Forms - Add a back in stock notification form

C-Unlucky
Tourist
6 1 7

Also confused about how to implement this code properly - this advice seems extremely outdated for templates using sections. I'm using the Simple theme and I can't find any of these HTML wrappers. Even with the help from some other users above, it still leaves us high and dry for figuring out to actually implement this code

0 Likes
CJTCoops
Tourist
7 0 1

Any updates???

0 Likes
Novice_Nina
Tourist
14 0 1

hi @TyW and others

 

would be great to see how your code can be implemented in product-template.liquid with the <form> tag now being: {% form 'product', product, class:form_classes, id:form_id, data-product-form: '' %}

 

thank you in advance for your help.

0 Likes
CJTCoops
Tourist
7 0 1

I need to add this to a Debut theme.

Does anyone know how to do this please?

0 Likes
oost
New Member
2 0 5

I have done some testing and it seems if your theme is using that form style you must wrap the entire form in the if statement. So everything from {% form %} until {% endform %}

 

{% if product.available %}
     {% form 'product', product, class:form_classes, novalidate: 'novalidate', data-product-form: '' %}
          ...
          ... All your form content
          ...
     {% endform %}
{% endif %}

Then you can continue the tutorial in the original comment from step 6 and see where you get with that.

Check out our Shopify apps at https://oostapps.com
shishir
New Member
2 0 0

Hi

In DEBUT theme , you can not find form tag directly, it is added through section template named product-template.liquid and code is below

{% form 'product', product, class:form_classes, novalidate: 'novalidate', data-product-form: '' %}

 

You can simply search for form keyword in same template

0 Likes
AlexM4
Tourist
8 0 1

Thanks all,

 

following the above I managed to find the form codes and implement everything. The field and button look great on my test environment. But in testing it takes me to the page "/cart/add" and "Oops, something went wrong" message. 

I can't figure out where in the coding needs to change to keep me away from the cart/add page, and have already moved the text block all over the code to try.

 

Does anyone also have tips on how to further implement this for variants? I tried so far to put it within the varient if statments, but have not further played around

Matt_Wilson-BPG
Excursionist
37 0 4

Thank you so much for this it works incredibly well.

 

How do I go about altering the content of the email to more easily tailor my Zapier task to pull data from different sections of the email?

0 Likes
danielagsb
Explorer
69 0 14

Hi, 

I am using boundless theme. I can find the form 'product' which appears as {% form 'product', product, id:form_id, class:form_class, data-cart-form: '' %} and wrap it in an  {% if product.available %} statement, however I don't manage to get the notification form to appear on my page (i.e. step 6). 

Can anyone help? 

Thank you so much

 

 

0 Likes
Roberto_Reyes
New Member
3 0 0

Hello, ¿how can i ask for phone number also on this form?

 

Thank you in advanced!

0 Likes