Widely regarded as best practice, the use of automated tests to ensure the correct functioning of your web application is a really powerful and useful practice. For Magento it has historically been something that you would need to create yourself. Now Magento have released a comprehensive package of 1000 tests that you can download as [...]
Archive: magento
Posts Tagged ‘magento’
If you are looking at your Layout XML when trying to debug missing blocks for example, you may see the attribute ignore="1" being assigned to chunks of XML. These are set when some module or other is using the remove syntax to remove a block. For example I have just had some issues with Fontis [...]
So, 6am this morning (Wed 29 2012), a bunch of geeks eagerly awaiting the Raspberry Pi have killed the websites of both RS Components and Farnell Why, you ask? Because the servers were not prepared for the influx of visitors that such an announcement brings. Raspberry Pi themselves (a UK Foundation, like a Charity) were [...]
Magento's Zend extension for creating pdfs could take massive amount of time to customize, I would say customizing the code to make it do what you want is not the best the way to go when an entire layout changes is to be made to probably for invoice, packing slip etc. I found an extension [...]
These two Magento functions looks more like there is no obvious difference between them, but there is. addAttributeToFilter('some_attribute1','attribute_value') filters a Magento entity collection (e.g Products, categories) by only selecting entities that has 'some_attribute' equal to 'attribute_value' while addAttributeToSelect('some_attribute2') tells Magento to return add 'some_attributes' to the set of properties that would be returned for a [...]
If you are having issues running unit tests that work with sessions and call session_start(), you might see error messages like this: output started at "PHPUnit/Util/Printer.php:173" If you do, the solution is fairly simple. Just add the flag --stderr to PHPUnit eg PLAIN TEXT CODE: phpunit --stderr mytest.php If you are using Netbeans, you simply [...]
Encrypting a string in Magneto is really easy and will use the encryption key specified in the local.xml file: PLAIN TEXT PHP: <?php $encryptedData = Mage::helper('core')->encrypt("This will be encrypted"); There is one problem that you may encounter that can be a little bit problematic but there is an easy work around. The encryption process will [...]
If you ever need to create a custom field to save data against a customer in Magento you will probably need to create a custom attribute. Creating the attribute is easy, in your modules install script you do: PLAIN TEXT PHP: <?php $installer = $this; $installer->startSetup(); $installer->addAttribute('customer', 'my_custom_attribute', array('type'=>'text')); $installer->endSetup(); Then on the customer object [...]
I do a lot front end development with Magento, and one of the biggest time sinks for this is waiting for a page to load when you want to change a line of CSS. Whilst you can use Firebug / Chrome to edit CSS rules on the page, you still need check that the file [...]
Virtualbox is an amazing tool for testing and developing on various systems. Now it's even easier as there is a nicely organised repository of clean VirtualBox images you can download and get running with in a matter of minutes. http://virtualboxes.org/ We are going to use them for some Magento performance optimisation testing on various platforms [...]