Call Static Blocks From Any PHTML File in Magento

Wednesday, December 14, 2011
In this article i am going to show you...How to call a static block from any template(.phtml) file in Magento.You can easily call any static block from template (phtml) file. At first, you have to create a static block from admin, CMS->Static Blocks .
Let us suppose, you created a static block with the identifier footer_links.
Now, you can call the static block from any phtml file with the help of following code:
<?php echo $this->getLayout()->createBlock('cms/block')
->setBlockId('footer_links')->toHTML();?>

Use any SMTP to send mail in Magento

Sunday, December 11, 2011
This article will explain how to create an extension to send all the emails through gmail or other servers.I have created an module to set up an email account from admin.
I have made use of "Zend_Mail_Transport_Smtp" class to make it possible.

Magento Files and Folders Structure

Friday, December 9, 2011
This part of the Magento tutorial will provide detailed information regarding the Magento's default files and folders structure.
You will learn more about the functions of main files and folders included in the Magento package.
The files and folders included in the main directory are as follows:
• .htaccess - contains mod_rewrite rules, which are essential for the Search Engine Friendly URLs. There you can also find standard web server and php directives that can improve your web site performance.
• .htaccess.sample - this is a backup of the .htaccess file. If you modify .htaccess it can be used in order to get the default settings.
• 404 (directory) - The folder stores the default 404 template and skin for Magento.
• app (directory) - This folder contains the modules, themes, configuration and translation files. Also there are the template files for the default administration
theme and the installation.

Common issues with importing/exporting

You can import/export data by using megento inbuilt import/export feature.
Go to System->Import/Export->Dataflow-Profiles. However, during the import and the export procedures different issues can occur.
The most common ones are as follows:
• Incorrect CSV file formatting - A bad formatting of a CSV file can cause a failed data import or missing rows after the import. The issue occurs more often with CSV files that with MS Excel since CSV is more prone to data failures due to a bad formatting.

Magento Transfer From One Server To Another

This tutorial provides detailed information how to move a Magento store from one host to another (or to a different hosting account).
MySQL database backup:-
PhpMyAdmin included by default in cPanel for your account. In other cases you will have to use the same tool or a similar one that is capable of exporting your MySQL database. Detailed information how to perform a MySQL backup you can find in MySQL Tutorial.
Alternatively if you don’t have phpMyAdmin installed but you have shell access you can use mysqldump tool. The syntax is as follow
mysqldump -h HOST -u USER -p DATABASENAME > FILENAME.sql
Where:
HOST is the database server hostname or it can be omitted if you are running the MySQL server locally.
USER - a user with full privileges to the Magento database.
DATABASENAME - is the full name of the database which Magento is running.
FILENAME - can be anything you find suitable for the backup file.
Also if you have Plesk, DirectAdmin or any other web hosting management tool- you can look at the available options. Many panels allow you to dump the database with just a few clicks. For example cPanel does have an option for this.

Magento Google Analytics

Google Analytics is a free Google service which allows the webmasters and web site administrators to monitor their web sites' traffic and conversion ratio.
Magento supports two types of tracking:
Page View Tracking: Lists the origin from which your web store visitors linked to your store.
E-commerce Tracking: Lists the customers that make purchases and what they buy.
First you need to sign up at http://www.google.com/analytics/sign_up.html. You will receive a Google Analytics account number. Write it down since you will need it for the Magento configuration.

How to manage order emails

As I have mentioned in the Magento order options section, Magento has a very nice built-in email functionality called Sales Emails which allows you to manage the emails you send to your customers when an order is processed. Before you configure your emails, you might want to add new email templates. You can do this from the admin area > System > Transactional Emails.
Now let's take a closer look at each of the options in Sales Emails: