Minsky_ae Posted July 8, 2020 Share Posted July 8, 2020 (edited) Hi, I'm trying to understand how I'm supposed to add custom assets to a child theme. I followed the documentation but nothing seems to happen. 😕 assets: use_parent_assets: true css: all: - id: test path: assets/css/test.css I tried to add the css part in theme.yml of the parent theme as well without success (I cleaned the cache after each update). I would like to be able to add third-party libraries or my own file (CSS, JS) for all pages and for specific page as well. I'm already using custom.css and custom.js in child theme, those one work well. Any help will be really appreciated, thanks! EDIT I found this old topic: https://www.prestashop.com/forums/topic/598436-how-to-add-custom-css-file-in-stylesheetstpl/ Cache is not enabled in my admin, neither CCC, I tried to activate/deactivate it, cleaned files under assets/cache but the test.css is still not loaded. Edited July 16, 2020 by Minsky_ae Add SOLVED to title (see edit history) Link to comment Share on other sites More sharing options...
Minsky_ae Posted July 16, 2020 Author Share Posted July 16, 2020 So I probably missed the last answer of the topic I added in EDIT in my first post. Thank you @Velno ; this is working: Quote Solution for new versions of PrestaShop (working on my 1.7.6): 1. Simply add new styles / scripts as in the tutorial 2. If it won't work, go to: \config\themes\[your_theme] and delete file shop1.json. The file will regenerate after you refresh page. That's it! 2 1 Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 12, 2021 Share Posted August 12, 2021 This module help to add js and css 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now