How to make third party magento extension compatible with store theme. - magento

What is best way to make third party extension compatible with store theme which is not default theme. I don't want to do following:
1) We can't modify extension css/phtml file becuase this will make up-gradation of extension because in that case our extension will go away.
Thanks!

I suggest finding CSS from a standard Magento install and use that. Having the least styling possible will mean the most flexibility for the users. Also include instructions on where the file is by default and to install in their theme's template location. I believe this could be programmatically determined and be checked in the Admin area of your extension.

Related

How to disable extension for a particular extension in magento?

I am overiding the deafult onepage_payment_methods in my custom extension.
I want to disable the extension fully (not only output) for particular store. Please guide as I am new to Magento.
Magento modules are enabled/disabled by a line in their .xml module control file found in app/etc/modules
To completely disable the module, find the .xml file named for the module (example DeveloperName_ModuleName.xml) and change the following line:
<active>true</active>
to
<active>false</active>
Watch for dependencies and if you are looking for specific Magento modules, most will be found in Mage_All.xml, other standalone modules will be found in Mage_xxxxxxxx.xml. Be aware that turning off certain Mage modules will have knock-on effects and disabling Mage_Core turns Magento off.
StackExchange question on disabling a module on the store level
Please go to your admin section than login to your backend, system- configuration->advance -> advance search your extension name and disable it.
Hope it works

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.

Magento Extension/Theme Packaging

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.

How to use hooks in CS-Cart for overriding footer.tpl file

I am new to cs-cart and
I am trying to use hooks in cs-cart. I had gone through some cs-cart website but not getting proper answer. Suppose if i want to override footer.tpl file with new content then how can i do it using hooks. Just tell me the steps what code to write in index.tpl file and where to keep new footer.tpl file.
I'd suggest you to check this brief guide: http://docs.cs-cart.com/hooks.
Assuming you're on a version 4.x.x:
You don't need to edit anything in index.tpl, just take note of the name of the hook you want to use (I suppose you want to use this one {hook name="index:footer"})
Write your new template and give it the name footer.[override/pre/post].tpl
Save this new .tpl file in themes/[your_theme_name]/templates/addons/my_changes/hooks/index (maybe you need to create such directories in your folders tree)
Make sure you have the "my changes" addon installed and active. You can check it through your admin area of the store.
And that's it, it should work.
Notes:
I've seen no standard "footer.tpl" file in version 4.x.x., so the above instructions work, but they only append content at the end of the page. Customization of such page area can be done via the layout and theme editor on the admin area of the store.
The naming algorithm mentioned on the documentation of cs-cart is for
version 3.x.x. Since version 4.x.x. the folders names have varied.
You should replace skins/[skin name]/[admin|customer] for
design/themes/[your_theme_name]/templates

Magento Extensions: How do I tell my build system where the active theme is located?

My extremely simple build system for Magento needs to deploy some extension frontend code into the appropriate theme folder. But I don't know how to get it to find out which folder to put the files in at build time. Anyone know how to get this data out of Magento?
Put your code in the base/default theme (default/default prior to version 1.4, or both just to be sure) and it will be available to all themes thanks to inheritance.
Each store within Magento can set it's own theme so you might have more than one to consider. Also certain pages like CMS, category or product pages can choose their own theme to override the store and global settings.
To find the package and theme that corresponds to the folder app/design/frontend/PACKAGE/THEME use;
Mage::getStoreConfig('design/package/name', $storeId)
and;
Mage::getStoreConfig('design/theme/default', $storeId)
If calling from a PHP file external to Magento then you'll need to include 'app/Mage.php'; first. The $storeId value can be either an int as used internally or the store code saved in System > Configuration > Manage Stores - there is usually at least a "default" value.

Resources