user17678769
user17678769

Reputation:

Render as HTML the line_item.properties data who has HTML values in it on Shopify Admin Orders

Hi so I'm wondering If it is possible to render these custom line_items.properties value as HTML in my orders? in shopify, as of now it appears like this when the order is viewed. The object value is not rendering those HTML tags.

enter image description here

I'm using the format below to submit the order onto my Shopify account and I was kinda hoping it will display a View Image link.

properties: {
   sample_image: "<a href="https://static.remove.bg/sample-gallery/graphics/bird-thumbnail.jpg">View Image</a>"
}

Upvotes: 0

Views: 88

Answers (1)

user17678769
user17678769

Reputation:

I solved it, so what I didn't know by then is that shopify already handle this kind of data. If the lineItem.properties has a value of URL or any kind of link, shopify will automatically add an anchor tag to it.

So instead of adding an anchor tag to the lineItem.properties, just use the ordinary link/url and that'll do the job.

Upvotes: 1

Related Questions