Does magento touch theme folders during updates - themes

I am working on a Magento project and it is due an update; so I am wondering which folders will it replace/affect during an update. I am used to working with wordpress which leaves the entire 'wp-content' folder ( all the user data ) untouched during an update - I presume magento does something similar and doesnt overwrite custom theme files, media uploads (and hopefully not products and user data anyway) but then I read the following from this page which confuses me
For several of the first Magento themes I built, I copied the layout files from the default or blank theme into the custom theme layout folder. I would then modify the layout files directly, editing or commenting out content in files like: catalog.xml, page.xml, checkout.xml, etc… I never liked editing these files directly, as I knew that when it came time to upgrade to a newer version of Magento that had upgraded the layout files, I’d have to merge the changes into the new layout files.
I think I may just have a mistunderstanding specifically about layout files but all the same could someone clarify for me which locations (if any) that I might expect to loose data from during an update ( so that hopefully I can avoid using these locations )

You won't loose any data if you have made your edits in custom theme package/folder and not in core code (but in tyour own extensions and code/local code-pool). However as you mentioned yourself it would be wise to merge your theme to be based on new layout files and same goes for template files as well
you can use a diff tool for that that can compare entire folder structures (winmerge, things and so on) and compare your theme and base theme folders
lets clarify things
whatever you change in code do it by making extensions in app/code/local/ or app/code/community
by merging your theme based on = if new version of magento is available and your theme is based on old version layout files and templates eq you have copied layouts and templates and modified them then it is wise to compare all changed files against new ones and apply your changes on top of new layout and template files

Related

Uploading Aheadworks blog extension to my custom Magento theme

I'm fairly new to Magento and am having trouble uploading the Aheadworks blog extension to the correct directories. I am using a custom theme for my site, let's call it "themex". The directions state "Navigate inside step_1 directory. If you use a different from default theme - be sure to rename step_1/app/design/frontend/default/default and step_1/skin/frontend/default/default folders to your store's values."
I've located the 'step_1' directory but I'm not quite understanding the latter part of the directions. Am I renaming the 'step_1' directory to "themex" and uploading it to the root directory? Please be as descriptive as possible in your response.
Their instructions are badly phrased, but I'm pretty sure it means that you need to upload the files to app/design/frontend/default/themex
Magento theme files appear in the app/design/frontend/ folder.
The "base" folder here contains the core layout files, and the "default" folder contains the file overrides for other themes. As such, your theme's layout files will appear under app/design/frontend/default/themex (possibly app/design/frontend/themex/default depending on how the theme works)
Magento will first look for design files here first, and then look under app/design/frontend/base if the override does not exist.
Make sure you back-up any files, and if their files over-write any of your theme files then run a comparison on them to make sure they are not over-writing any of your theme's functionality.

updating existing site built in dreamweaver, handling DWT file

