Monday 3 February 2014

Why most of us feel its always difficult to customize Magento ?

i) Its difficult because you can find too many ways to do the same functionality, So we end up in thinking which one is actually correct to the standard.

ii) You cannot find a proper wiki page which could guide you to some customization

iii) If you try to use debug statements like print_r, echo or Zend_debug::dump(), sometimes even this will leads to blank page or keep on loading.

iv) Now I feel tired tired tired, let me write the object in file and see what happens. Its again a big mess Firefox will crash.

v) Ok, No other go let me try to use Xdebug. Its taking me to 100 functions which will make my ass got burn.


AND LAST BUT NOT the least if you find something interesting and try to take a deep breath, comments on top of the function will make you confuse. See the small example below.

Hope you aware of cache config in Magento. You can specify which cache the system needs to use.

So let say I am going for default file cache. See the comment below red in color, if backend empty=file. So instead of leave as empty I have set as file. It throw warning in system.log. After a deep dive I've found that it needs to be empty or File.

But in the comment they mentioned  empty=file . So Beware of this kinda case error & etc etc ... willl make your life terrible.

 <!--Magento Cache-->
        <cache>
            <backend></backend><!-- apc / memcached / xcache / empty=file -->
            <slow_backend></slow_backend> <!-- database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages -->
        </cache>
        <!--Full Page Cache-->
        <full_page_cache>
            <backend></backend><!-- apc / memcached / xcache / empty=file -->
            <slow_backend></slow_backend> <!-- database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages -->
        </full_page_cache>
        <!--Rest of defaults-->

                                                         BE AWARE OF MAGENTO