Magento: How to get list of all modules programmatically?

Here, I will show you how you can get list of all modules in your Magento installation. It’s a simple code. Get all modules You can find getNode() function in the class Mage_Core_Model_Config. $modules = Mage::getConfig()->getNode('modules')->children(); From the code above, you get all the modules information like whether the module is active or not, the … Read more

Magento: How to change the ‘Default welcome msg!’

Here is a quick tip to change the Default welcome message that appears in header of Magento shop. When the user is not logged in, the message appears as ‘Default welcome msg!‘. To change the message text, follow steps below:- – Go to System -> Configuration -> GENERAL -> Design -> Header -> Welcome Text … Read more

Magento: Showing Store Selector / Switcher in header and footer

Here, I will show you how to show the store selector (store switcher) in header. By default, the store selector is present in footer. Create a new phtml file (template/page/switch/stores-top.phtml) and write the following code in it :- <?php if(count($this->getGroups())>1): ?> <div class="language-switcher" style="margin-left:15px"> <label for="select-store"><?php echo $this->__('Select Store') ?>: </label> <select id="select-store" onchange="location.href=this.value"> <?php … Read more

Magento: Show Currency Selector in header

Here, I will show you how you can change the location of currency selector to header in Magento. I suppose that you have already enabled/setup Multiple Currency in your Magento shop. If not then here is how to do it:- Magento: Setup multiple currency shop By default, the currency selector is displayed in the left … Read more

Magento: Show Currency Selector in right sidebar

Here, I will show you how you can change the location of currency selector in Magento. I suppose that you have already enabled/setup Multiple Currency in your Magento shop. If not then here is how to do it:- Magento: Setup multiple currency shop By default, the currency selector is displayed in the left sidebar. Here, … Read more

Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an instance of Mage_Core_Model_Website

Problem: I was transfering Magento files and database from one server to another. I did complete all the transfer process of files and also exported and imported the database. After that, when I tried to access the site, I got the following error:- Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of … Read more

Magento: How to select, insert, update, and delete data?

Here, I will be showing how to select, insert/add, update/edit and delete data in the Magento way. It’s about implementing the CRUD (Create Read Update Delete) concept. :) Suppose, I have a database table named ‘news‘ with the following fields:- id : int, auto increment, primary key title : varchar content : text status : … Read more

Magento: Setup Multiple Website

This step-by-step tutorial will guide you to create multiple websites in Magento. I suppose that Magento is installed in the website’s root folder. Let’s assume the website URL to be your-website.com. Magento is already installed in your-website.com. Now, we will be setting up for new website from Magento admin. Let our new website be your-new-website.com. … Read more

Magento: PayPal Website Payments Standard not displayed

Problem: PayPal payment method is not displayed in payment method section of onepage checkout in Magento. I am using “PayPal Website Payments Standard“. I have enabled this module from backend. System -> Configuration -> SALES -> Payment Methods -> PayPal Website Payments Standard. Cause: The possible cause is because base currency of your shop is … Read more