Firefox 4 Release Today (we hope!) Mar 22, 2011 The long awaited Firefox 4 will hopefully be released today, with plenty of [new features][1] and support for HTML 5, CSS 3. I’m really hoping they haven’t rushed out the release to match the recent IE9 release, but the release candidate has been around for a while so lets hope that isn’t the case. I’ve been finding Firefox extremely slow for the last few months so I am glad to see they are bigging-up the performance improvements in this latest version. Online firefox html5 ie web
Guernsey Estate Agents Mar 22, 2011 I thought it would be useful to start putting together handy lists of services that are local to Guernsey or the Channel Islands and that are often hard to dig up. Guernsey Estate Agents seemed the obvious place to start since I have recently been involved with building a couple of estate agents websites. Martel Maides, Find and Fairmoves, as well as working for a while looking after the Sarnia Estate Agents site. Information estate agents guernsey guernsey
Magento: Limit the address fields to n characters Mar 21, 2011 There are a number of reasons you may want to do this – but primarily I think it is because your despatch system will likely be printing labels and if the lines are too long it won’t work properly. You could try dealing with the line lengths when you export but that leaves you with the messy situations of trying to work out where to put the bits of the address yo uhave chopped off. Development Development How To's Magento form forms html magento development
Magento: Retrieve the store name, inside a module Mar 17, 2011 I thought this would be simple usually that is my first mistake with Magento. As it transpires it really is simple for once but worth mentioning, if only so that when I need it again in six months time I have it written down somewhere. There are plenty of reasons you might want to do this, from turning functionality on or off within your module – or like in my case – using the store code as a prefix on order numbers. Development Development How To's Magento how-to magento development module php store tutorial
Padding a number with zero in PHP Mar 17, 2011 This really should be simpler than it is. Well, that isn’t entirely true because it really is simple – but it took me at least three google searches to find out how to do what I wanted, so I thought it was worth sharing. I first tried using str_pad and got nowhere but then found an example using sprintf. The following code will take a number ($raw) and prefix it with two zeros. Development Development How To's php sprintf
Magento: Display the store telephone number Mar 13, 2011 Displaying the store telephone number that you entered into the Magento Admin seems like it should be obvious but it took me ages to track down, here is how. In a template file you add the telephone number by calling getStoreConfig like this… <?php echo Mage::getStoreConfig('general/store_information/phone'); ?> But from within the CMS, it is much simpler – there is actually a link to insert it somewhere in the menu that Development Development How To's Magento layout magento development telephone template
Magento: fixing a broken pear.ini after migrating server Mar 10, 2011 When you copy files from one server to another the pear.ini file contains some hardcoded paths that need to be fixed. The file format is some kind of PHP serialisation. The file can be found in downloader/pearlib and you need to change ther paths manually, as well as the prefix numbers that indicate the lengths of the string. e.g. s:9:”some/path” would become s:14:”someother/path”. Development Development How To's Magento config fix magento development pear php
Custom translations file in Magento Feb 25, 2011 It is very helpful to create a single translation file for your magento template to include any words or phrases that you add to the basic templates. Simply create an empty module (create a folder under app/code/local/[yourcompany]/[yourmodule]) and then add a subfolder etc and create a config.xml which should contain the following. <?xml version="1.0" encoding="utf-8"?> <config> <modules> <translations> <version>1.0.0</version> </translations> </modules> <frontend> <translate> <modules> <translations> <files> <default>swn_translations.csv</default> </files> </translations> </modules> </translate> </frontend> <adminhtml> <translate> <modules> <translations> <files> <default>swn_translations.csv</default> </files> </translations> </modules> </translate> </adminhtml> </config> Make sure your module is enabled (see [Creating your own module][1]). Development Development How To's Magento csv magento development multi-language translations web development
Magento Multi Language, Currency & Region Setup Feb 22, 2011 Several options here depending on exactly what you need. Currency can be handled at website, Store or Store level and if multiple currencies are set “as allowed” then the currency changer will show up. By default this appears in the left sidebar and is added in using the directory layout file (why directory?). To move this to the header, comment out the directory bit and move it to the page layout file – inside the header block. Development Development How To's Magento magento development multi-currency multi-region muti-language php tutorial web development
Read URL parameters inside Magento (for tracking) Feb 19, 2011 You likely want to be able to pass some tracking information about the visitors to your Magento site through to your back-end systems. I usually implement tracking using the same method as Google Analytics, just for convenience. Also, there is a ready-made [URL Builder][1] for clients non-google campaigns. This sends tracking data through to the site but you need a custom module to read those parameters and store them in a cookie. Development Development How To's Magento event google magento development php tags tracking