A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi, so I have a custom `line_item.properties` that I'm passing on my orders and in the order tab the order looks like this
I'm using this format below, and I was hoping that the `sample image` property value would render as a `view image` link in the orders tab, but instead, it is displaying the `sample image` property value as a literal string. So my question is, is it possible to render an HTML tag in the orders view? If yes could you point it out to me what am I doing wrong?
properties: {
sample image: '<a href="https://sample.com">view image</a>'
}
It won't render HTML in the Admin like that. There's real security implications if that was allowed.
I would just pass the url instead of the surround HTML elements.
You can also upload an image as a line item property. Any reason why you've gone with a url reference vs letting the user upload a file?
I see, but we have an order sample that renders HTML in the Admin -> Orders page (see image below)
This sample order was created back in nov 2020, so Is it safe to assume that in 2022 it is not allowed to render HTML tags in the `line_items.properties` anymore?
The whole reason I'm passing a URL in `line_items.properties` is for our manufacturer to gain access to the image uploaded by the user with their order, also that we're using a custom image upload to let users upload images in our browser directly to our server, but originally we planned to use our Shopify account as a storing for custom image uploads of users, but we failed to implement it because based my knowledge we need to use node.js and GraphQL, but you said "You can also upload an image as a line item property" so in order to do that, I'll just pass the image file in the `line_item.properties` and it'll make the upload? like this code below?
properties: {
file: file <object>,
}
ps: this website is a landing page that is not from shopify, it is a custom landing page that generates line_items orders and we're adding properties in it and send it to our shopify account using Shopify API as orders.
You can add only link:
properties: {
file: "https://....",
}