CSS & my_changes addon.. not working??

Newbie question - I followed all the instructions for making changes to the css file so changes are kept after updates… but I can’t seem to get it to work…



here is what I am doing (as per CS-Cart Knowledge base):



1 - create a folder:

skins/[CUSTOMER_ACTIVE_SKIN]/customer/addons/my_changes/hooks/index



2 - create a file called: styles.post.tpl

containing the code:



…and save it into the skins/[CUSTOMER_ACTIVE_SKIN]/customer/addons/my_changes/hooks/index
folder



3 - create a file: styles.css

containing any CSS changes eg:

.mainbox-title span {

color: #2de2de;

font: bold 26px Arial, Helvetica, sans-serif;


}

and save it to the folder: skins/[CUSTOMER_ACTIVE_SKIN]/customer/addons/my_changes





I’ve done this numerous times but I can’t get it to work… if I make the changes directly in the original style.css file they work no problem… but I just can’t get these ‘addon’ changes to work!!!



any ideas please!



I’m using version 2.1.3

Clearing the cache seemed to kick it all into action…

Strange that changes made directly to the main CSS file worked without clearng cache… anyway… seems to be working now

You pretty much only have to clear your cache when you create or modify a hook file.



Now that you have the style sheet “hooked”, if you change that style sheet, you won’t need to clear your cache.





Brandon

Another thing to consider is that when making CSS related changes, don’t forget to clear your browser cache (IE, Firefox, Chrome, etc), or better yet, disable the browser cache until you are done making the CSS changes.

Once you clear your cart cache and browser cache, you should not have to clear either again (assuming your server time is close to your PC time - or a little ahead). The browser is smart enough to check the modification data and only send the new css if it is newer than the most recently cached version.



Edit: I would also use a different name than styles.css in your my_changes stylesheet. Maybe local_styles.css. It will make it much more clear which css file is being used if they are not all named the same.

This simply does not work … not even for the “get rid of the shameless plug” at the bottom of the page that uses the same sequence of events. I have set up the files VERBATIM and I am trying to set a stylesheet that can be used in the wysiwyg (Tinymce) editor when describing products. No changes work … no hooks work … nothing

[quote]This simply does not work … [/quote]



Well, that’s odd, used to work quite well, let me take another look to see if it is still working…



Yep, still working with 17 Million of us currently using this same technique! :-)

[quote name=‘Struck’ timestamp=‘1351893310’ post=‘148216’]

Well, that’s odd, used to work quite well, let me take another look to see if it is still working…



Yep, still working with 17 Million of us currently using this same technique! :-)

[/quote]



You know, taking someone’s frustration and being a smart-ass about it really helps … perhaps that’s why your name is “struck” … smart-asses get struck quite often :-)



Smiley face really doesn’t make a smart ass comment better does it?

Adding on to my comment, we are operating from a sub-domain, can this cause the custom hook feature to operate differently?

Hooks work on files and have nothing to do with the domain.

If ownerships/permissions are bad on your site then clearing the cache via the 'cc' query string will silently not work.

Suggest that if you are having a problem that you manually clear the cache by removing the following folders (via ssh or ftp):

var/cache

var/compiled

[quote name='afreshup' timestamp='1351884694' post='148211']

I am trying to set a stylesheet that can be used in the wysiwyg (Tinymce) editor when describing products. No changes work … no hooks work … nothing

[/quote]

The WYSIWYG editor is relative to the admin files and not relative to the customer files. You can't actually see the my_changes CSS formatting in the WYSIWYG form - because it's in the customer files. You can add your own classes to your HTML there, but you will have to preview them in the store to see them applied.



Also, try FireFox's Firebug plugin to debug CSS. It's a very helpful plugin.

Actually you could probably reference the same file in both areas by using a my_changes hook for the stylesheet. I.e. you would do the changes in the normal my_changes stylesheet in the customer area and then reference it in the my_changes addon for the admin area with: /skins//customer/addons/my_changes/