Created
October 20, 2014 14:14
-
-
Save fditrapani/3bea66ba507461ef3ed8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if product.description contains 'Ingredients_tab:'%} | |
{% assign ingredients_split = product.description | split: 'Ingredients_tab:' %} | |
{% assign faqs_split = product.description | split: 'Faqs_tab:' %} | |
{% assign description = ingredients_split[0] %} | |
{% assign ingredients_holding = ingredients_split[1] %} | |
{% assign ingredients = ingredients_holding | split: 'Faqs_tab:'%} | |
{% assign faqs = faqs_split[1] %} | |
{% assign description_size = description | size %} | |
{% assign ingredients_size = ingredients.first | size %} | |
{% assign faq_size = faqs | size %} | |
{% else %} | |
{% assign description = product.description %} | |
{% endif %} | |
<div id="product-description" class="rte" itemprop="description"> | |
<div class="responsive-tabs"> | |
<h2>What is it?</h2> | |
<div> | |
{{description}} | |
</div> | |
{% if ingredients_size > 20 %} | |
<h2>What is in it?</h2> | |
<div> | |
{{ingredients.first}} | |
</div> | |
{% endif %} | |
<h2>What do people think?</h2> | |
<div> | |
<div id="shopify-product-reviews" data-id="{{product.id}}"> | |
{{ product.metafields.spr.reviews }} | |
</div> | |
</div> | |
{% if faq_size > 20 %} | |
<h2>What else?</h2> | |
<div> | |
{{ faqs}} | |
</div> | |
{%endif%} | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment