Login to a htaccess restricted area via URL

To login to a htaccess restricted area (see http://www.ask-sheldon.com/protect-folder-via-htaccess/) via URL ist pretty simple (but often forgotten): http://user:password@www.ask-sheldon.com/protected/area Please keep in mind, that in this case username and password are transmitted as plain text. There is no encryption or something like that! So anyone who plays man-in-the-middle is able to steel your credentials easily by just […]

Remove items from a collection

Sometimes you need to remove items from a collection (products f.e.) after it was loaded. The following example shows how I removed non salable product items from a collection of sibling products. The respective collection have to be inherited from Varien_Data_Collection. <?php public function getSiblingsCollection() { $oCollection = Mage::getModel(‘catalog/product’)->getCollection() ->addFieldToFilter(‘sheldon_articlenbr’, array(‘eq’ => $this->getProduct()->getData(‘sheldon_articlenbr’))) ->addFieldToFilter(‘type_id’, array(‘eq’ => Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)) […]