robinvrd Posted March 7, 2020 Share Posted March 7, 2020 (edited) Hi, I am trying to setup a child theme of Apparel free theme (from here) on Prestashop 1.7.5 but I am encountering a problem. When I define my theme.yml as : parent: apparel name: child_apparel display_name: Child theme of apparel's theme version: 1.0.0 assets: use_parent_assets: true css: all: - id: custom-lib-style path: assets/css/custom-lib.css It will properly load the parent assets but will never load my custom-lib.css file. As the parent theme (Apparel) as already styles defined in a custom.css, if I rename my file from custom-lib.css to custom.css, my file is well overriding the one from parent theme. But I can not use any other name for the file (in order to not overriding parent css). Hope someone can help me ! Edited March 8, 2020 by robinvrd Indentation writing mistake for path line (see edit history) Link to comment Share on other sites More sharing options...
fbenoist.com Posted March 8, 2020 Share Posted March 8, 2020 hi There's an error in the configuration file on the path line... assets: use_parent_assets: true css: all: - id: custom-lib-style path: assets/css/custom-lib.css Link to comment Share on other sites More sharing options...
robinvrd Posted March 8, 2020 Author Share Posted March 8, 2020 (edited) 20 minutes ago, fbenoist.com said: hi There's an error in the configuration file on the path line... assets: use_parent_assets: true css: all: - id: custom-lib-style path: assets/css/custom-lib.css @fbenoist.com If you are talking about the indentation, it is just a writing mistake on the forum. My file looks like what you wrote. (I just edited my post) Edited March 8, 2020 by robinvrd (see edit history) Link to comment Share on other sites More sharing options...
pixelicous Posted July 7, 2020 Share Posted July 7, 2020 (edited) Same issue here.. using apparel. custom.css completely overwrites the theme's css made a seperate custom css file that doesn't seem to load Edited July 7, 2020 by pixelicous (see edit history) Link to comment Share on other sites More sharing options...
pixelicous Posted July 7, 2020 Share Posted July 7, 2020 Ok, So i got it.. I specifically had a character issue in my file, a wrong TAB character as such identation wasnt correct try adding priority 1000 at the last line. Link to comment Share on other sites More sharing options...
marco.luca88 Posted July 9, 2020 Share Posted July 9, 2020 Hi, How i compile my config file? I don't know wich ID i have to insert (path too). My template is another one, it isn't classic theme. (But i think that the last layout depence to everyone. Thanks Link to comment Share on other sites More sharing options...
Minsky_ae Posted July 9, 2020 Share Posted July 9, 2020 Hello everyone, I reckon the topic I posted here: https://www.prestashop.com/forums/topic/1027309-add-custom-assets-css-js/ is about the same problem. @pixelicous Could you be more specific on what you did exactly please? If you could add a code example it will be great. Thanks! Link to comment Share on other sites More sharing options...
pixelicous Posted July 9, 2020 Share Posted July 9, 2020 This is my theme.yml parent: apparel name: my_name display_name: My shop theme version: 1.0.2 assets: use_parent_assets: true css: all: - id: custom-lib-style path: assets/css/custom-lib.css priority: 1000 I had a problem extending templates though afterwards. One of the prestashop help pages commented that if you are making more than a few changes, than a child theme is not the way to go, i reverted to start editing the original theme. If you translated some sentences, these will also be reset by using a child theme, no clue why.. Example for template extending that didn't work: {extends file='parent:_partials/footer.tpl'} {block name='copyright_link'} some changes here {/block} Link to comment Share on other sites More sharing options...
Minsky_ae Posted July 10, 2020 Share Posted July 10, 2020 (edited) Thanks @pixelicous, Until now all the edition I do in the child theme are working perfectly but thanks for the advice. I tried to add priority but doesn't seem to change anything parent: classic name: foobar display-name: Foobar version: 1.0.0 author: name: "Foobar" email: "[email protected]" url: "https://foobar.com" assets: use_parent_assets: true css: all: - id: test path: assets/css/test.css priority: 1000 I cleared the cache from the shop and the browser's one, I can see all other CSS files but still not the test one 😔 The test.css file is in themes>foobar>assets>css Even if I tried to do the same in parent theme (adding a custom-lib.css file, uncomment the lines for it), nothing's happening so I might doing something else wrong. 🤔 Edited July 10, 2020 by Minsky_ae Add other test description (see edit history) Link to comment Share on other sites More sharing options...
pixelicous Posted July 10, 2020 Share Posted July 10, 2020 @Minsky_aeMaybe you are having a permissions issue on those files? Not sure of your setup, i have direct control of my server, so i SSH in, maybe you start creating files that www-data user doesn't have access to? Are you doing it all in the module folder, zipping it, then uploading it to prestashop? Thats what i tried doing. Link to comment Share on other sites More sharing options...
Minsky_ae Posted July 10, 2020 Share Posted July 10, 2020 (edited) Hi @pixelicous and thank you for trying to help, I'm currently working in local with MAMP, I don't think there could be any permission problem? 🤔 Edited July 10, 2020 by Minsky_ae (see edit history) Link to comment Share on other sites More sharing options...
pixelicous Posted July 16, 2020 Share Posted July 16, 2020 @Minsky_ae Not sure how MAMP works, never handled it myself but I understand the concept. By permissions i mean filesystem permissions, maybe some files' permissions got created with a different user than the one MAMP/web server/app is running with, or folder permissions. To be honest, try to read what prestashop official documentation wrote about child themes, if its more than a few changes you better yet just change the original theme. I just automate everything in scripts, so even if the theme will be updated in the future and i'll want to update it, i will be able to run a script to change what i need. Link to comment Share on other sites More sharing options...
Minsky_ae Posted July 16, 2020 Share Posted July 16, 2020 Hi @pixelicous, Thanks again for your help and advice! About the third-party libraries or any custom CSS/JS file which didn't load, I found the solution on another topic. It was the shop1.json file which needed to be deleted: https://www.prestashop.com/forums/topic/1027309-solved-add-custom-assets-css-js/ Link to comment Share on other sites More sharing options...
pixelicous Posted July 25, 2020 Share Posted July 25, 2020 On 7/16/2020 at 3:42 PM, Minsky_ae said: Hi @pixelicous, Thanks again for your help and advice! About the third-party libraries or any custom CSS/JS file which didn't load, I found the solution on another topic. It was the shop1.json file which needed to be deleted: https://www.prestashop.com/forums/topic/1027309-solved-add-custom-assets-css-js/ Cool..i'd take a look at it. Happy you found the solution! Link to comment Share on other sites More sharing options...
marco.luca88 Posted August 3, 2020 Share Posted August 3, 2020 Not for me 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