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 :-
Here, I will show you how you can change the location of currency selector to header in Magento.
By default, the currency selector is displayed in the left sidebar. Here, I will show you how you can show it in header just below the language selector.
Create a new phtml file (template/directory/currency-top.phtml) and write the following code in it :-
Here, I will show you how you can change the location of currency selector in Magento.
By default, the currency selector is displayed in the left sidebar. Here, I will show you how you can show it in right sidebar.
Showing currency selector in product view detail page
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 Mage_Core_Model_Website, null given, called in /path/app/code/core/Mage/Core/Model/App.php on line 427 and defined in /path/app/code/core/Mage/Core/Model/Store.php on line 279
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:-
In this article, you will learn about creating multiple website in Magento.
Creating or setting up multiple stores in Magento is somehow easy but creating/setting up multiple website in Magento is a bit difficult task :).
This step-by-step tutorial will guide you to do so.
Problem:
I am having problem in displaying PayPal payment method in payment method section of onepage checkout in Magento.
I am using “PayPal Website Payments Standard“.
Here, I will be showing you how you can add attributes for your categories in Magento.
From the admin panel, you can only add attributes to product. To add attributes to category, you need to write sql query in your phpmyadmin or a better way would be creating a new custom module and adding attributes to category from the mysql setup file of the module.
By mysql setup file, I mean the file inside the directory YourNamespace/YourModule/sql/yourmodule_setup/
Scenario:
You have created a custom module.
You have entered certain data in your database.
You need to show the data randomly.
Solution:
There are different important functions that you can implement in your Collection object. The functions are present in Varien_Data_Collection_Db class. The class file is present in lib/Varien/Data/Collection/Db.php
Here are some of the functions that you can use in your collection object:-