Post by nootkan » Tue Aug 06, 2024 2:11 pm

Trying to style my default theme currency dropdown menu in opencart 3.0.4.0 but cannot seem to find the javascript/bootstrap/css/less/dropdowns.less file that firefox inspector shows me.

The actual less folder isn't even there.

Looked through the bootstrap css files and can't find anything there either.

local server with wamp
apache 4.2.59
php 8.0.30
mysql 8.0.39

New member

Posts

Joined
Mon May 26, 2014 5:21 am

Post by softmonke » Tue Aug 06, 2024 3:51 pm

nootkan wrote:
Tue Aug 06, 2024 2:11 pm
Trying to style my default theme currency dropdown menu in opencart 3.0.4.0 but cannot seem to find the javascript/bootstrap/css/less/dropdowns.less file that firefox inspector shows me.

The actual less folder isn't even there.

Looked through the bootstrap css files and can't find anything there either.

local server with wamp
apache 4.2.59
php 8.0.30
mysql 8.0.39
You should modify "stylesheet.css" located in "catalog/view/theme/default/stylesheet" and override the existing styles instead.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by JNeuhoff » Tue Aug 06, 2024 7:35 pm

Actually, you should create your own theme folder, and keep the modified stylesheet in there: catalog/view/theme/<your-theme>/stylesheet/stylesheet.css

And then set your theme to it via the admin backend at Extensions > Extensions > Themes and System > Settings > General > Theme.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by nootkan » Wed Aug 07, 2024 3:25 am

softmonke wrote:
Tue Aug 06, 2024 3:51 pm
nootkan wrote:
Tue Aug 06, 2024 2:11 pm
Trying to style my default theme currency dropdown menu in opencart 3.0.4.0 but cannot seem to find the javascript/bootstrap/css/less/dropdowns.less file that firefox inspector shows me.

The actual less folder isn't even there.

Looked through the bootstrap css files and can't find anything there either.

local server with wamp
apache 4.2.59
php 8.0.30
mysql 8.0.39
You should modify "stylesheet.css" located in "catalog/view/theme/default/stylesheet" and override the existing styles instead.
Thanks for your reply. Tried that it didn't work which is why I was trying to figure out how to override or change the less.css file.

New member

Posts

Joined
Mon May 26, 2014 5:21 am

Post by nootkan » Wed Aug 07, 2024 3:26 am

JNeuhoff wrote:
Tue Aug 06, 2024 7:35 pm
Actually, you should create your own theme folder, and keep the modified stylesheet in there: catalog/view/theme/<your-theme>/stylesheet/stylesheet.css

And then set your theme to it via the admin backend at Extensions > Extensions > Themes and System > Settings > General > Theme.
Thanks for your reply. I tried this also but when changing theme in admin I got a white page so I probably need to learn more about overrides or child themes which ever is used with opencart.

New member

Posts

Joined
Mon May 26, 2014 5:21 am

Post by JNeuhoff » Wed Aug 07, 2024 4:56 am

Actually, you could keep the default theme. Just change the location of your theme folder at Extensions > Extensions > Themes > Default Store Theme > edit > Theme Directory.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by softmonke » Wed Aug 07, 2024 10:35 am

Yup, definitely good practice to create your own theme folder and edit it from there rather than directly modifying the default template.

That being said, I believe the .less files are compiled on the client side which is why you can't find it. Nonetheless, adding your own CSS styles to override Bootstrap's will definitely work. Are you sure the changes done to your "stylesheet.css" file was applied? Did you check your "stylesheet.css" style in your browser to ensure that the changes were applied? If adding your own CSS styles to your "stylesheet.css" file did not work, it could either be your browser caching the css file or it could also be other forms of caching like CloudFlare. Otherwise, your CSS style rules are wrong.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by JNeuhoff » Wed Aug 07, 2024 3:54 pm

I forgot to mention that you should also overwrite the common/header.twig in your own theme folder, for this line:

old:

Code: Select all

<link href="catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">
new:

Code: Select all

<link href="catalog/view/theme/<your-theme>/stylesheet/stylesheet.css" rel="stylesheet">

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: OSWorX and 37 guests