Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi I'm making a plugin and I'm using this API to add notes to orders: https://help.shopify.com/en/api/reference/orders/order#update-2019-07
I was wondering if there is any way to add some formatting to the note so I can do something like this:
Key: Value,
Key: Value,
Key: Value,
Rather than Key: Value, Key: Value, Key: Value,
I tried the note attributes, but that is visible to the customer and we don't want this to be visible to the customer. Thanks!
Hi @nicksrc , You just need to be pass \r\n on your content , to manage data on next line. hope it will helpful for you.
Thanks
I could handle this by removing an hyphen in my for loop :
{%- for lineItems_item in order.lineItems -%}
{%- for metafields_item in lineItems_item.variant.metafields -%}
{%- if metafields_item.namespace == 'namespace' and metafields_item.key == 'key' %}
{{ lineItems_item.variant.sku }} : {{ metafields_item.value }}
{%- endif -%}
{%- endfor -%}
{%- endfor %}
The if statement has no hyphen at the end to add a breaking line at the end of each line.
Order Notes
How would this be edited to replace ## with a line break?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024