FROM CACHE - en_header

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 -->

 

Replies 3 (3)
dmwwebartisan
Shopify Partner
11139 2393 3433

@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 | Click here GemPages The most powerful Shopify page builder.
dmwwebartisan
Shopify Partner
11139 2393 3433

@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 | Click here GemPages The most powerful Shopify page builder.