Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default stylesheet always loads [OpenCart Theming]

Tags:

opencart

I have just started on designing for Opencart. The page here says

OpenCart uses a "default theme fallback system". This means that if you are missing a file in your custom theme folder, it will search the main "default" theme folder for the file.

Now i have created a folder stylesheet inside my template folder with all the files in the default directory. All css files except the stylesheet.css loads from my directory.

What am I missing? I have checked the spelling of stylesheet.css and even re-created it many times but still it loads from default directory.

Can anyone help? enter image description here

like image 771
Nikhil Bhandari Avatar asked Feb 19 '23 23:02

Nikhil Bhandari


2 Answers

When OpenCart says that it falls back, it literally means the template folder, that is

/catalog/view/theme/your-theme-name/template/

The stylesheet folder is outside of that, so you would need to add that manually to your theme <head> if you want to include the default stylesheet

EDIT

If you want your stylesheet to be loaded, you need to edit the template in

/catalog/view/theme/your-theme-name/template/common/header.tpl

and change the path in there

like image 178
Jay Gilford Avatar answered Mar 03 '23 09:03

Jay Gilford


< link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />

needs to be changed in header.tpl

I had copied it from the default directory

like image 27
Nikhil Bhandari Avatar answered Mar 03 '23 10:03

Nikhil Bhandari