将 Shopify 管理订单中包含 HTML 值的 line_item.properties 数据呈现为 HTML
您好,我想知道是否可以在我的订单中将这些自定义 line_items.properties
值呈现为 HTML?在shopify中,到目前为止,查看订单时看起来是这样的。对象值不会呈现那些 HTML 标记。
我使用下面的格式将订单提交到我的 Shopify 帐户,我有点希望它会显示一个查看图片
链接。
properties: {
sample_image: "<a href="https://static.remove.bg/sample-gallery/graphics/bird-thumbnail.jpg">View Image</a>"
}
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.
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>"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了这个问题,所以当时我不知道shopify已经可以处理这种数据了。如果 lineItem.properties 具有 URL 值或任何类型的链接,shopify 将自动向其添加锚标记。
因此,无需向 lineItem.properties 添加锚标记,只需使用普通的链接/url 即可完成工作。
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.