Wednesday, January 23, 2013

Cracking Magento Certification



Are you  the one who is searching extensively on Google to find  about cracking Magento certification exam or possibly searching for some cheatsheets, question or reference and google got landed you to this page ? Oh then may be this page wouldn't be of any help...

So your going eh? I wouldn't stop you, I know this is kinda adrenaline rush.. searching on Google to find what you want to find. but if you really want to find about cracking Magento certification you may like pause for a moment and read on . by my experience I would strongly recommend this.

Well then,You decided to hold your horses ? Congrats you just saved a lot of precious time that you would be wasting  on searching for shortcuts on cracking Magento Certifications and now will utilize that time in Magento study instead.
Okay Well , I passed Magento Certified Developer Plus last month ahem ! and here is how


Magento Certification , Is it tough or piece of cake?

have you heard of Einstein's theory of relativity ? I m sure you've heard of it. but what the hell theory of relativity have to do with Magento Certifications ? and answer is it follows same rule , the more you dive into Magento Code easier cracking certification exam is. but does it mean

I need to be one alive phpdoc for  Magento code base ?

This is question that I found real hard to answer myself when I was preparing for it. and the answer is you dont need to be . Magento expects you to have knowledge about its data flows , Structure and overall architecture. This mean you should be able to understand Magento's core features and its structure rather than memorize all functions, classes and syntax , for this we have already invented computer isnt it? so focus on logic and overall philosophy of magento code instead of code itself.
okay I know its still ambiguous so here is secret(okay its not but still as important as it could be) , go to  Magento Certification page and click  on resources tab and download  free study guide provided by Magento . consider it as a most important resource for your study preparations. Okay You have downloaded it. now

How to make best use of study guideline provided by Magento ?

The guideline lists all possible modules on which questions would likely to be asked. and the way I used it for my preparations is to go through each module by following this steps:
a. Open Config.xml and find out what are the observers/events are written for it go through its implementations and make a note of it.
b. Open Models files and find out db interactions, resources, and data manipulations here make a note what you find important here.
c. Open Controllers files and study actions
d. and finally go through blocks

It should take around 1 Week or less depending on how much time you are putting into it for prep to go through all modules listed in guideline. once you have note of all modules just keep revising it until you get confident.
You may be thinking by now (specially If you have landed to this page searching for some quick cheatsheets or reference ) that I am no way sounding different then what other so -called ethical guru preaching about fair exam practices and all isnt it. okay let me answer why

I should not search and find some quick reference/questions/cheatsheets for Magento instead of study ?

Okay you are a developer and  have developed some cool Magento apps. all you need is some recognition and so you want to go for this certifications. but studying like school kid eh ? no you dont want to do it . coz you "know" Magento You rather searching for some reference that would help you get certification. well lets put it . If you are searching for some quick reference ( like I did initially when I decided to go for cert.) then what I realized myself I dont actually "Know" Magento. and this realization led me to go for reality check and study overall architecture of Magento so I could proudly say I know Magento.

So the answer is there is no quick reference/questions/cheatsheets out there that could help you get certification and most importantly the divine feeling that you "Know" Magento. so better bet go for a reality check and get ready to dive into Magento instead of searching over web for quick reference.

please put your comments about your view on it or if this article help you anyway getting your Magento Certification.


Monday, September 3, 2012

Mass Importing of Product using magento faster way

I was willing to write on some best practices to mass import product in lillte time . then i come to know
about magmi and i got second thought why not just reveal magento's best kept secret of mass import

so here you go download this from http://sourceforge.net/projects/magmi/
the setup and usage is fairly easy and straight forward.

Thursday, August 9, 2012

adding link to magento top menu using layout update


Add link to Magento Top Menu using Layout XML update
in your custom module's  layout.xml default handle add this


      <reference name="root">
<reference name="top.links">
<action method="addLink" translate="label title">
<label>About Us</label>
<url>about</url> <!-- can use full url also -->
<title>About Us</title>
<prepare>true</prepare> <!-- set true if adding base url param -->
<urlParams helper="core/url/getHomeUrl"/>
</action>
  </reference>
</reference>

Using IF-ELSE OR CASE-WHEN in Magento Collection - Expression based field by addExpressionAttributeToSelect

Using IF-ELSE OR CASE-WHEN  in Magento Collection - Expression based temporary column field  by addExpressionAttributeToSelect

Magento addExpressionAttributeToSelect  method can be used to create temporary column in
collections

$_collection Mage::getResourceModel('sales/order_collection')
        ->
addExpressionAttributeToSelect('your_temp_column''CASE order_id WHEN 1 THEN one ELSE TWO END ''');

on printing sql query using getselect
echo $_collection->getSelect() ;


 the magento will create query something like this  SELECT (CASE order_id WHEN 1 THEN one ELSE TWO END) AS your_temp_column

The temproary column can be used for sorting and filtering also , please note for filtering
you need to use 'having'  instead of builtin addAttributeToFilter method.
$_collection->getSelect()->having('your_temp_column = "one" '); 

hope this helps




Friday, December 10, 2010

Adding TInyMCE Editor in Magento Custom Module

I've created an custom module from module creator but i couldnot displayed tinymce wysiwyg editor in admin page ?

though modulecreator guys has added default field of "content" for editor:

$fieldset->addField('contentdesc', 'editor', array(
'name' => 'contentdesc',
'label' => Mage::helper('getthelooks')->__('Description'),
'title' => Mage::helper('getthelooks')->__('Description'),
'style' => 'width:500px; height:300px;',
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
'wysiwyg' => true,
'required' => true,
));

but even i change wysiwyg to true it didnt worked. module creator has forgot that to enable wysiwyg we also needed js for that

so here is complete simple layout xml file :





1










js_cssprototype/windows/themes/default.css
js_cssprototype/windows/themes/magento.css










change getthelooks to your custom module name and enjoy!

Product grid Magento

$this->getLayout()->createBlock('adminhtml/catalog_product_grid', 'product.grid')->toHtml()

GET ATTRIBUTE VALUE MAGENTO

if($_product->getResource()->getAttribute('webexcusive')->getFrontend()->getValue($_product) == 'Yes') {