How to Force Website to Show user.css Changes
After making changes in /yourTemplate/static/user.css and saving, the changes do not show unless your browser cache is hard or forced to refresh or reload.
The website can be forced to load the new user.css.
Make a copy of /templates/default/includes/hooks/shop/siteWide/styleSheets.php and save it to /templates/yourTemplate/includes/hooks/shop/siteWide/
After
function listen_injectSiteStart() {
Insert
$css_version = '2021.0.8';
Change this line
$this->sitestart .= '<link href="' . $css_file . '" rel="stylesheet">' . PHP_EOL;
to
$this->sitestart .= '<link href="' . $css_file . '?ver=' . $css_version . '" rel="stylesheet">' . PHP_EOL;
2021.0.8 can be any meaningful versioning system you want.
Every time changes are saved in the user.css, update the version number in styleSheets.php and save.
Now the changes in user.css will show after a simple refresh and importantly, will show for a previous customer who might still have the old pages cached in their browser.
Phoenix Cart User Guide, like CE Phoenix Cart, is free to use but is maintained by unpaid volunteers.
All other content is the reserved Intellectual Property and Copyright of phoenixcart.org