【问题标题】:How to add liquid file URL in theme using assets API shopify theme如何使用资产 API shopify 主题在主题中添加液体文件 URL
【发布时间】:2020-04-27 07:01:48
【问题描述】:

嘿,任何人都可以帮助我如何使用 URL 添加液体文件。我正在尝试这个,但这不起作用

let add_assets_asset = {
  "asset": {
    "key": "layout/alternate.liquid",
    "src": "https://digitalcodingkloud.000webhostapp.com/new.liquid"
  }
};

【问题讨论】:

    标签: shopify shopify-app shopify-api-node shopify-api


    【解决方案1】:

    您应该使用 value 属性并传递内容本身(而不是 URL)。

    let add_assets_asset = {
      "asset": {
        "key": "layout/alternate.liquid",
        "value": "Your liquid content goes here..."
      }
    };
    

    src 属性只能用于传递图像 URL,不能用于传递液体文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多