Debut theme: put product description below picture

youth123laur
New Member
2 0 0

I am trying to put Part of the Product Description Under the Featured Product Image.

 

I have tried adding code but it didnt work:

<!-- split -->

 

0 Likes
dmwwebartisan
Shopify Partner
6582 1536 2002

@youth123laur 

Please share your webshop URL !

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
youth123laur
New Member
2 0 0
dmwwebartisan
Shopify Partner
6582 1536 2002

@youth123laur 

Liquid has a split string filter. That will turn a string into an array. For example let's say this is your product HTML:

foo <!-- split --> bar

You'd have code in place that does something like this:

{{ product.description }}

If you wanted to break that into two parts do this instead:

{% assign productDescription = product.description | split:"<!-- split -->"%}

First part: {{ productDescription | first }}
Last part: {{ productDescription | last}}

or

First part: {{ productDescription[0] }}
Last part: {{ productDescription[1] }}

^ assumes that you will always have two parts so does needs to be extended to do some sanity checks to make sure you don't output things twice when that splitting string doesn't exist.

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes