Closed bangank36 closed 1 year ago
code
component using code-mirror #4
https://github.com/bangank36/shopify-order-status-editor/blob/6127381b55d20b92cd383f592e652530951785f0/src/components/code/index.js#L9order_number, total_price
, like in this page
order
object can be extracted directly by accessing by its name, such as: order.customer
returned as CustomerFromAddressableDrop
, it only reveal with order.customer.email
json
filter
{% assign orderAttr = 'attributes,billing_address,cancel_reason,cancel_reason_label,cancelled,cancelled_at,cart_level_discount_applications,created_at,customer,customer_order_url,customer_url,discount_applications,discounts,email,financial_status,financial_status_label,fulfillment_status,fulfillment_status_label,id,item_count,line_items,line_items_subtotal_price,metafields,name,note,order_number,order_status_url,phone,shipping_address,shipping_methods,shipping_price,subtotal_line_items,subtotal_price,tags,tax_lines,tax_price,total_discounts,total_duties,total_net_amount,total_price,total_refunded_amount,transactions' %}
{% assign my_array = orderAttr | split: "," %}
{% assign orderJson = '{}' %}
Key | Value |
---|---|
{{ key }} | {{ order[key] | json }} |
## Un-parsable `order` props
| Prop | Error | Notes |
|---|------|-------|
| customer | `{"error":"json not allowed for this object"} ` | [docs](https://shopify.dev/docs/api/liquid/objects/customer) |
| metafields | `{"error":"json not allowed for this object"} ` | [docs](https://shopify.dev/docs/api/liquid/objects/metafield) |
| tax_lines | `{"error":"json not allowed for this object"} ` | [docs](https://shopify.dev/docs/api/liquid/objects/tax_line) |
| transactions | `{"error":"json not allowed for this object"} ` | [docs](https://shopify.dev/docs/api/liquid/objects/transaction) |
order
object, according to this pageClosed as relevant tickets has been solved. Should add more data into the comments if there are more insights
Summary
json
folder onorder
object in Shopify, need to mock these kind of data to the preview Mock order data and other shopify object by create new filter in LiquidJs