Magento Extension/Theme Packaging - magento

just a quick developer question in regards to Magento Extension/Theme Packaging, more specifically, when packaging, would I place the template files, layout files, skin folders etc in the base folder (see path below)(and not overriding any core files either)
app/design/frontend/base/default/template
app/design/frontend/base/default/layout
skin/frontend/base/default/css
and so on? I see this would be most suitable as alot of platform users would have custom themes with maybe custom namespaces for the theme folders. As users would have to stuff around to rename/move files/folders to work with their platform if packaged the default way I have seen in the past (ie in the default/default folder paths).
cheers for any feedback

This is the only way to package extension to use base/default or default/default location for template, layout and skin folders. Because if custom theme is used, then also this will work due to Magento's fallback mechanism. And if user want to add those files in custom theme location, then he/she should manually copy or move files in theme's respective location as you have said. And it is obvious that we can not predict custom theme path while packaging extension.

Related

Overriding attributes.phtml file from base into custom theme not working as expected

I copied attributes.phtml file from base into my custom theme to change the way the attributes table is displayed.
When I make changes to it keeping it in the base, it works fine.
Copying it into custom theme removes the entire tab entirely beside description tab.
Since it is working fine in the base version but not in my custom theme folders, is there something particular about attributes.phtml that I need to keep in mind before copying into my custom theme folder?
This is probably a case of permissions. Just check and ensure you have the correct permissions as the rest of the files.

Magento Templates - Can extensions be bundled with a theme?

I have a real noob Magento question. I'm helping a friend change the template their store is using but they are worried about losing the functionality of some of their extensions such as ajaxsearch. They don't know if it's actually an extension or part of the template. I can't seem to figure out if some of the extensions are built into the theme or if they are completely separate extensions. Is there an easy way to tell?
To give an example the ajaxsearch JS file's path seems to in the template path e.g http://www.example.com/skin/frontend/default/templatename/js/ajaxsearch.js
and if I go to system > configuration I can see it listed in the sidebar under Templates-Master (which I think is a brand name). In this case is this an extension and is this how file paths work for extensions? The fact that skin is in the file path is throwing me off.
Thanks!
Fast way:
Each Magento extension provided as archive (.tgz). Unpack it to some folder outside Magento and check have it next path or not:
unpacked_folder/skin/frontend/default/templatename/js/ajaxsearch.js
(another trick is look in the first lines of ajaxsearch.js file, authors often write extension or theme names in it).
Long way:
Find where is this file included on page. Search for 'ajaxsearch.js' in xml files placed in app/design/frontend/default/templatename/layout/
if not found, try to search in app/design/frontend/default/default/layout/ etc.
For example you find it in somefile.xml
Try to find which extension include this file. For doing this search 'somefile.xml' in config.xml files in local and community pools:
app/code/local/some/extension1/etc/config.xml
app/code/local/some/extension2/etc/config.xml
app/code/community/some/extensionN/etc/config.xml
etc
If you found it in ...some/extensionX/etc/config.xml - this mean what ajaxsearch.js belongs to some_extensionX extension. If not found - it belongs to theme.

Installing Magento Extensions on a Custom Theme

I'm building a Magento theme, and the extensions that I've installed so far do not work well with my website. As it seems, some of the plugins are not showing any display on the front-end (others show, but not completely as intended).
In general practice, when building a custom theme and installing extensions, are the extensions installed in the custom theme's directories or in the base or default directories? I haven't yet ruled out the possibility that Magento is unable to find all the proper files because it's looking in the wrong place, and that while it should be looking in the theme files, the files are not there, because they're installed in the base path instead.
I saw something on those lines over here: http://www.collaboration133.com/magento-extensions-not-displaying-on-frontend-after-install/2693/
What's the common standard (as far as directories) for successfully installing a Magento extension? Also, if I need to reinstall it in the custom theme directory, is there a simple way to do this, or must this be done manually? Thanks!
As far as Magento folder structure is concerned, it checks the files in:
<current theme package> --> <current theme folder>
<current theme package> --> <default folder in current theme's package>
base --> default folder
So if the extension has files in suppose default --> default folder and your theme package already has a default folder, then extension files will not be accessible by default.
You need to manually copy those files into your theme.

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.

Backup Magento Theme

I am making some changes to a purchased magento theme. Is there any simpler way to backup my work other than by copying the relevant folders inside app skin and media and their directory structures.
What I recommend that you do is to have your purchased theme as your default theme, i.e. in the "default" folder under your package. You can then declare another theme, e.g. "custom", and copy the path/files to there that you wish to override. You just need to set the "Default" value to "custom" in Admin > System > Configuration > Design > Theme.
Just thought I'd answer this for anyone coming along - as far as i can make out the answer to the question is no, not really - unless I'm doing it the wrong way - ( and I think not ) then the best method of backing up a custom theme is to first compress the entire app, skin and media ( if relevant) directories into one archive file, move this and expand it in an empty directory, then carefully delete all the other theme folders, leaving just the files which you are using and the directory trees which you have created - this preserves any files you have in your custom theme and also the necessary directory structure. If anyone has a better method maybe they'd share it.

Resources