I was discussing a styling issue with someone using 4.0.1.1 today, and we noticed that any edits to his stylesheet did not change the site. He was using the default theme, so the file is located here:
/catalog/view/stylesheet/stylesheet.css
His web host managed to figure out that the stylesheet was being overwritten by the SASS code in OpenCart. After some tests, I confirmed this: basically, if you turn off the SASS Cache (by using the gear icon in the upper-right of the main admin Dashboard page) then the front-end will load this stylesheet instead:
/catalog/view/stylesheet/stylesheet.scss
The .scss file will also overwrite the original stylesheet.css file with its contents. The file that controls this is the following:
/catalog/controller/startup/sass.php
I'm not very familiar with SASS so I'm not sure if this is intentional, but it seems like a bug to me. If it's not, then it probably shouldn't be called "caching" if it changes the stylesheet being loaded.
Can anyone explain this behavior and confirm whether or not this is intentional, or a bug? Turning off the SASS in OpenCart 3.0 versions did not have this effect, so it seems like a bug to me. If it's not, then maybe the "Cache" column should be renamed "Enabled" or something like that?
How exactly did you modify your stylesheet.css?
Things are handled differently in OpenCart 4, see its theme example.
Your modified stylesheet would be located at
extension/<your-theme>/catalog/view/stylesheet/stylesheet.css
Things are handled differently in OpenCart 4, see its theme example.
Your modified stylesheet would be located at
extension/<your-theme>/catalog/view/stylesheet/stylesheet.css
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
It was the default theme's stylesheet. This user did not have a theme installed, but was modifying the default theme's CSS:
/catalog/view/stylesheet/stylesheet.css
Yes, I know it's not recommended to edit the default theme, but since many users do do that, we should take into account that possibility.
/catalog/view/stylesheet/stylesheet.css
Yes, I know it's not recommended to edit the default theme, but since many users do do that, we should take into account that possibility.
Who is online
Users browsing this forum: No registered users and 4 guests