Page 1 of 1
user.css with 1.0.8.19
Posted: Mon Oct 31, 2022 11:37 am
by Xpajun
Working on 1.0.8.19:
I've put my user.css in default>static but for some reason it is not working - certainly not in template.php or header.php- does the user.css now only work on template>pages?
Re: user.css with 1.0.8.19
Posted: Mon Oct 31, 2022 1:30 pm
by heatherbell
Xpajun wrote: ↑Mon Oct 31, 2022 11:37 am
Working on 1.0.8.19:
I've put my user.css in default>static but for some reason it is not working - certainly not in template.php or header.php- does the user.css now only work on template>pages?
Should be in /templates/override/static/ - copy it to there
See -
https://github.com/CE-PhoenixCart/Phoen ... c/user.css
Re: user.css with 1.0.8.19
Posted: Mon Oct 31, 2022 3:17 pm
by Xpajun
heatherbell wrote: ↑Mon Oct 31, 2022 1:30 pm
Xpajun wrote: ↑Mon Oct 31, 2022 11:37 am
Working on 1.0.8.19:
I've put my user.css in default>static but for some reason it is not working - certainly not in template.php or header.php- does the user.css now only work on template>pages?
Should be in /templates/override/static/ - copy it to there
See -
https://github.com/CE-PhoenixCart/Phoen ... c/user.css
I was working with the default so expected to have to put the user.css in to that static - thank you that partly worked - I now decided that I should be working on my Template - now I'm having problems with that

Re: user.css with 1.0.8.19
Posted: Tue Nov 01, 2022 11:35 am
by Xpajun
I'm still having problems with this:
I have user.css in static but it still does not work on templates_top or heading.php
Re: user.css with 1.0.8.19
Posted: Tue Nov 01, 2022 1:15 pm
by ecartz
Xpajun wrote: ↑Tue Nov 01, 2022 11:35 am
I have user.css in static but it still does not work on templates_top or heading.php
I don't know what this means. The template_top.php file is not something that you load separately. It's a component of the page. The user.css file is loaded by a hook:
https://github.com/CE-PhoenixCart/Phoen ... Sheets.php
The hook point is in template_top.php -- it's the same hook point as used by BootStrap, so it should be pretty obvious whether or not it is working. It has nothing to do with header.php
Some questions to consider:
1. What template is selected in admin?
2. Is the user.css file under the same template in its static directory?
3. What kind of page are you checking? Is it a core page? A page from a supported add-on? A page that you created yourself?
4. Do other parts of the page work? E.g. the part that loads BootStrap.
Re: user.css with 1.0.8.19
Posted: Tue Nov 01, 2022 5:06 pm
by Xpajun
ecartz wrote: ↑Tue Nov 01, 2022 1:15 pm
Xpajun wrote: ↑Tue Nov 01, 2022 11:35 am
I have user.css in static but it still does not work on templates_top or heading.php
I don't know what this means. The template_top.php file is not something that you load separately. It's a component of the page. The user.css file is loaded by a hook:
https://github.com/CE-PhoenixCart/Phoen ... Sheets.php
The hook point is in template_top.php -- it's the same hook point as used by BootStrap, so it should be pretty obvious whether or not it is working. It has nothing to do with header.php
Some questions to consider:
1. What template is selected in admin?
2. Is the user.css file under the same template in its static directory?
3. What kind of page are you checking? Is it a core page? A page from a supported add-on? A page that you created yourself?
4. Do other parts of the page work? E.g. the part that loads BootStrap.
1. I'm using my own template which is a copy of the default one (which I had been altering before I realised how the template system worked)
2. the user.css file is in static in the correct template directory
3. I've just found that, in the course of answering your questions, the the images should be in static/images to be loaded - I take it that that will apply to all images in user.css?
Re: user.css with 1.0.8.19
Posted: Tue Nov 01, 2022 5:58 pm
by ecartz
So the way that most templates (e.g override, Gustavo, the sample, Bootstrap5) work is that they inherit from default. That makes them get the default behavior but allow them to override it. If you're not inheriting from default, then you might need to copy the hooks from default.
If you want images inside the template, then they would have to be under static. Whether you put them in static/images or somewhere else is up to you. You could also access images from the regular images directory.
Note: for most people, it would be enough to customize in override. You usually wouldn't have to set up your own template. Not that you can't, but the purpose of override is to be a place that you can customize without losing the default behavior. In override, you can customize by copying a file from default to the same location under override. Then you can edit your version of the file.
Re: user.css with 1.0.8.19
Posted: Tue Nov 01, 2022 6:29 pm
by Xpajun
ecartz wrote: ↑Tue Nov 01, 2022 5:58 pm
If you want images inside the template, then they would have to be under static. Whether you put them in static/images or somewhere else is up to you. You could also access images from the regular images directory.
Would it not be easier/simpler to put all images called by user.css in a images directory in static so that the url route would only be ./images/picture.gif ?
Because I've always hacked the default is the reason I uploaded my own template copied from default - that way I only have to work in one template as all the pages are there