Personalized checkout and custom promotions with Shopify Scripts
Hello! I’m looking for help. I have this section of code added to my product pages, but I want to exclude it from a certain page. I thought maybe by using the unless code, but I’m unsure of how to change it while still keeping the ability of it to be hidden if the meta field is blank. I hope this makes sense. Please help!
You may not need an unless.
Does something like the below help at all?
{% if product.metafields.custom.product_video != blank and product.handle != "foo" %}
...
{% endif %}
I would rarely add the handle into an if statement like this and would be more likely to start added a list of allowed (or blocked) pages and comparing against that. If you think you'll only need that one product page to ignore that the above code might be enough for now.
{% if product.metafields.custom.product_video.value != blank %}
//your iframe here...
{% endif %}
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024