Shopify themes, liquid, logos, and UX
Hello,
I am trying to attach an file (can be html, csv, pdf, json.....) containing the "Order ID" (variable name= "id") to the "Staff Order Notification mail" (Admin panel -> settings -> notifications -> Staff order notifications) for future reference.
Actually this should be a quite simple process because these emails are (partially) dynamically generated using liquid.
But I cannot get this one working, have tried a lot, searched a lot, but no chance 😞
The things that I managed to to is displaying the actual "id" in the email (simply: {{ id }}), and even attaching a .pdf to the email containing, for example the Terms&Conditions (e.g. {{ shop.terms_of_service | attach_as_pdf: "Terms-of-Service" }}).
Any Ideas, how this could be done?
P.s. I do not want to use an APP for such a simple problem.
Many thanks,
Familymatic
Hi @familymatic
I'm afraid that it's not possible to dynamically generate attachments in Shopify email notifications. You can only attach static files like Terms of Service, Refund Policy or Privacy Policy.
Why do you need the Order ID as an attachment? Is this for an integration with another system?
Thanks,
Lukasz
Hello Lukasz,
Thank you for your reply.
I understand that the Terms of service is a “static” file, if I understand it correctly this file is presented to the script via an Object (“shop.terms_of_service”), the “id” also is an Object, so I do not quite understand why one is working the other isn't.
N.b. My first thought was the classic “Integer-String problem”, but this wasn’t the problem either (I have presented the “id” as a string to the script).
Thanks,
Familymatic
Yeah, for me it's also not quite clear why one string can be attached as PDF, while the other can't. The attach_as_pdf filter is only mentioned in the documentation for Selling in Germany. My assumption is that the PDF files containing Temrs of Service or Refund Policy are not generated on the fly, but rather cached on the server, as they don't change too often. Anyway, this is only my interpretation. Would be great if somone from the Shopify Team clarified it.
Had a similar issue and was stumped when I found out that attach_as_pdf is not even mentioned in the API docs. o_O Do you have any suggestion for a ready-made Shopify app that can attach a PDF (and possible even generate them using a template system)?
User | RANK |
---|---|
75 | |
65 | |
64 | |
53 | |
49 |
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023