1. Home
  2. Prices
  3. Guided Tour
  4. New Shop
  5. Shop Review
  6. Ecommerce Marketing
  7. Portfolio
  8. Blog
  9. Contact
Ecommerce Fox

Ecommerce Web Design & Magento Blog

Welcome to our blog, this where you'll find news, reviews and tutorials on all things ecommerce and Magento. If you like what you see, join in with the discussion and be sure to subscribe.

Archive

Author Archive

Change Image Background Colour

Posted on: 8th Mar 2010 By: Adam No Comments

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:

Categories: Magento Tags:

Echo Product Attributes

Posted on: 5th Mar 2010 By: Adam No Comments

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.

Categories: Magento Tags:

Implementing The New Modern Theme

Posted on: 1st Mar 2010 By: Adam No Comments

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.

Categories: Magento Tags:

Magento Domain Name Infringement

Posted on: 26th Feb 2010 By: Adam No Comments

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.

Categories: Magento Tags:

Magento Server Check

Posted on: 23rd Feb 2010 By: Adam No Comments

If you’re wondering if your current web server supports a Magento Site, there’s a PHP script you can run which tells you exactly what requirements your server meets and doesn’t meet. Thanks to folks from the official Magento forum, you can find out within seconds, and without looking at your phpinfo(); data. In brief, it scans you php.ini file and various other settings and prints out the results in a simple-as-you-like list.

The code is below. Just paste into a .php file and upload to your server.

<?
extension_check(array(
'curl',
'dom',
'gd',
'hash',
'iconv',
'mcrypt',
'pcre',
'pdo',
'pdo_mysql',
'simplexml'
));

function extension_check($extensions) {
$fail = '';
$pass = '';

if(version_compare(phpversion(), '5.2.0', '<')) {
$fail .= '<li>You need<strong> PHP 5.2.0</strong> (or greater)</li>';
}
else {
$pass .='<li>You have<strong> PHP 5.2.0</strong> (or greater)</li>';
}

if(!ini_get('safe_mode')) {
$pass .='<li>Safe Mode is <strong>off</strong></li>';
preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version);

if(version_compare($version[0], '4.1.20', '<')) {
$fail .= '<li>You need<strong> MySQL 4.1.20</strong> (or greater)</li>';
}
else {
$pass .='<li>You have<strong> MySQL 4.1.20</strong> (or greater)</li>';
}
}
else { $fail .= '<li>Safe Mode is <strong>on</strong></li>';  }

foreach($extensions as $extension) {
if(!extension_loaded($extension)) {
$fail .= '<li> You are missing the <strong>'.$extension.'</strong> extension</li>';
}
else{    $pass .= '<li>You have the <strong>'.$extension.'</strong> extension</li>';
}
}

if($fail) {
echo '<p><strong>Your server does not meet the following requirements in order to install Magento.</strong>';
echo '<br>The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:';
echo '<ul>'.$fail.'</ul></p>';
echo 'The following requirements were successfully met:';
echo '<ul>'.$pass.'</ul>';
} else {
echo '<p><strong>Congratulations!</strong> Your server meets the requirements for Magento.</p>';
echo '<ul>'.$pass.'</ul>';

}
}
?>

If successful, you should see this:

Categories: Magento Tags: