Shopify Accessing section.settings with API



是否可以使用 shopify API 访问部分数据?

我想从section.settings.what中提取内容来构建自定义店面功能。我不希望将它们全部作为模板中的 DOM 变量传递。

是的,您可以获得所有设置,而无需更新所有液体文件。我将向您展示如何在python中进行操作,您需要使用您喜欢的语言进行操作。

settings_schema = shopify.Asset.find('config/settings_schema.json')
#edit the file and the parameters and push it back to shopify
settings_data = shopify.Asset.find('config/settings_data.json')
#edit the file and the parameters and push it back to shopify

这两个文件包含您的所有模版设置,可以在您的 Shopify 模版的配置目录中找到。

最新更新