Shopify: Variables Available on Thank You Page?

I've got a small bit of code on my Shopify thank you page for a home grown fulfillment system. In oversimplified terms, it outputs a URL with template code that uses the {{id}} field.

<p>
    Your order information is {{id}}!  This is not the actual code, 
    this is just an oversimplified version for this question
</p>

Up until a few weeks ago, the {{id}} template variable would output the ID of the order object. I use this ID and the Shopify REST api to fetch order information. Now, for reasons that remain unclear to me, this outputs a different number that appears to be the checkout-id field.

Is this intended behavior? Is there anyway to get the old, real order object ID back? I can think of numerous ways to work around this, but I'd rather not mess with a system that's worked in a stable way for the past 5 years.


Documentation on this is spotty at best, but it seems like the old global liquid variables I've been using have changed their behavior. Acording to Shopify's documentation, on that Thank You page

You have access to the checkout and shop liquid objects

There's documentation on both the checkout and shop objects, and I was able to get the old behavior I was after by replacing {{id}} with {{checkout.order_id}} .

It also appears there's a liquid order object available as well, but given it's not documented as being available on the checkout page, I'm not sure I'd trust it to keep working.

链接地址: http://www.djcxy.com/p/27094.html

上一篇: 可放置区域中的jQuery可放置区域

下一篇: Shopify:变量可在谢谢页面?