Wednesday, June 17, 2015

Magento Debugging Techniques

The tips I am mentioning for Magento debugging can be applied on any LAMP application.

Clear the Magento Cache
If you are using caching at all within Magento, one of the first steps to answering the question - "Why is this not working?" - is to clear the Magento cache. There are two ways to clear the cache:
  • System > Cache Management > Select All > "Refresh" Massaction > Submit
  • Delete the "cache" directory under BASE_MAGENTO_DIR/var

Clear the Browser Cache
More than once, I have wasted 10 minutes trying to figure out why something wasn't rendering to the browser correctly, only to find that my browser was caching old responses. If you don't know how to clear your browser cache, see the following links:
  • Firefox
  • Internet Explorer
  • Safari
  • Google Chrome

Make Sure Your Configurations Are Set For the Proper Scope
Because the System > Configurations can be set for specific scopes (Default / Website / Store View), we have to make sure that we have set the configurations for the proper scope. To check this, use the Magento Admin Panel -
  • System > Configuration > Upper Left Corner (Change to the scope/store view you are working with)

Turn On Magento Logging
This one is a big one. Almost EVERY time, if there is a problem in Magento, something will appear in either the system.log or the exception.log. Checking these logs should become second nature to you. To turn on logging, use the Magento Admin Panel -
  • System > Configuration > Advanced > Developer > Log Settings > Enable
  • Check the magento exception.log under BASE_MAGENTO_DIR/var
  • Check the magento system.log under BASE_MAGENTO_DIR/var

Use Template Path Hints
Template Hints are pretty amazing. When you want to figure out which Block or phtml file a problem is occurring in, you can turn on template hints and see the information right on the browser. It's awesome, so if you haven't tried it, try it right now.
To turn on template path hints, use the Magento Admin Panel -
First, you NEED to select the store view you want to show the hints on. If you don't, the configuration option won't appear.
  • System > Configuration > Advanced > Developer > Debug > Template Path Hints and/or Add Block Names to Hints
  • By default, there is no way to turn on hints for the Admin Panel, so take a look at Easy_Template_Path_Hints extension. It will help you to enable path hints with a easier step. [SOURCE]

Tracing
If you have implemented a home-grown tracing mechanism, turn it on and look at the log. A common tracing mechanism consists of coding tracing statements within the code that log ENTRY into a function, important information within the function, and EXIT from the function. This information can be crucial in debugging problems in a production environment.

XDebug Tracing
XDebug provides some pretty kick-butt tracing ability. If you turn it on, get ready for a lot of data, but it can be very helpful when trying to pinpoint a problem. In the article "Tracing PHP Applications with xdebug" it gives some really good information about xdebug tracing.

Check the Apache error_log

When all else fails, take a look at the apache error_log. It could be a problem with the setup of your webserver.

Google It
It may come as a surprise, but there are still people that don't turn to Google as a "troubleshooting option". They should. When you want to ask a developer something, first ask it to Google. For instance, if you want to know how to do a rewrite of a model, just Google: How do I rewrite a model in Magento. If you want to know why you are getting an error like "HEADERS ALREADY SENT", Google: headers already sent magento. Chances are, another developer will give you a response like THIS if you ask them the question anyway.

Search Or Ask The Magento Forums
One of the big pros to Magento is the active community members. Many are willing to help answer your questions for free, and quickly. Before you ask your question, search the forums. If you don't find your answer, ask your question.

Use the Varien_Profiler
If you are having performance issues, turn on and use the Varien_Profiler. Do this in the Admin Panel -
  • System > Configuration > Advanced > Developer > Debug > Profiler
http://inchoo.net/ecommerce/magento/keeping-your-magento-fit-with-built-in-profiler/
http://www.neptuneweb.com/blog/?id=24

Hope it might help.

Wednesday, March 18, 2015

Magento 2 installation

How to install Magento 2 ?

Here is the following step need to be followed -

 

Step 1: Check system Configuration

  • Apache Version: 2.2 or 2.4 and Enable: mod_rewrite.mod_rewrite enables the server to perform URL rewriting.
  • PHP: 5.4.x where x = 11 or later  5.5.x and
  • Enable PHP Extension: PDO/MySQL,mbstring, mcrypt, mhash, simplexml, curl, gd2, ImageMagick 6.3.7 (or later) or both soap and
  • add xdebug.max_nesting_level=50000; at php.ini
  • MySQL Version : 5.6.x and upper
