I’m confused on what is the best* way to make simple changes to my skin. Let’s say I’m using the “Basic” skin and want to tweak the layout of “product_multicolumns.tpl”.
Should I:
edit the .tpl file directly in /skins/basic/…
edit the .tpl file in /var/skins/basic/… and /skins/basic/…
create a new template by cloning “Basic” and giving it a new name and edit this
use My Changes addon with a “product_multicolumns.override.tpl”
create a new addon called “Custom Product Multicolumns”
I use the my changes addon and it makes it a lot easier when it comes to upgrades. It took me a while to figure out how it works, but once the idea clicked I have been able to make quite a few changes without ever actually touching the template files. By doing this most of my changes aren’t overwitten during an upgrade.
Thanks for the replies -they’ve confirmed my hunch that My Changes was the way to go. Too bad the KB article is somewhat lacking. Is there a good How-To thread in this forum? I’ve looked but no luck.
Tbirnseth did a addon called local modifications that does the same thiing as the my changes addon. I personally use the my changes addon as it is supported by CS-Cart while his is not.
I’ll give you a couple of examples.
First, I want to have my own styles, but I don’t want to have my styles overwitten when I upgrade. So I need to create 2 files.
The first file is to follow the original CS-Cart style sheet. Becuase css is cascading, if I have my own styles follow CS-Cart’s styles than my styles will “overwrite” CS-Cart’s.
I’ve read over your example My Changes as well as EZ-Cart’s “Customizing Your Store” PDF and now have a good understanding of how this works.
Now, in the case of a complete skin redesign which do you think is better?:
Use the “My Changes” method with “Basic” skin and carve it into the design I need.
Create a completely new skin folder.
Option 1 seems like it could make integration of “Basic” skin changes and improvements automatic during the version upgrade process.
Option 2 seems like it would be more straightforward in the template design process. Integration of skin changes and improvements would have to be handled manually with a diff examination of upgrade.
The thing I don’t know about with just creating a whole new skin is how to upgrade it. I honestly haven’t looked into it, but when an upgrade is done I know that the skins are upgraded and I know that the base skin is upgraded. The thing I don’t know is if you create your own skin if will it pull the information for the upgrade from the base skin.
If it will pull the information and overwrite your changes than what is the point of creating your own skin in the first place?
Of course, if you do manual upgrades and don’t use the upgrade script than I guess you can just upgrade your skin the way you want.
The reason why this works is that the hook is called up from:
skins/basic/customer/common_templates/styles.tpl
It’s called from:
{hook name="index:styles"}{/hook}
…[/QUOTE]
I am trying to figure out the hook and “my_changes” in v. 2.1.2, but I cannot find the above code in the styles.tpl. Did they change how the “hooks” are used and where they “call” from? I’ve tried to follow the generic information from CS at [url]CS-Cart Documentation — CS-Cart 4.15.x documentation and what I can find on the forum, but I haven’t succeeded in changing anything more than the lines around the search box. I did get the background color change, but it was not by using the “hooks” it was by editing the actual “basic” template. I can’t seem to get the “my changes” to work.
You will probably have to remove the var/compiled directory (or otherwise clear your cache) after putting the skins//customer/addons/my_changes/hooks/styles.post.tpl file in place.
So I did the “your_admin.php?cc” but I still do not see anything.
When you say to…
[quote]
…remove the var/compiled directory…
[/quote]
…can you please explain what to do other than the ?cc thing? Do you really mean to access the files and delete the whole “compiled” folder, what is in the folder or do you mean just to do the “?cc” command?
Clips, access your site via FTP, then delete the entire contents within both your /var/compiled/ as well as your /var/cache/ folders. Don’t delete the folders, only the contents.
Do not worry as these files will instantly start to rebuild as pages of your site are visited!
Also, IF you are using Smartoptimizer, then also delete the contents of the cache folder within /smartoptimizer/cache.
Not necessary to delete the var/cache directory (or its contents), you only need to get rid of the page cache (compiled). It is okay to remove the directories themselves, they are recreated as needed.
If you have the correct skins//customer/addons/my_changes/hooks/index/styles.post.tpl file in place (you might want to post it here) then you should be able to “view page source” of any of your pages and find the content of your hook file following the “link” for styles.css.
[QUOTE]Not necessary to delete the var/cache directory (or its contents),[/QUOTE]
No, it’s most likely not necessary to delete the cache in this case, although it certainly is not going to cause any problems in doing so! I tell people to delete both folder contents simply to help reduce future issues & because of all the mass confusion here on the forum related to cache clearing, why not clear out the garbage and let it rebuild correctly as needed.
@struck - you’re correct. I was trying to be technically correct… It really doesn’t matter as long as the compiled page cache is cleared by whatever means someone is comfortable with.
Well, no luck yet. So I must still be doing something wrong. I ended up zapping everything in all the cache folders but still cannot see the color changes or image changes.
[quote name=‘tbirnseth’]
If you have the correct skins//customer/addons/my_changes/hooks/index/styles.post.tpl file in place (you might want to post it here) then you should be able to “view page source” of any of your pages and find the content of your hook file following the “link” for styles.css.[/QUOTE]
Here is what I have on the styles.post.tpl right now…
[quote]
[/quote]
Right now I am just trying to change the top blue search bar that goes across the site on the "basic" skin.
I put the {debug} in the .tpl file, but no luck from what I can see. I can’t seem to find it with the Firebug either. So again, I’ve either messed something up or hooks just ain’t up to par yet.
To be honest, I am growing somewhat doubtful of “hooks” idea at this point. In trying to work with the “hooks” idea I have been told by a few different people now that it is a good idea, but it just does not work properly yet. When the pros are making these statements, I believe I’ll just go back to the hard code edit and work from there. Right now I seem to be just spinning my wheels on something that may just not have the bugs worked out yet.