My_Changes Addon Not Working

No official documentation for it that I can find unfortunately. I used it on previous versions a few years ago, but it doesn't seem to be working on the newest version. I might be forgetting something.

  1. Created a my_changes folder in: /design/themes/THEME_NAME/templates/addons/
  2. Created a styles.post.tpl file in design/themes/THEME_NAME/templates/addons/my_changes/hooks/index
  3. Added this line of code inside of styles.post.tpl:

    {style src="addons/my_changes/style.css"}

​

​Added ​this code to my "style.css" file just to test.

body {

background: #ff0000 !important;
}

Cleared the cache.

Nothing.

What's missing?

Dont think the my changes addon is needed now.

css can be added by the theme editor, design>themes> theme editor

Please provide us with the full path of the style.css file. Also try to use .less file instead of .css one. It is included later

Dont think the my changes addon is needed now.

css can be added by the theme editor, design>themes> theme editor

Oh ya, I forgot about that section for editing css. That's great. What about other files, though? If I want to change something in a specific file without editing the original, I just duplicate the file and folder path that's in the "template" folder, and put it in the "addons/my_changes" folder?

Please provide us with the full path of the style.css file. Also try to use .less file instead of .css one. It is included later

eCom, I'm not sure what the path is, but johnbol1 gave me the solution for css in the above post.

But you're right, I really should use .less files instead. Doesn't that require you to "recompile" them into css every time you make a change, though? I don't know enough about .less files.

Go to the documentation and look up 'overrides' and it will give you the proper path and information about override files.

Where possible, you should use hooks versus overrides for future compatibility.

I'd be surprised if less files have precedence over css files. But I've not dug into that code.

I'd be surprised if less files have precedence over css files. But I've not dug into that code.

Please check section at the bottom

http://docs.cs-cart.com/4.6.x/designer_guide/css.html


But you're right, I really should use .less files instead. Doesn't that require you to "recompile" them into css every time you make a change, though? I don't know enough about .less files.

Yes, if the development mode is not enabled, just clear cache

I believe addon priority comes into play and less versus css files is only an issue for addons with equal priority.

Note that fhe addons themselves (controller cascade) load with highest priority first and things in the design directory are processed in reverse priority order so highest will overcome lowest.

But it is probably safest to always use less files even if they just contain css.

But you're right, I really should use .less files instead. Doesn't that require you to "recompile" them into css every time you make a change, though? I don't know enough about .less files.

Yes, if the development mode is not enabled, just clear cache

I made some changes to the design/themes/{theme name}/css/styles.less file and it seems to work. Can I use the My Changes addon with this so I don't have to modify the original? I'm not sure how to add any files that are below the theme/template folder.

I made some changes to the design/themes/{theme name}/css/styles.less file and it seems to work. Can I use the My Changes addon with this so I don't have to modify the original? I'm not sure how to add any files that are below the theme/template folder.

You can use CSS section of the Theme editor to add custom CSS changes. In this case addon is not required

If you plan to use module, please check the following article

http://forum.cs-cart.com/topic/37510-how-to-add-custom-css-with-my-changes-addon/