For installing magento 2 at wamp you need check above php setting then follow the below process:

 

Step 2: Download Magento2

Download Magento 2 from Github https://github.com/magento/magento2

 

Step 3: Download Composer.exe

Magento now using Composer to install the software. Composer enables us to manage the Magento system, extensions, and their dependencies. Composer provides you with the following advantages:
  • Enables you to reuse third-party libraries without bundling them with source code
  • Component-based architecture with robust dependency management
  • Magento dependencies to reduce extension conflicts and compatibility issues
  • Versioned dependencies
  • Semantic versioning
  • Supports PHP Framework Interoperability standard
  • We’ll have more information soon on how developers can use Composer to package extensions to distribute to Magento merchants and to other developers.
 From here you can download Composer.exe.

During installation process the installer request to you ,to select your php.exe which is located at
  • wamp - \wamp\bin\php\php5.5.12(Php version)\php.exe
  • xampp - \xampp\php\php.exe
After installing the composer.exe, you need to run the Command Prompt and reach to your Magento2 directory.

Now run the command - composer install

Above command will initialize the composer. And its time to restart your Apache Server.

Step 4: Now Install Magento 2

Now you are able to run the Magento 2 setup using browser. Following window will open during the installation process of Magento -

1) Agreement Window

2)Setup Description -


3) Setup Database -


4)Web Configuration -


5) Customize Store Setting -


6) Setup Administration Details -


7) Installation Started -


7) Congratulations!

Still facing problem ? Contact Us - aforankur@hotmail.com

Note : This post written by Magento Certified Developer. For any help or assistance email at given address.


Sunday, March 15, 2015

Magento 2 | 10 most important features

Magento is a leading e-commerce solution and a huge platform for Merchants that enables them to sell their products online. This platform has more than 4 million downloads worldwide. And now we can witness the dawn of Magento 2. The new version of this platform brings lots of new features that have all the chances to play a key role in the growth of e-commerce market. In this post you can find 10 most important features of Magento 2.


Magento 2 - Better compatibility with other platforms

Magento 2 is based on Zend Framework and PHP 5.4, it also extends support for MSSQL, Oracle,  and other databases.

Magento 2 - The new level of flexibility

With a new structure of modules (component-based), the new Magento has a much better flexibility in terms of development. The high code coupling in combination with a component oriented structure allows developers to different components including CMS, customer, checkout, sales, catalog, and a lot more. In Magento 2, it is possible to disable or enable every component and at the same time to keep the code base clean.

Magento 2 - Testing-friendly environment

Magento 2 is 100% testing-friendly. It includes a flawless testing framework designed to perform: Static Tests, Performance Tests, Unit Tests, Legacy and Migration Tests, Integration Tests and JavaScript Unit Tests.

Magento 2 - Service Contracts

Service Contracts is another important feature of Magento 2, which is based on a set of different PHP Interfaces. The feature improves and simplifies the use of APIs for various modules. With Service Contracts, developers will get a new way of working with public API endpoints.

Magento 2 - The new file structure

Magento 2 comes with a completely new file structure. There is no base theme anymore and all the base views are in the module structure. Developers now face much less issues while developing custom Magento themes.

Magento 2 - Hassle-free upgrades and installation

Composer makes Magento 2 more friendly for an installation and updates. It is also possible to use a convenient format to upgrade to the latest Magento 2 version.

Magento 2 - Elimination of components and modules

Magento 2.0 provides advanced payment options. The new version of config.xml file is reduced by over 20%, as a result developers are able to offer customizable solutions within less amount of time.

Magento 2 - The concept of view

The complexity and overall development time in Magento 2 has been considerably reduced thanks to ‘the concept of view in the module’. The feature also enables developers to create the working view within no time.

Magento 2 - Better Security

Thanks to the changed directory structure, Magento 2 is more secure. There is a new directory – ‘pub’, which enables developers to protect the code from different security breaches.

Magento 2 - The Magento Community

The Magento development team is opened to the community of Magento coders, we can receive a seamless support for any issues related with Magento 2.