Jul
16
2009

Add custom input fields on Admin html forms in Magento

Adding a custom input type on the forms on Admin html is very easy. I used this in the module which I created with Module Creator. I supposed to show the uploaded image on the edit form on Admin. The images are uploaded by the user from the front end. For displaying the thumbnail, by default there is no way in Magento. So I created a new class ‘Varien_Data_Form_Element_Thumbnail’ & named it Thumbnail.php. class Varien_Data_Form_Element_Thumbnail [...]

Jul
15
2009

Magento: Clear the cache with PHP script.

It always take time to get rid of the Magento cache. However cache is needed to execute the request faster. One way of clearing the cache is delete all the directories inside the /var/cache directory. Doing that manually it will take some time if you are connected to the FTP server. The easiest way of clearing the cache in Magento is here. <?php ini_set(‘max_execution_time’, 3600); ini_set(“memory_limit”,”256M”); $script = “rm -rf var/cache/*”; $results = system($script,$retval); echo [...]

Jul
13
2009

Search in Files using PHP Script with unix commands

Search in large number files is painful & slow for the Magento based projects. If you are using your editor’s built-in search feature, then also it may take lots of time to search within all directories. In case of you are editing the files on the live server, its very awful to search in even small no. of files for code. However, there is a solution, if your Magento store is hosted on Linux server. [...]

Pages:«12