It has been a legal requirement for UK websites to be accessible since 1999. All websites are expected to make ‘reasonable adjustments’ to ensure their websites accommodate all users, regardless of ability or disability. It’s estimated that at any one moment, 20% of online users are disabled in some way. This may be a temporary disability, such as a broken wrist, or a permanent disability, such as visual impairment. Just because someone is registered as blind, it doesn’t mean they can’t still see but perhaps needs to rely on a screen reader to help them with text on a website. If your website is not developed to respect this possibility then you are stopping this visitor from using your site, potentially losing a customer and every friend and family member that customer knows. Not to mention, they can make a claim against you and you could be liable to pay out compensation and be forced by a court of law to either remove or change your website.

Accessibility and Search Engine Optimisation (SEO)

Search engine spiders are programs written and ‘sent out’ by Search Engines such as Yahoo to read and index your website into their search database. These spiders can be considered blind and deaf as they cannot read the contents of an image or a flash animation at present. Therefore by ensuring your website passes accessibility for the visually impaired and hard of hearing visitors, you ensure that the search engine spider gets the same information. This improves the exposure of your website to the spiders and will often improve the potential ranking and visitors via the search engines.

We offer two eBooks for sale which can give guidance and code on how to help you improve the accessibility and SEO of your osCommerce site.

 

Today I suddenly realised the client had asked for a Site Map when of course osCommerce doesn’t come with one. A quick search on the osCommerce site and I came across Dynamic Sitemap. This is perfect for the job. I added it on within about 10 minutes and then ran through the configuration of the page. You get a page under the Tools section of the admin to allow you to choose who sees the pages within the sitemap, whether they’re not shown at all (such as the Checkout Success page) or whether they’re just shown to account holders (eg. the Lost Password page). The sitemap is printed out in two lists, one of the various pages available, all of your static pages plus the various cart pages, along with a list of all of the product categories. The anchor text for each page is pulled from the Header title defined under the languages/your-language directory eg. languages/english. All files within the directory are read and offered for the Site Map, and as they’re read every time, any new pages will automatically be picked up.

This is a pretty good way to get your site well indexed within the search engines. It gives them a page which isn’t using a dynamic URL (ie. a URL with a question mark and extra variables in) which they have more trust in. Then the search engine spiders will follow these links and get deeper into your site, indexing the category pages thus giving you more scope within the search engines.

Very easy to set up and a great feature to have.

 

After a few days of business meetings we’ve finally managed to get the page content online into the new site. This is where osCommerce falls down in my opinion. When I first looked at osCommerce I was slightly puzzled about how to update site content and then after rereading the front page on the default installation I realised that you had to physically open the language files and update the text in there, then of course FTP it to your server – which of course most normal (ie. non web design/developer people) have any knowledge of. Yet these are the people who are commissioning us to set their sites up.

One of my clients asked me to set up a links page and a customer’s testimonials page for her, and set it up so she could add to it. Rather than making her have to trawl through the pages themselves I’ve set up a couple of simple text files using basic code such as paragraph tags, bold (strong) tags etc. For the links I’ve had her list them out in a consistent way and then I use PHP to retrieve the link and text and then link it all in a specific way. However to update these files she has to do them directly online via cPanel (as she didn’t have a clue when I mentioned FTP!). This is of course a major inconvenience to both my client and plenty of other people out there who are not used to trawling through code to find where to update the page text, let alone adding HTML markup!

Anyhow, for us it’s straightforward. A couple of tips I do have when adding page content and creating new pages as well is to also ensure each page has a unique title and uses heading tags and good markup. Whilst the bulk of osCommerce markup is pretty heavy going and tables upon tables, if the content you can easily change and control is as good as possible then you’ve given yourself a little edge you may not have had otherwise.

So what to do? To update the default informational pages and to create further ones (simply copy say the about_us.php file and save it with a new filename), open up one of the files eg. about_us.php. Now the most important part of a web page is the page title, and osCommerce doesn’t really go in for unqiue titles per page (unfortunately), however there’s an easy way around this. On the page go down to the title tag where you’ll see

<title><?php echo TITLE; ?></title>

The TITLE being printed out is the standard title set in the language file, usually the name of your company or store. Of course we should still keep this in the title to give the site consistency and make it clear to visitors which site they’re on. So to edit this simply add in some unique content, a good key phrase that relates to the page before the PHP statement eg.

<title>About Joe Bloggs and Sons, Suppliers of Fine Wines to the UK | <?php echo TITLE; ?></title>

For example…! Okay I appreciate that most pages can’t have a good title but something more than just the store name will be an improvement.

As for your page content, in the PHP page scroll a bit further down you’ll find the page heading ‘About Us’. This will usually be found looking similar to

<td class="pageHeading">About Us</td>

Put this into a header tag. Headers are considered more important on a page than bog standard page text which is what the above is considered as. So to change this simply do the following:

<td><h1 class="pageHeading">About Us</h1></td>

So the header is still in the table cell, and using the same CSS class but is now wrapped by a header tag as well, giving it more importance on the page. Of course with your own text if you feel you can warrant a second heading, use a h2 tag to wrap this header.

I’ll go into detail how to get a unique title for each category and product page another time. It’s a touch more complicated with hacking the PHP, but the results are great for your site!

 

The template we’ve had to buy for the new store needed a few button alterations – not a problem. However on opening the header file up I noticed that the logo and all of the buttons were missing alt attributes. Simply put, turn off the images and the navigation and you’re left with nothing – that’s what a screen reader user will also get – nothing.

This isn’t due to osCommerce but more the template. Despite the template being a nice look and design, it’s not been marked up very well. Luckily there aren’t too many images in use and they’re in includes so it only means updating the odd file here and there. However when it comes to using templates it’s something to consider. Alt attributes are required for accessibility and also good SEO (Search Engine Optimisation). osCommerce stores can sometimes have a tough time getting into search engines as it is, leaving out alt attributes doesn’t help things.

 

I’ve set this blog up to write up the progress and information I come across whilst setting up a new store and also updating other stores for clients. I’m relatively new to using osCommerce so I’m not a hardcore expert but more of a native PHP user trying to learn the interface and look for contributions before hacking the code to pieces!

I have a few clients running osCommerce sites and am being asked to set up new sites as well. It’s a different challenge from the norm and despite finding annoyances with osCommerce I’m also enjoying using something different and learning new things.

So I’ll be starting off with the updates I’ve made to one clients site, helpful titbits I’ve done along the way, and also the new site we’re setting up as well, using a prebuilt template from the Templates section.

© 2011 osCommerce Templates Suffusion theme by Sayontan Sinha