Hi, I am working on a feature for my company that requires additional scripts and content to render on the Order Status (Thank you) page. I have added my scripts and HTML but when I get the Thank you page, the content is not visible. I can View Page Source and see the correct HTML being rendered there. I can tell that the script is working because it is building a large URL with Querystring parameters based on order information and it looks correct. It’s just that the content is not being rendered. Does the HTML need to be wrapped in quotes? Also, is there a preview mode where script can be tested without having to create an actual order?
Here is what the code looks like roughly minus all the logic.
Thanks in advance.
I can’t seem to edit the original post so I am going to add my full Script code here. The names have been changed to protect the innocent but otherwise it is exactly as I have it. What I am trying to do is generate one or multiple link buttons with a dynamic url based on the logic. I know that the logic works. I am using the same login in the confirmation email. The logic seems to be working in this version too because I can view page source and see the generated url. It is just not visible on the page. I tried putting in some simple
tag and nothing else and that works fine.
Please don’t refer me to the Shopify documentation as I have already read it. I followed the examples on there to get to where I am and it does not address the issue that I am seeing. My case is more complicated than any of the examples I have found.
Thanks,
I had the same issue, and I think it’s because the Liquid you’re using isn’t valid as parameters inside the JavaScript AddContentBox function.
It seems Liquid works inside the script tags and only outside of the function, UNLESS included in one of the strings passed to the function, e.g this is the code I ended up with that actually worked.
Note how the strings passed to the function are separated by a comma, and there is no liquid in between or surrounding