Shimon Sandler

Opencart SEO

Opencart SEO Not too long ago, I decided to build an ecommerce site using the latest version of OpenCart. Opencart is open source ecommerce software. It’s like WordPress for ecommerce.

This post is about some very basic SEO modifications I did to make Opencart optimized… in a very basic way.

If you want to see it, the site is: Sandler Jewels.

SandlerJewels has a huge database of over 5000 products. The database syncs with the manufacturers databases, and updates automatically using a script every day at 5:30am. The update is complete by 6am.

URL STRUCTURE:
The first thing I noticed was that the URLs were not optimized. I wanted the URL structure to look like this: www.sandlerjewels.com/category/subcategory/product-name

Fortunately, Opencart makes it very easy to insert keywords into your URLs. Go into the Settings, and select Server. Enable SEO URLs:
SEO-URLs

This allows you to change the URLs on a per page basis.

HTACCESS file:
Don’t forget to rename your .htaccess.txt file to .htaccess by removing the .txt file extension. This is a critical step.

Use your FTP software ( I use CuteFTP) to go into your OpenCart folder on the server. You will find a file named .htaccess.txt. Rename this file by removing the file extension, so that it becomes .htaccess.

CUSTOMIZING URLs:

Then to change your URLs on a per page basis, you’ll need to go to the CATALOG–>PRODUCTS section, and select the DATA tab:
SEO-keyword

Scroll down the page until you see the SEO KEYWORD Field:
SEO Keyword field

Another way to customize the Title Tags is by doing a small amount of coding to control the TITLE TAGS by using the Meta Keywords field. Here’s how:

Using my FTP Manager (Cuteftp), I went into this file:
/catalog/view/theme/YOURTHEME/template/common/header.tpl

REPLACE:
< ?php echo $title; ?>
WITH:
< ?php if ($keywords) { echo $keywords; } else { echo $title; } ?>

CANONICAL HOMEPAGE URL:
Another SEO modification needed was to ensure that the Homepage canonical URL was used on all the page elements. For example, I noticed it was different in various places. Here are some of the variations I encountered:
www.sandlerjewels.com/
www.sandlerjewels.com/index.php
www.sandlerjewels.com/index.php?route=common/home

One way to solve this is to add the following code at the top of the .htaccess file :

Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.mysite.com/$1 [R=301,L]

From now on, any requests made to index.php, should result in a redirect to the home page, www.mysite.com. Insert your actual homepage URL for where I have “www.mysite.com”.

REMOVING the “Powered by Opencart” FOOTER LINK:
By default, Opencart will insert a hyperlink on the Footer to www.opencart.com that says, “Powered by Opencart”. If you’d like to remove or revise that, then use your FTP Manager, and go to this file on the server: /html/catalog/view/theme/default/template/common/footer

The code on that file for the footer is:

< ?php echo $powered; ?>


You can just delete that line of code, and that will remove the footer link.

OPTIMIZING PAGINATION:
Finally, you’ll want to make the Pagination SEO friendly using Google recommendation of implementing the Rel=prev, Rel=next.

Be Sociable, Share!

Comments

  1. Thanks for this great post Shimon. I made some of these changes to my new website: http://www.ewholesalecarpets.com

  2. Thanks for the tips.. it seems so easy but getting up there in the first page of searches takes time to master.

  3. Hey Shimon,
    It seems it’s a good articles for a less SEO friendly eCommerce platform. Canonical Link is the one I learned from your article. I’m doing a project for a client with OpenCart and finally your post donated some of your knolwedge to serve my client well! ;)

    Best Wishes,
    Shyam Chathuranga.

  4. Hi Shimon,

    Thanks for the great tips!

    I would like to ask about the CANONICAL HOMEPAGE URL. I have pasted the code in my htaccess. file. However, I still see the link ‘http://kulergrip.com/?route=common/home’ when I go back to the homepage from the product page. The code is as follows:

    Options +FollowSymLinks
    RewriteCond %{THE_REQUEST} ^.*/index.php
    RewriteRule (.*)index.php$ http://kulergrip.com/$1 [R=301,L]

    May I know what have gone wrong, please?

    Thanks,
    Kenn

  5. R Rogerson says:

    Sorry to disappoint you, but setting up .htaccess rules is only part of the battle (and is technically the “clean up” part at that).
    1) You should fix the incorrect links as well, so only a single URL is referenced.
    2) You should deploy the Canonical Link Element (helps avoid uncaught, new and/or odd URL parameter issues).
    3) … Then you setup .htaccess to correct any pre-crawled/linked to URL variants (and point to the Canonical URL instead).

    You mention the pager … and miss the fact that one of the most common causes of non-canonical URLs is pagination and the first page. I don’t think I’ve seen a system yet (including OpenCart) that gets this right.
    You have multiple pages, you view the 2nd/3rd/4th page … you click back to the first page (either with the [start] or the [previous] or the [1] links), and bam! The URL now has “&page=1″ in it (where as the default for that page lacks the Page paramter and value pair).
    Same/Similar/Related issues occur with things like Sort, NumItems etc.
    Canonical URLs can help to some extent, but again – fixing the root of the problem is best.

Speak Your Mind

*

*