example code of magento