Wednesday, 13 December 2017

Magento 1.x Files and Folders Structure

This part of the Magento tutorial will provide detailed information regarding the Magento's default files and folders structure.

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;
  • 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;
  • cron.php - a Cron Job should be set for this file. Executing of the file on a defined time period will ensure that the complicated Magento caching system will not affect the web site performance;
  • downloader (directory) - This is the storage of the web downloader files. They are used for the installation and upgrade of Magento through your browser;
  • favicon.ico - the default favicon for Magento. A small icon that is shown in the browser's tool bar once your web site is loaded;
  • index.php - the main index file for Magento;
  • index.php.sample - A backup of the default index file. It can be used to revert the changes in a case of a index.php modification;
  • js (directory) - Contains the pre-compiled libraries of the JavaScript code included in Magento;
  • lib (directory) - The Magento core code is located in this folder. It contains the software's PHP libraries;
  • LICENSE_AFL.txt - The Academic Free License under which the Magento software is distributed;
  • LICENSE.txt - The Open Software License under which the Magento software is distributed;
  • media (directory) - This is the storage of the Magento media files - images out of the box, generated thumbnails, uploaded products images. It is also used as a container for importing images through the mass import/export tools;
  • mage (in versions older than 1.4.2.0 this tool was called pear) - The file controls the automatic update through the downloader script and SSH. It handles the update of each individual Magento module;
  • php.ini.sample - This file contains sample php directives that can be used in order to modify your PHP setup. If you want to alter the default setup edit the file and then rename it to php.ini;
  • skin (directory) - There are located the themes files - images, JavaScript files, CSS files, Flash files. Also there can be found the skin files for the installation of skins and administration templates;
  • var (directory) - Cache, sessions, database backups, data exports and cached error reports can be found in this directory;
If you want to modify an existing template or set a new one you should know that the template files are separated in 3 folders:
  • /app/design/frontend/default/YOUR_TEMPLATE_NAME/layout/ - Contains the .xml files that define which modules should be called by the template files and loaded in defined areas on the site;
  • /app/design/frontend/default/YOUR_TEMPLATE_NAME/template/ - Contains files and subfolders that structure the final output for the users using the functions located in the layout/ folder;
  • /skin/frontend/default/YOUR_TEMPLATE_NAME/ - Contains the CSS, images, JavaScript and Flash files related to the template;

Friday, 17 November 2017

How to Install Magento Connect Extensions

Magento Connect is a marketplace that allows Magento community members and partners to share their open source or commercial contributions for Magento with the community. It contain both free and commercial extensions. Free extensions are uploaded to Magento and available for direct download from Magento Connect.

Install Magento Connect Extensions

 

  1. Navigate to the Extension Profile
  2. Select the Platform
  3. Click the Install Now button
  4. Select Your Magento Connect Channel ( For Magento 1.5+ select Magento Connect Channel 2.0 )
  5. Check the box to agree to the extension license agreement.
  6. Once you select the channel and agree to the licensing agreement, click Get Extension Key
  7.  The extension key is revealed. Click Select Key to copy the key.
  8. Log into your Magento Store Admin Panel
  9. Navigate to System > Magento Connect > Magento Connect Manager
  10. Paste the extension key in Step 2 field and click Install. Magento Connect Manager verifies the extension key and gives you options to Cancel Installation or Proceed. 
     
  11. Click Proceed. The Console Box displays the results of your install. If there are any issues, it will be displayed in Console box.
  12. Click Refresh to see this extension added to your Extensions List


 

Tuesday, 14 November 2017

Magento Installation Step by Step

Step 1.
The first thing you need to do to install Magento manually is to download the latest installation package from the official Magento website.

Step2.
 
Next, you must upload the installation package on your hosting account through your cPanel -> File Manager or using an FTP client.
In case you want the Magento installation to be primary for your domain (i.e. to run from http://xyz.com), you need to extract the content of the installation package in the public_html folder. On the other hand, if you want it to be in a subfolder like http://xyz.com/store/ you need to extract the content to public_html/store/.

Once you upload the package, you can extract it through your cPanel -> File Manager.

Step 3.

Create a MySQL database and assign a user to it through cPanel -> MySQL Databases. Remember the database details, since you will need them during the script installation.

 Step4.

Go through the Magento installation process
In our example we will install Magento in the public_html/store folder. Once the package is uploaded and extracted and you have a MySQL database, navigate to http://xyz.com/store:



Click on the check box next to "I agree to the above terms and conditions" and click on the Continue button.
Now, choose the preferred Time Zone, Locale and Currency and press the Continue button.
Next, enter the database details: Database Name, User Name and User Password. You can leave the other options intact. Make sure that you place a check on the "Skip Base URL validation before next step" option. Then, click the Continue button to proceed.
At this point you should enter the personal information and the admin login details which you want to use. You can leave the Encryption Key field empty and the script will generate one for you. Once more, click the Continue button.
Finally, Write down your encryption key; it will be used by Magento to encrypt passwords, credit cards and other confidential information.

Well Done! 
 Your Magento installation was successfully completed. Now you can navigate to its Front-end or Back-end.


Magento Cache System Basic Concepts

The Basics – How To Use Cache In this section we will see how to use cache in our custom modules. Suppose you have a custom module and w...