App reviews, troubleshooting, and recommendations
Is there a way to use external data in liquid tags? For instance, if I wanted to do something like this
{% if product.type == MY_VARIABLE_HERE %}
You are buying some awesome shoes!
{% endif %}
where MY_VIARIABLE_HERE would be data that I fetched from an external database?
XYproblem WHAT are you trying to accomplish? https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem/66378#66378
There is no support feature like that in liquid ; shopify liquid does not fetch remote data.
If you need that data it either needs to exist in the backend already or you need an app/proxy-app, or need to just move the logic to the frontend.
https://shopify.dev/apps/online-store/app-proxies
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi @PaulNewton , thanks for your response. Let me clarify the X, i.e. what I want to achieve in the first place. I want to show (or not show) my app widget on a product page depending on a condition, but in order to evaluate the condition for each product, I need to check the value against values that are unique to each merchant and are stored in an external DB. This is why I need the condition validation to be able to handle dynamic content.
What are the ways to achieve that?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025