Posted on: 10th Mar 2010
By: Rob
Just a very short note about building sites and thinking about domains.
When building a new e-commerce website it is important to understand that you do not necessarily need to build the site on a live domain. Even though Magento can look big and cumbersome it really is no bother migrating the site after it has been built.
Like all good internet programs (like wordpress for example), magento uses a baseurl feature – where all links/permalinks etc are built off a single (alt. a secure url too) url which can be changed at any time.
Therefore if one of your clients already has an old online shop that they do not want transferring until the new shop is absolutely perfect (and they also want to minimize downtime) then best practice might be to build your new site on a test domain or even simply a unique i.p. – then once complete and working you can DNS the old domain to this new IP and simply change the baseURL in the database.
Posted on: 8th Mar 2010
By: Adam
Something that may irritate many Magento developers is the way that product images on both the product list and product view pages show white backgrounds when the image doesn’t fit the standard ratio. Rather than there being a simple way to change this in the configuration area, it’s up to us to find it by once again digging deep into the lower echelons of Magento’s core code. This time you need to open the file at the following path, *deep breath* :
app > code > core > Mage > Catalog > Model > Product > Image.php
There’s a line of code in there which is fairly self-explanatory:
protected $_backgroundColor = array(255, 255, 255);
The nine-digit RGB code determines which colour is shown by default in the product image backgrounds, and 255, 255, 255 is simply white, or #FFF. Using the eyedropper tool in a program like Photoshop is a good way of getting the RGB code for the colour that you require. Simply replace the numbers with the ones you require and upload. Job Done.
Before:

After:

Posted on: 5th Mar 2010
By: Adam
A short and simple post from me today, but something that beginner Magento developers might want to know – how to echo individual product attributes on the product view.phtml page. It’s one of those things that you’ll probably want to do at some point, but you don’t know quite where to look.
First create an attribute, which you’d name accordingly. In this example, a pen has attribute ‘pen_colour’.
On app/design/frontend/base/yourtheme/catalog/product/view.phtml add the following code somewhere within the main conditional statement:
<?php echo $_product->getAttributeText('pen_colour') ?>
If you want to echo the same thing on the product listing page, simply add this similar code to the following file: On app/design/frontend/base/yourtheme/catalog/product/list.phtml within each conditional statement:
<?php echo $_product->getResource()->getAttribute('pen_colour')->getFrontend()->getValue($_product) ?>
You also need to ensure that in the attribute settings:
Visible on Product View Page on Front-end is set to ‘Yes’
Used in product listing is set to ‘Yes’
Now you should be able to see attributes echoed onto that pages, separate from the ‘Additional Information’ tab where they normally reside.
Posted on: 1st Mar 2010
By: Adam
Magento 1.4.0.1 has now been out for several weeks, something that has been bugging me is the lack of instruction regarding the new Modern Theme layout. It now uses far less files and in fact relies more towards files located in the base package rather than default package as before. The files now included in the template file of the Modern Theme are:
- catalog
- catalogsearch
- checkout
- newsletter
- page
- sample
If you’re used to installing the Modern Theme using Magento Connect Manager and seeing it working straight away, you’re gonna be a bit annoyed that it’s not that simple anymore. As Magento decided to give absolutely no instruction into how this theme now needs to be installed, the Magento Blog can show you how to get it working as usual:
1. The files are pre-installed with Magento 1.4.0.0+, so you simply need to copy (or cut) the ‘modern’ folder from app/design/frontend/default and paste into app/design/frontend/base.
2. In the same way, you need to copy the ‘modern’ styles from default to base. Copy the ‘modern’ folder from skin/frontend/default and paste into skin/frontend/base.
3. Now that the files are located correctly on the server, you can call them to action from the admin section. Go to System > Configuration > Design, then change the package name to ‘base’ and the default theme to ‘modern’ as shown below.

You may need to refresh the cache to see the effect of the changes, but this should provide you with a working version of the Modern Theme on your store frontend.
Posted on: 26th Feb 2010
By: Adam
For e-commerce web designers who want to set up their own Magento website, it is worth noting that the choice of domain name should be considered very carefully. We all know that for SEO purposes a keyword-rich domain name is beneficial, but Varien makes it very clear in their License terms that you may not use the word Magento in a domain name, or you can risk legal action.
In the footer of the official Magento website, there’s a link to Varien’s license agreement, something which is very easy to miss but is clearly stated. You can read Varien’s License agreement here: http://www.magentocommerce.com/license/
The parts that I am referring to say the following:
Can I use the “Magento” trademark in one of my domain names or URLs?
No. You may not use the Magento trademark or any other mark associated with the Magento offering from our company in your domain name or URL. (For instance “www.magentohosting.com” is not allowed. See more on this topic below.)
If I can’t use the “Magento” trademarks, how can I market my own goods or services to the community?
Varien is committed to helping build an effective Magento community. We welcome business partnerships with companies around the world. You are free, under OSL 3.0, to market any of your goods or services relating to Magento software-as long as you don’t refer to those goods or services as “Magento” or confuse our trademarks and service marks with your own.
A summary of appropriate and inappropriate uses of the Magento trademarks
By law and to provide clarity for the greater Magento community, we ensure that the uses of the Magento trademarks (including our name and logos) are subject to the following “fair use” guidelines. We enforce our trademark rights around the world.
Basically, the terms are spelled out very clearly and should not be ignored. Certainly it’s very tempting to get a keyword-rich domain name while they’re available. With the following that Magento has gained over recent years, it’s easy to see why these domains would increase in value. I would suggest that you do not run the risk of being caught out by Varien and choose a domain name that doesn’t feature the word ‘Magento’. Even for sites where you’re merely testing out Magento customizations, I would avoid this completely and keep yourself out of any complications.