Disable a Module in Certain magento Theme - magento

Is it possible to disable certain modules when running a certain theme? I'm working on a mobile friendly version of our Magento store and I've run into some issues with a few extensions. Rather than customize them, the default iphone theme is sufficient, so I'd like to just disable those modules so it runs the default code when on a mobile device. Is this possible?

You can disable that module in local.xml. Just paste this xml in your theme's local.xml.
<config>
<modules>
<[Your_Module_Name]>
<active>false</active>
</[Your_Module_Name]>
</modules>
</config>

In admin panel
system -> configuration -> advanced
here you can disable certain module

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

Package’s local.xml not loading when a custom theme with local.xml is active

I have a design package from ThemeForest installed, which has been working just fine, but I am trying to create a new custom theme that consists of a custom.css stylesheet, and a local.xml layout file which only adds a reference to custom.css.
In Magento Admin, the value of System > Configuration > General > Design / Package / Current Package Name is set to the design package I installed. That works fine until I set Design / Themes / Default to my new custom theme, which causes the local.xml file of the design package to be ignored. I can verify this by removing the local.xml of my custom theme or by replacing it with the one from the design package.
The same thing happens when I set Design / Themes / Layout to another theme, now the local.xml file from the package, and the one from Design / Themes / Default are ignored. I could work around this problem by combining the contents of all the local.xml files into a single one under Design / Themes / Layout, but that’s obviously not a desirable solution.
I have made custom themes before but this is the first time I have had this problem, does anyone have a solution?
Problem
You have run into a limitation of Magento’s design fall back hierarchy. The way it works is to search backwards from most specific location, to least specific.
... if your custom theme calls for a CSS file called ‘styles.css’ but the Magento application is unable to find the file in your custom theme, Magento will go to the next theme in the hierarchy to find the file ... it will continue working down the hierarchy of themes until it’s able to locate the file called ‘styles.css.’
This method of building design is called fall backs, because the application ‘falls back’ to the next possible source of required files in order to retrieve and load a requested file.
What this means for you is that the layout file local.xml can only be sourced from one location, and it will be whatever is the most specific to the current theme. So Magento will search for it in the following priority:
app/design/frontend/$package/$theme/layout/local.xml
app/design/frontend/$package/default/layout/local.xml
app/design/frontend/base/default/layout/local.xml
The important thing to realize is that each of these files overrides the next one down, rather than adding to them. I have heard that Magento 2.x may address this situation, but for 1.x we need to work around this.
A Possible Solution
The way I would go about solving this is to create a simple extension that just loads your custom css file in a separate layout file. Then you do not need the local.xml file in your new theme and it will continue to fall back to default.
app/etc/modules/My_Theme.xml:
<?xml version="1.0"?>
<config>
<modules>
<My_Theme>
<active>true</active>
<codePool>local</codePool>
</My_Theme>
</modules>
</config>
app/code/local/My/Theme/etc/config.xml:
<?xml version="1.0"?>
<config>
<modules>
<My_Theme>
<version>0.1.0</version>
</My_Theme>
</modules>
<frontend>
<layout>
<updates>
<my_theme>
<file>my_theme.xml</file>
</my_theme>
</updates>
</layout>
</frontend>
</config>
app/design/frontend/$package/$theme/layout/my_theme.xml:
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="head">
<action method="addCss"><stylesheet>css/my_theme.css</stylesheet></action>
</reference>
</default>
</layout>
This uses Magento’s design fall back method to load the file as well. So you could put this at skin/frontend/$package/$theme/css/my_theme.css or in the $package/default/css/ subdirectory.

How to remove theme tab name from magento

I am using Queldorei theme after installation it create its custom tab on top just beside system tab.
How can i remove this?
I do not want to remove theme.
Just go to theme module config.xml file, in this file find <menu> tag and comment this <menu> tag
after doing this clear your cache and you are done.
You can either
Comment out the <menu> in either adminhtml.xml or config.xml
Removing it using local.xml or a custom module (if you want to avoid making changes to that modules) see Magento remove "Promo" Item

magento how do i create specific home page for specific templates

I have a good design on my website and i suddenly realized my design does not render pretty well in internet explorer 7 and 8, i tried all that i can but i still cannot fix it and i dont like how its displaying in those browsers so i decided to add exception on the design configuration coumn by adding MSIE 7.0 and then value of defaul, tested with internet explorer 7 and it works well but my problem is that my custom theme has some large images and texts and other materials that were aligned nicely with css but once i changed the theme to default and it does not see those css, they also just display anyhow and its really a pain for me, all that i need to do now is find a way to make the default theme load with a different cms page instead of the normal homepage for my main theme. i dont know if i can do that but i need some little help or guide to go about it.
I followed your guide and have created the files and now i can see the welspot template under the design field.
Now i need to still use the old homepage (the one i have installed with the hellowired theme), i want to copy magento default theme into my package now and edit it but i need to find a way to remove all the static blocks i created through maybe a layout file as i wont use those blocks in the default theme and even if possible add different images through xml so i would be using two themes with the same homepage but dynamic content based on the theme being used.
Sure, you can set default home page whatever you create but you should do some things.
First, create config.xml
<!-- path: app/code/local/Welspot/Page/etc/config.xml -->
<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Welspot_Page>
<version>0.1.0</version>
</Welspot_Page>
</modules>
<global>
<page>
<layouts>
<welspot_one_column_cms module="page" translate="label">
<label>Welspot One Column</label>
<template>page/welspot_one_column.phtml</template>
<layout_handle>welspot_one_column_cms</layout_handle>
</welspot_one_column_cms>
</layouts>
</page>
</global>
</config>
Second, create Welspot_Page.xml
<!-- path : /app/etc/modules -->
<?xml version="1.0"?>
<config>
<modules>
<Welspot_Page>
<active>true</active>
<codePool>local</codePool>
</Welspot_Page>
</modules>
</config>
Third, create welspot_one_column.phtml
<!-- path : /app/design/frontend/[your_package]/[your_theme]/template/page -->
<div>Hello World</div>
As you might guess, you should customize welspot_one_column.phtml file.
Finally, go to Admin > CMS > Pages > Home Page > Design Tab select your newly created template (Welspot One Column).

Disable a Module in Certain Theme

Is it possible to disable certain modules when running a certain theme? I'm working on a mobile friendly version of our Magento store and I've run into some issues with a few extensions. Rather than customize them, the default iphone theme is sufficient, so I'd like to just disable those modules so it runs the default code when on a mobile device. Is this possible? If not, perhaps I'm approaching this from the wrong angle. What is the right way to handle this type of thing?
It sounds like you need to look into the Exceptions portion of the System configuration, you should be able to at least setup some conditions for mobile user agents.
An Article I wrote a while back on using the iphone theme for android may help shed some light for you:
http://www.molotovbliss.com/iphone-magento-theme-compatible-with-android
As far as disabling modules based of the exceptions sounds like you'll need to manage the modules etc/ xml files to set <active>true</active> to <active>false</active> when needed, however I believe you could disable the output of the module via a built in method also.
Hope this helps.
Brian, I think you can do it using local.xml file that is template dependent.
Here are some examples from my file:
<default>
<reference name="left">
<remove name="left.newsletter" />
</reference>
</default>
When you use the remove tag, it removes any blocks with the specified name from
the entire layout, regardless of the context. So, if I remove right.newsletter in
the context and that name is used in say the context,
then both blocks will be removed. Because remove operates on the global context,
you can only remove an element once.

Resources