【发布时间】:2022-12-27 21:30:13
【问题描述】:
As a sudden request from Shopify to make Theme App Extensions for App, I'm trying to move my JS files in app embed block so my JS will be available on all the pages. But I'm stucked on how i can get a shop information in app embed block files. Can anyone help?
【问题讨论】:
-
what do you mean by shop information and where do you want to access JS or Liquid?
-
Actually it is a rails app and we have shop model. Now we are using Script_tag api and upload our js with shop information like shop offers etc. I'm trying to move my JS files in app embed block so my JS will be available on all the pages. But I'm stucked on how i can get a shop information in app embed block files.
-
I have done this before, You need to copy the script tag code into the app embedded extension works the same as the script tag and enables the app to block from the theme editor.
标签: shopify shopify-app shopify-api