Prestashop 1.7 JS 文件未添加 [英] Prestashop 1.7 JS files not being added

查看:21
本文介绍了Prestashop 1.7 JS 文件未添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Working on Prestashop 1.7 and updated my theme.yml file to look like the below but it doesn't add in the file. The file is in that directory but it isn't being pulled in. Any suggestions to the code? I want to include the JS file but it isn't being pulled in.

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

推荐答案

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

You need to mannually delete or rename the file

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

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

It has priority ove that one. It's already reported and solved for 1.7.1. Then the code in your assets will be added to the cached one (to reduce the number of file loading).

这篇关于Prestashop 1.7 JS 文件未添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