How can I add a reorder button for returning customers in Dawn theme?

Hi, is there a way for me to add a reorder button for returning customers without the use of 3rd party app?

I believe it’s possible using the customer object in liquid, as it has a “last_order” property. The object is available when the customer is logged in. You’d then get the line items and make an API call to add the items to the cart. I haven’t done it before and it’s a bit complex to explain, so if you need more help send me a message!

actually found this article, the reorder link is working but i’m getting this error:

was able to fix the code @Ryoshin . please ignore my previous message. Thanks!