{% if backUrl is not defined %}
{%
set backUrl = pimcore_url(
{
"name": product.urlTitle,
"articlenumber": product.articleNumber
},
"shopHandlerProductDetail"
) %}
{% endif %}
{% set bundleNameTwig = document.getProperty('brandCode') %}
<div style="margin-top: 20px;">
{% if productStockInformCustomerData.res %}
<p>
{% if productStockInformCustomerData.lastSent is not empty %}
Sie wurden am {{ productStockInformCustomerData.lastSent.format('d.m.Y') }} über die Artikelverfügbarkeit informiert.
<br>
<a href="{{ pimcore_url({"action": "renew", "productId": product.id, "backurl": detailViewUri}, "productStockInformCustomer") }}">→ Jetzt Erinnerung erneuern.</a>
{% else %}
{% if productStockInformCustomerData.optIn == false %}
✔ {{ 'productStockInformCustomer.add' | trans }}
{% else %}
✔ {{ 'productStockInformCustomer.entryAlreadyExistsCustomer' | trans }}
{% endif %}
{% endif %}
</p>
{% else %}
<form action="{{ pimcore_url({"action": "add", "productId": product.id}, "productStockInformCustomer") }}" method="post">
<input type="hidden" name="backurl" value="{{ backUrl }}">
{% if user is empty %}
{% if bundleNameTwig == 'Bbque' and labelBlack is defined and labelBlack %}
<div style="color:#000;text-align: left">E-Mail</div>
{% endif %}
<input class="productStockInformCustomer-mail" type="email" required name="email" placeholder="E-Mail"/>
{% endif %}
<div style="margin: 10px 0 10px 0;{% if bundleNameTwig == 'Bbque' %}color:{% if labelBlack is defined and labelBlack %}#000{% else %}#fff{% endif %}{% endif %}">
<small>
<span style="display: none;" id="hash_msg_entryAlreadyExistsCustomer_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.entryAlreadyExistsCustomer' | trans }}</span>
<span style="display: none;" id="hash_msg_entryAlreadyExistsEmail_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.entryAlreadyExistsEmail' | trans }}</span>
<span style="display: none;" id="hash_msg_add_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.add' | trans }}</span>
<span style="display: none;" id="hash_msg_new_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.new' | trans }}</span>
<span style="display: none;" id="hash_msg_renew_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.renew' | trans }}</span>
<span style="display: none;" id="hash_msg_customerNotFound_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.customerNotFound' | trans }}</span>
<span style="display: none;" id="hash_msg_entryAlreadyExistsEmailLastSent_{{ product.id }}" class="">
{{ 'productStockInformCustomer.entryAlreadyExistsEmailLastSent' | trans }}
{% if email is defined and email is not empty %}
<br>
<a href="{{ pimcore_url({"action": "renew", "email": email, "productId": product.id, "backurl": backUrl}, "productStockInformCustomer") }}">→ Jetzt Erinnerung erneuern.</a>
{% endif %}
</span>
<span style="display: none;" id="hash_msg_optInSuccess_{{ product.id }}" class="">✔ {{ 'productStockInformCustomer.optInSuccess' | trans }}</span>
</small>
</div>
<button type="submit" class="button btn-default bb-line-height-normal" style="width:100%;">{{ 'Informieren bei Verfügbarkeit' | trans }}</button>
</form>
{% endif %}
</div>