Category Archives: MAGENTO

Magento fixes, hacks, solutions

Magento Resize Images

Below is a way to resize images on the fly and does it only once. $imageUrl = Mage::getBaseDir(‘media’).DS."catalog".DS."category".DS.$this->getImage(); $imageResized = Mage::getBaseDir(‘media’).DS."catalog".DS."category".DS."resized".DS.$this->getImage(); if ( !file_exists($imageResized) && file_exists($imageUrl )) : $imageObj = new Varien_Image($imageUrl); $imageObj->constrainOnly(TRUE); $imageObj->keepAspectRatio(TRUE); $imageObj->keepFrame(FALSE); $imageObj->quality(100); $imageObj->resize(150, 150); $imageObj->save($imageResized); endif; … Continue reading

Check If Home Page Magento

If you need to determine if the the current page is the homepage in Magento, the below code works. <?php if(Mage::getSingleton(‘cms/page’)->getIdentifier() == ‘home’ && Mage::app()->getFrontController()->getRequest()->getRouteName() == ‘cms’) : ? >

Reinstall Module Magento

If you have installed a module and need to reset it or have installed a custom module and it is not picking up on the changes in the database. Below is a really easy way to reinstall the module. Delete … Continue reading

Magento Create A Simple Module

Are you looking to find out how to make a custom module for Magento? If you follow the steps below, you will be well on your way in under 15 minutes. Step One – Declare Your Module <?xml version="1.0"?> <config> … Continue reading

Magento getBaseUrl retrieving url path

See different ways to use the getBaseUrl function and how to apply in your template. Continue reading

Magento Products by Category

Show all products by category in Magento Continue reading

Magento echo (print) current query

All you have to do is add the code below to echo or print the last query in magento. $collection->printlogquery(true);

Magento Help

Advertisement

OsCommerce to Magento Migration.

I have created a set of external OsCommerce to Magento
Continue Reading
Advertisement

Magento Deleting Stores Manually.

If you ever ruin into a situation where you need to
Continue Reading
Advertisement

Speed Up Magento.

If you enable Gzip compression by changing .htaccess,
Continue Reading
Advertisement

Magento Clear Cache.

Use the code below to clear your cache in Magento using
Continue Reading