By deafult, when customer/user log in Magento, he/she is redirected to its account page. But if you’d like to redirect…
Useful Tricks
Get all disabled products from Magento using product collection: <?phpset_time_limit(0);error_reporting(E_ALL ^ E_NOTICE);ini_set(“display_errors”,’On’); require_once ‘app/Mage.php’;umask(0);Mage::app(‘default’); $products = Mage::getModel(‘catalog/product’)->getCollection() ->addAttributeToSelect(‘*’) ->addFieldToFilter(‘status’,Mage_Catalog_Model_Product_Status::STATUS_DISABLED); $products->load();foreach($products…
A collection is a Model type containing other Models, it is basically used in Magento to handle product lists (ie….
Creating a module which interact with a database table is quite simple. Most of the developers use magento module creator…
UPDATE catalog_product_entity_media_gallery AS mg, catalog_product_entity_media_gallery_value AS mgv, catalog_product_entity_varchar AS evSET ev.value = mg.valueWHERE mg.value_id = mgv.value_idAND mg.entity_id = ev.entity_idAND ev.attribute_id…
If re-indexing the Product flat data index gives an unknown re-indexing error or “Some problem with re-indexing process” error message…
You will need to include the below given 3 functions for applying hue effect on your image function rgb2hsl($r, $g,…
Below is the code for converting a image using Sepia Effect <?php$img = imagecreatefrompng(‘images.png’);imagefilter($img,IMG_FILTER_GRAYSCALE);imagefilter($img,IMG_FILTER_COLORIZE,100,50,0);imagepng($img,’sepia.png’);imagedestroy($img);?> Here images.png is original image and…
Below is the code for converting a image to Negative <?php$img = imagecreatefrompng(‘images.png’);imagefilter($img,IMG_FILTER_NEGATE);imagepng($img,’negative.png’);imagedestroy($img);?> Here images.png is original image and negative.png…
Below is the code for converting a image to black and white <?php$img = imagecreatefrompng(‘images.png’);imagefilter($img,IMG_FILTER_GRAYSCALE);imagepng($img,’bw.png’);imagedestroy($img);?> Here images.png is original image…