I have a client that want's me to make a change to her OTHER site. The other site was built using Dreamweaver.
I guess (I don't build using Dreamweaver) the site pages are being controlled by the template file EXCEPT for the content that is specific to the page.
So I need to change the navigation items.
I found a folder called templates and in that folder is the template.dwt file. I tried copying that file to my desktop, then making the change and uploading back to the ftp site. Of course that had no effect on the nav items. My guess is the file on my desktop does not know to update the other pages as it doesn't know where those pages are.
So how do I go about making the changes to the files on the ftp site using the DWT file?
Do I have to download ALL the html files and the DWT files and somehow create a relationship so when I make the change to the DWT file it updates all the pages on my desktop THEN re-upload all those files back to the ftp site?
Thanks
My guess is that you already figured this out, but just to be sure. You're question is right, the DW template works by when the template is modified (in DW) then you can update all the pages that are linked to it.
If you take the template out of DW and just modify and upload that alone, then nothing will happen to the other pages. So yea, if you know a way to create a link between the template and the other files outside of DW, then that is what you need to do. The other option is using DW and modify the template and then update the other pages, which is done in a semi-automatic way. Semi-automatic, meaning that DW gives the option to update the files either once you save the template or you can save the template and update the files later using DW.
And your guess is correct, the template modifies areas that are not specific to a page. Usually, this is done by creating Editable Regions in the template. Those regions are excluded from change when the template is modified.
You have to create a project in DW and put inside all the files that are "linked" with the template. They usually have tags inside that refer to the template.
Make sure that you keep the same file and folder distribution that the original had. If not, you could have a mess with relative links.
Then, with your template also in the project, open and modify it.
When you save the template, DW will ask you for scan and update related files, if you are lucky it will find and update all of them.

Renaming functions and variables in an original theme

I want to create a theme, using a default WordPress theme as the initial point.
According to WordPress Codex, the recommended way to do that is to create a child theme.
Unfortunately, that approach may noticeably affect the performance of a site, because both themes have to be called before the site is actually displayed. WordPress tends to be fairly slow on quite a number of popular hosts, so slowing it down even further is not something I would want to do.
At the same time, coding a theme from scratch seems to be inefficient when an open source theme is close enough to the desired result to only require certain minor recoding.
Question: if I rename the theme in the main CSS file, there's still a lot of function callbacks and variables addressing the name of the old theme (for example, 'twentyeleven'). There has to be some central location where these are called from. What things do I need to rename, in addition to the theme name at the top of CSS file, to fully rename the entire theme an prevent it from being updated, should the original theme be updated by WordPress development theme?
All functions and callbacks of a theme are only being used if the theme is activated. So if you copy the 'twentyeleven' theme into a new folder & activate it, only those functions are loaded even if they have the same name(s) as the original theme. To answer your question (going with the 'twentyeleven' theme):
Copy the 'twentyeleven' theme folder and give it a unique name
Edit the file style.css in your freshly copied theme folder. Change the Theme Name:, Theme URI:, Theme Author:, Description: & Version: values to match your desired output.
Go to Appearance->Themes and activate your new theme
You have now a 'twentyeleven' clone, but completely independent of the original files. Any updates available for the 'twentyeleven' theme will not affect your theme (there will be no updates listed for your theme).
HTH
you may be interested in html5blank, a boilerplate wordpress theme

Remove a magento theme - Rollback to default

This is my first time working with Magento and here is what happend: I spent two days reading the documentation and tweaking the settings to fit my needs. I then installed this theme:
http://themeforest.net/item/decostore-magento-theme/1876494?WT.ac=category_thumb&WT.seg_1=category_thumb&WT.z_author=8theme
The problem is that the theme didn't work the way I was expecting and now I'd like to rollback to the default theme and completely remove everything added by this theme to my installation.
Unfortunately, I didn't backup the installation and database before I installed the new theme and I have no idea where to start.
Thanks in advance.
1. Switching back to default theme
Go to the admin area and then system > configuration > design
Change "Current Package Name" to 'default' and make sure all inputs under the "Themes" section are empty. This will return you to the default theme.
2. Completely remove everything added by this theme
I take it from your question that you are not using any form of source control. Might be an idea to look into this for the future :)
Magento 1.7 has introduced backup and rollback features so you may also want to check that out.
If this is the case, backup everything before you start removing files and directories as described below
Anyway, to completely remove all files and directories added when you installed the module, unfortunately it will simply be a case of manually finding the files and directories deleting.
The easiest way to do this will be to find the original source code you received when you purchased the theme and removing the corresponding files from your site. When removing directories be careful to only remove those specific to the theme - It will have been sent to you structured so that you can easily drag straight in to your web root - so will contain some other directories required by Magento, simply to give it the correct hierarchy.
At the very least there will be files and folders specific to the theme located in the following directories:
app/design/frontend
skin/frontend
js
and also most likely some more in the following:
app/etc/modules
app/design/adminhtml
app/locale
I know the result for this can be different for everyone, but in case someone else comes across my specific case, it was the N98 folder under app/code/community/N98 that caused the problem. Particularly their CustomerGroupCheckout plugin as shown here: https://github.com/amenk/N98_CustomerGroupCheckout
Removing the N98 folder brought back the configuration page.

Magento - Editing phtml files in adminhtml folder having no effect

When I make a change to “app/design/adminhtml/default/default/template/page/head.phtml” or other files in the adminhtml folders, the changes I make have no effect on the site. The site seems to be using old versions of my files but I have no idea where it is getting them from. I have deleted the cache multiple times and logged in/out of admin. I’ve also managed to turn on path hints in the admin panel and can see that the correct files are being used but the code in the files is incorrect. If I rename the file to _head.phtml then as you'd expect, the styling, js and meta tags etc go missing but when I make a simple edit to that same file the change is not reflected.
I recently upgraded from 1.6.2 to 1.7 - Am I missing something?

Resources