0

在 Prestashop 1.7 上工作并将我的 theme.yml 文件更新为如下所示,但它没有添加到文件中。该文件在该目录中,但没有被拉入。对代码有什么建议吗?我想包含 JS 文件,但它没有被拉入。

assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
  # use_parent_assets: true

  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
 css:
   all:
     - id: theme-custom
       path: assets/css/custom.css
#    product:
#      - id: product-style
#        path: assets/css/product.css
#        media: all
#        priority: 200
 js:
   all:
      - id: slick
        path: assets/js/external-lib.js
        priority: 30
        position: bottom
   cart:
     - id: theme-custom
       path: assets/js/custom.js
4

1 回答 1

7

您需要手动删除或重命名文件

config/themes/{theme_name}/shop{shopid}.json

它优先于那个。它已经报告并解决了 1.7.1。然后您的资产中的代码将被添加到缓存中(以减少文件加载次数)。

于 2017-02-09T17:22:07.650 回答