Trying to hide a block on certain tagged product pages

Highlighted
New Member
1 0 1

Hi there - I have a question for the community.

I have form on my product page that allows people to request customization of a product. See dropdown form circled in yellow here:

Screen Shot 2020-11-14 at 10.50.50 AM.png

 

Here is the URL: https://www.edelweissjewelry.com/products/custom-emerald-dome-ring

I would like to hide this form block on all products tagged with "custom." Can someone help me with the code I need to add to product-template to achieve this?

 

Here is the code for showing the form in my product-template:


<div>
{% form 'product', product, class: 'product-form', data-product-id: product.id, data-ajax-add: settings.enable_ajax_cart %}
{% unless product.has_only_default_variant %}
{% for option in product.options_with_values %}
<div class="selector-wrapper styled-dropdown styled-dropdown--label-{% if settings.variant_style == 'listed' %}small{% else %}inside{% endif %} form-row js {% if settings.swatch_enabled and option.name == settings.swatch_option_name %} swatches option--{{ settings.swatch_option_name | handle }}{% endif %}">
<label for="SingleOptionSelector-{{ forloop.index0 }}">
{{ option.name }}

{% if settings.variant_style == 'listed' and settings.swatch_enabled and option.name == settings.swatch_option_name %}
{% capture variant_option_title %}option{{ forloop.index }}{% endcapture %}
<span class="variant-option-title">{{ current_variant[variant_option_title] }}</span>
{% endif %}
</label>
<select
id="SingleOptionSelector-{{ forloop.index0 }}"
data-single-option-selector
data-index="option{{ option.position }}"
{% if settings.variant_style == 'listed' %}data-listed{% endif %}
{% if settings.swatch_enabled and option.name == settings.swatch_option_name %}data-colour-swatch="true"{% endif %}>
{% for value in option.values %}
<option
value="{{ value | escape }}"
{% if option.selected_value == value %}selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</select>
</div>
{% endfor %}
{% endunless %}

 

 

Highlighted
Shopify Partner
9613 1201 3362

@ryankarolak 

Thanks for post 

your code is missing but can you please try this code if you have hide 

1. Go to Online Store->Theme->Edit code
2. Asset->/styles.css.liquid->paste below code at the bottom of the file.

.product-tabs {display: none;}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Highlighted
Astronaut
1011 91 120

@ryankarolak - your task will need a little code tweak, we will need to put form via if else condition , can you add me to staff? I can do it

you are welcome to contact me.
My email - suyash.patankar@gmail.com
0 Likes