Coding help

New Member
1 0 1

Hey Guys,


I need some coding help. Below is what I am trying to achieve:

We are a daily deals website, however recently started selling tickets to local event, we are using Evey App to manage the events. One of the event has a requirement of getting detail of all the attendees. This is currently being achieved by below code (as provided on Evey's website). However, this is not excluding other products and events in store.

Hence, I need to put a condition in below code where it will ask for additional information of the attendees only for the products that are tagged "UGA" and not other products in shopping cart.

<tr class="cart-attributes">
<td colspan="100">
{% for i in (1..item.quantity) %}
<div class="col-attributes-row">
<span class="attribute-row-num">{{ i }}.</span>
<div class="col-attributes-inputs">
<input type="text" name="attributes[attendee-{{ }}-{{ i }}-firstname]" placeholder="First Name" required style="display:inline-block;" />
<input type="text" name="attributes[attendee-{{ }}-{{ i }}-lastname]" placeholder="Last Name" required style="display:inline-block;" />
<input type="text" name="attributes[attendee-{{ }}-{{ i }}-email]" placeholder="Email" required style="display:inline-block;" />
{% endfor %}

Please help

1 Like
Shopify Expert
2953 504 683

HI @ideals 

You can add product tag condition like bellow:

{% if product.tags  contains 'UGA' %}     
         //here if tag added
{% else %}
        //here if tag not added       
{% endif %}

Note: you can use on product page only if you are on separate page then need to manage by different condition. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here

Hi @ideals 

A more comprehensive solution would include the for loop that is required in order to call the tag... please see below

{% for tag in product.tags %}
  {% if tag contains 'UGA' %}
    // occurs when tag contains UGA
  {% else %}
// occurs when tag DOES NOT contain UGA {% endif %}
{% endfor %}

Let me know if any issues with this



Was my answer helpful? Be sure to give it a "Like" and mark it as the solution - this way others can find it easily.
- Need help with a Shopify build or custom solution? Feel free to get in touch via !
- Did my reply help solve your problem? The above email is my Paypal too ʘ‿ʘ