Skip to main content

How to implement checkbox for refusing satisfaction questionnaire

Give your customers an option to opt out of receiving satisfaction questionnaire

Lucia Dvořáková avatar
Written by Lucia Dvořáková
Updated this week

It is possible to add the checkbox to your theme with for example the following snippet.

If you are using Cart Page:

{% comment %} Overeno Zakazniky - Heureka start {% endcomment %} 
<p> <label style="display:inline; float:none; text-transform: inherit;" class="heureka-inputs">
<input form="cart" name="attributes[Heureka-Dotaznik]" id="heurekaHiddenCheckbox" value="Yes" type="hidden" />
<input form="cart" name="attributes[Heureka-Dotaznik]" id="heurekaCheckbox" type="checkbox" value="No" />
Nesouhlasím se zasláním dotazníku spokojenosti v rámci programu Ověřeno zákazníky, který pomáhá zlepšovat služby. </label> </p>
{% comment %} Overeno Zakazniky - Heureka end {% endcomment %}

If you are using Cart Drawer:

{% comment %} Overeno Zakazniky - Heureka start {% endcomment %} 
<p> <label style="display:inline; float:none; text-transform: inherit;" class="heureka-inputs">
<input form="CartDrawer-Form" name="attributes[Heureka-Dotaznik]" id="heurekaHiddenCheckbox" value="Yes" type="hidden" />
<input form="CartDrawer-Form" name="attributes[Heureka-Dotaznik]" id="heurekaCheckbox" type="checkbox" value="No" />
Nesouhlasím se zasláním dotazníku spokojenosti v rámci programu Ověřeno zákazníky, který pomáhá zlepšovat služby. </label> </p>
{% comment %} Overeno Zakazniky - Heureka end {% endcomment %}

The code can be placed inside the file which determines the structure of the cart. The name of this file may differ from theme to theme (e.g. cart.liquid, mini-cart.liquid, etc.). The placement within the file is not strictly given and can be chosen to go well with the rest of the elements in the cart.

The text next to the checkbox can be edited within the script.

The attribute Heureka-Dotaznik with a value of yes or no is then passed to the order details, and determines whether or not data about the order will be exported to Heureka.

image.png (1011×584)

Note: due to Shopify limitations, it is not possible to add the checkbox to checkout.

Did this answer your question?