Skip to content

Quickly create colour themes for Products, Categories and CMS pages in Magento…

It doesn’t seem to matter whether we’re working as a freelance web developer for companies in Bath, Bristol, Wiltshire or Timbuktu, at some point they will give us a design that has colour variations across groups of pages. Some pages will use purple to highlight text, other will be in orange, others will use a different font, variable width columns, the list goes on. So how can you deal with this without having utterly impenetrable CSS files?

In Magento* it’s easy enough! Simple add a snippet to the Layout Update XML.

<reference name="root">
    
<action method="addBodyClass"><className>purple</className></action>
</reference>

Essentially it just calls the method Mage_Page_Block_Html::addBodyClass() and slaps the className onto the <body> tag, letting you then create css selectors like .purple .someotherselector.

If you’re feeling really clever you could probably programmatically add a class derived from the value of a Product attribute, but that will have to wait for another day…

Looking for a friendly freelance Magento developer? Need some help getting your designs turned into working websites, cost effectively? Why not give us a call on 01380 830224 – we’d be delighted to help…

*I know, I know, not often you hear “Magento” and “easy” in the same sentance.

Posted in Magento, Web Design, Web Development | Tagged | Comments Off on Quickly create colour themes for Products, Categories and CMS pages in Magento…

Quickly find the id of all Magento categories..

When developing a Magento powered e-commerce, you will almost inevitably have to import product data from a spreadsheet provided by your customer. And you almost certainly will need to convert the text based Categories they’ve used in the spreadsheet into the entity_id Magento uses for categories. So first of all create all your required product categories. Then what? Yes, you can click into every category in the Magento admin and patiently write down every ID, but that’s boring right? So what to do?

Create a new .php file somewhere in the root folder and drop the following code in.

define('MAGENTO', realpath(dirname(__FILE__)));
require_once MAGENTO . '/app/Mage.php';
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$model = Mage::getModel('catalog/category');
$categories = $model->getCollection();
$categories->addAttributeToSelect('name');
foreach ($categories as $category) {
    print $category->getEntityId() . " " . $category->getName() . PHP_EOL;
}
Posted in Uncategorized | Comments Off on Quickly find the id of all Magento categories..

Cheap replacement for a Mac Superdrive

If you find that your Mac’s Superdrive has stopped working, or you’ve replaced your internal Superdrive to fit a solid-state hard drive and need a cheap way to get a working CD and DVD reader or recorder, your options are a bit limited.

However I’ve found these Samsung External USB DVD-Writers to be reliable, inexpensive and work with OS X 10.5, 10.6 and 10.7.

P.S. The only trouble you’ll have is getting it to work with Apple’s DVD Player application. However this hint worked for me beautifully.

Posted in Troubleshooting | Comments Off on Cheap replacement for a Mac Superdrive

Cheap Dell P and U series monitors as good as Apple Cinema displays

Whilst I’d love to be able to afford one of Apple’s 27″ Cinema Displays, the truth is they’re hugely expensive in comparison to a 22, 23 or 24″ quality display from Dell or Samsung. About 6 months ago I bought a Dell P2311H 23″ monitor and am ecstatic with it. LED backlit, tilt, swivel, rotate and crucially for me a height adjustable stand, it was brilliant value.

As of this moment there are some cracking deals at Amazon. Dell have two ranges that I recommend to my customers – the Dell Professional P monitors and Dell Ultrasharp U series. The main difference is the U series use an IPS panel, which offers slightly wider viewing angles. To be honest the difference isn’t that great, but if you can get a U series display for slightly more I would spend the extra money.

P.S. If you really want to splash out the Dell U2711 Ultrasharp 27″ Monitor is just as good as the Apple display, although obviously slightly less ‘sexy.’

Posted in Apple, Bargains | Comments Off on Cheap Dell P and U series monitors as good as Apple Cinema displays

How can I buy Microsoft Office 2011 for Mac cheap?

One of the questions I get asked a lot is “what’s the cheapest way to get Microsoft Office for Mac?” Whether you’re a Windows Switcher, a student or home user, chances are that at some point you’ll have to work on a Microsoft Word, Excel or Powerpoint document, and to do this you need Office for Mac (or iWork).

The short answer is if you’re a student or using it for non-business purposes get Microsoft Office Home and Student Edition. You can buy it with licences for one or three computers and it’ll cost around £70-85. Note that this version does not include Outlook, so if you need to connect to a Microsoft Exchange Server for email/contacts/calendar you need to buy a different licence.

If you intend to use Office for Mac for your business, or need Outlook to connect to a Microsoft Exchange Server, you’ll need to buy Microsoft Office Home and Business Edition. Again there are single or multiple licence versions available starting from around £165. Outlook 2011 for Mac is really really good. If you’ve suffered using Entourage with Exchange in the past you’ll absolutely love it.

The last option is to buy Apple’s iWork software instead. iWork lets you import and export Word, Excel and Powerpoint files and does a pretty good job. But make absolutely no mistake. It’s not Office. It looks nothing like it. If you need complete Mac/Windows transparency, don’t make the mistake of buying iWork. However if you need to open or create the occasional Work, Excel or Powerpoint compatible file it does a decent job.

Pages, the “Word Processing” part of iWork actually makes a pretty acceptable Desktop Publishing program and is much easier to use than Word in my opinion, but Numbers is frankly a poor “Spreadsheet” substitute for Excel. Keynote is absolutely brilliant, blowing Powerpoint completely away for creating beautiful Presentations.

Posted in Apple | Tagged | Comments Off on How can I buy Microsoft Office 2011 for Mac cheap?