Debut Theme How to Split product description & Add Tabs (I have code already, but need modified)

m2mmm2
Tourist
4 0 1

Hi there, I wanna know how to split the product description & add tabs.

I have the separate codes for two already, but failed to put them together. 

Could someone please help? Many thanks 

Shopify-question.jpg

Code1 For Split the product description:  

https://neuralcandy.com/how-to-split-your-product-description-in-shopify/

Code2 For Add tabs:

https://www.youtube.com/watch?v=7ND6WI-p-WI

 

Here the conflict happened on product-template.liquid

The original Debut Code:

<div class="product-single__description rte">
{{ product.description }}
</div>

For Code1 split the product description, it required to change it into: 

<div class="product-single__description rte" id="first_product_description">
{{ product.description | split: '<!-- split -->' | first }}
</div>
</div>
</div>
{% if product.description contains "<!-- split -->" %}
<div class="product-single__description rte" id="last_product_description">
{{ product.description | split: '<!-- split -->' | last }}

 

For Code2 it need to change into:

<div class="product-single__description rte">
 {% include 'tabbed-description' %}
</div>

 

So here I have no idea how to put these two code together...

Since these two coded used twice the product.description

When I input the content, then it shows twice. That's how it look like. Split already good. Have Tabs good. But Show Twice...

problem.jpg 

 

0 Likes