Check if file is an image in php

We can use the php’s inbuilt function getimagesize to get the informations about an file, including its type. While checking for the type we can can also check the file is image or not. So by using getimagesize we can …
Get countryID from selected / entered shipping address magento
Some times we need to get countryid from selected/entered shipping address, As the checkout page is completely driven by ajax we need to utilize any page which is refreshed like the available shipping methods block so when ever there is …
Remove a parameter from url

In this post we are discussing about the ways in which we can remove a parameter from url we can do it by using preg_replace and regular expressions The regular expression used for this is and the whole code will …
Update products stock by code magento

Sometimes when using EDI(Electronic data interchange) we need to update the product attributes in magento For example EDI846 which deals with product stock So how can we do this lets see First of all we need to process the edi …