Magento

Code/Snippets I regular use

Collections

Product Collection

                $collection  = Mage::getModel('catalog/product')->getCollection();
              

Available Country Collection

                $collection  = Mage::getModel('directory/country')->getResourceCollection()->loadByStore()->toOptionArray(false);
              

Logging

Logging to your own file

                Mage::log('My log entry', null, 'mylogfile.log');
              

MySQL Setup

Remove customer attributes

                $setup->removeAttribute('customer', 'current_credit');
              

Remove category attributes

                $setup->removeAttribute('catalog_category', 'thumbnail');
              

Add Static Block to Layout XML

                header_selling_pnts
              

jQuery

Code/Snippets I regular use

Events

Click

              $( ".carousel li") .click(function() { }); 
            

Window Load

              $( window) .load(function() { }); 
            

Window Scroll

              $( window) .on('scroll', function() {  }); 
            

Window Rezise

              $( window) .resize(function() {  }); 
            

Prevent Default

              $( ".carousel li") .click(function(e){event.preventDefault();}); 
            

Useful Sites

Websites that are of useful

Collaborate

Get In Touch

Reach out

I’m always keen to keep involved in the Web community and to keep my ear to the ground for the latest in technology and methods in best practise.