A space to discuss online store customization, theme development, and Liquid templating.
Hello guys! I am developing shopify app for the first time. And unfortunately I can't find necessary information.
I created own app and I added some functionality for it. My app can store some settings to the sqlite db. Now I need to pass this data (from sqllite) to the theme. Please tell me it's possible? If yes how I can do it? Thanks.
You need to use the App Proxy for that. It allows you to add an endpoint to your App. You can securely call that endpoint using Javascript from your theme. Thus you can create any kind of App-based DSL to service your theme with your special needs.
https://docs.shopify.com/api/reference/application-proxies
Hey, have you find the solve yet? I have problem same as you now. After i get request from frontend, i can't return response data. it's always console.log error 404. I don't know why?
@HunkyBill
Thank a lot for your answer. It's helped me.
But now I have another issue. I see "bad request" error with proxy request.
Details:
1 app settings
2 request on local machine
3 request from shopify (ERROR)
4 the same as shopify request on the local machine
May be you know why I get error on the 3rd point? Thanks!
UPD: I resolved this issue by adding 'thin' to gemfile
While thin works well, you might try Unicorn for a faster experience. I moved away from thin when I started getting a lot of hits to my services endpoints.
Thanks for information man
My small question) How I can pass liquid view to sidebar for example? Not to new separate page.
Now my test controller looks like this
render :layout => false, :content_type => 'application/liquid'