For more than a year we had a small code working within the product page, a subscription form for the customer to write down their email so he will be notified when a sold out product is restocked again. This form sent us an email with the following data: the email that the client had written down, product name and product id. Once we received this email, we externally processed this request on our own. It worked perfectly while we kept on Prestige theme 4.11.0.
We have recently updated the Prestige theme to version 5.7.0 and this code no longer works. The form “submit” button does not send the message anymore, but also when clicked product is added to cart and the user is redirected to cart page. We have not been able to locate how to fix it.
Find attached the form code.
{% unless product.available %}
{% form 'contact' %}
{% if form.posted_successfully? %}
¡Tomamos nota! Te avisaremos cuando vuelva a estar disponible.
{% else %}
{% if form.errors %}
Por favor, introduce una dirección de correo electrónico válida.
{% else %}
¿Quieres que te avisemos cuando vuelva a estar disponible?
{% endif %}
{% endif %}
{% unless form.posted_successfully? %}
{% if customer %}
{% else %}
{% endif %}
{% endunless %}
{% endform %}
{% endunless %}
Is there someone who could give us some light about this issue?
Following your explanation I’ve checked the code by myself and I’ve found clearly what you suggested, so I’ve been able to modify it. Now it works like a charm!