Automatic OpenCart 1.5 SEO Friendly URL Creation

Post 39 of 80

This is how you have Automatic OpenCart 1.5 SEO Friendly URL Creation.

It’s a dead easy cool fix


Paste Just Before: </head>

<script type="text/javascript">// <![CDATA[
// Auto SEO URL by
var keyword = $("input[name=keyword]").val();
var text = $(this).val();
text = text.toLowerCase();
text = text.replace(/[^a-zA-Z0-9]+/g,'_');
// ]]></script>

Save, Upload – Job Done :)

This will make the SEO from your Product Name!

This mod is tested on OpenCart version(s): 1.5.0,,,,,


Also, if you’re looking for a SEO Company that have experience with opencart then contact Ltd, mention this website for a good price!

Or for a quick quote contact: and we will discuss your OpenCart SEO Needs!

, , , , , , , ,

Advertise Here


Saad AhmedJuly 28, 2011 at 9:34 amReply

This didnt work on my site. im running 1.5

AdamJuly 29, 2011 at 5:00 pmReply

Saad, Make sure you’ve edited the correct files, it works on all known versions of opencart 1.5, it’s just simple jQuery!

nilopcAugust 21, 2011 at 5:47 amReply

Thanks! This came in handy.

antics83August 22, 2011 at 3:22 amReply

Find? and paste where? Thanks!

AdamAugust 23, 2011 at 3:03 pmReply

@Antics83, Should be just before </head> -Seems wordpress doesn’t like that even whilst being wrapped in code, sigh!

MartinOctober 13, 2011 at 2:41 pmReply

Do i need edit only public_html/admin/view/template/common/header.tpl for seo ? or in catalog folder too ? because it is not working for me:)

b3lliNovember 3, 2011 at 4:32 pmReply

nice one :) works fine

NurbekFebruary 18, 2012 at 5:05 pmReply

Sorry. It doesnt work. Please describe correctly.

AdamFebruary 23, 2012 at 1:19 pmReply

This works flawlessly on all 1.5 versions of OpenCart.

In the wise words of internet memes “Your Doing it Wrong!”

SubashApril 3, 2012 at 2:45 pmReply

Clearly explained and works like that…but I wanted to use SEO friendly URLs for all menus like Home, Account, Logout, Information and other links so I worked around a little bit and got that working…if you want that you may find it here

JackLloyd.May 23, 2012 at 10:12 amReply

Will this work on

AdamJune 2, 2012 at 1:43 pmReply

Not sure mate, if the admin boxes are named the same in the code then it should do!

CristianJuly 28, 2012 at 3:42 pmReply

Hi Adam,
I’m using this script also to take a number in a custom field in product form and add taxes (21%) and vice versa from orginal field with no taxes. So if i’ve a price already with taxes, i write in my custom field, and it give the value with no taxes at the original field in oc, so when i save the product the price is perfect. But this isn’t the problem. The problem is that i’ve added other 2 field in the top bar to calculate taxes and no taxes price of all number i want. I’ve named it CONIVA and SENZAIVA. The problem is that when i write something in both these field, also the original field take the value.This is a big problem to fix for me, cause im only a noob in javascript and don’t know how to fix this xD. My javacript are this (ONLY in pastebin ive deleted your copyright url, because it takes to much spaces, in my shop are intact in the code :-))

sorry for last comments, i didn’t know code was disabled

sieu thi haproAugust 10, 2012 at 4:23 pmReply

Will this work on 1.5.3 ?

MasettiOctober 11, 2012 at 9:03 amReply

Its not working on

OzymandianMarch 17, 2013 at 12:16 pmReply

I was write my module for generating SEO url for products.
It must work on Open Cart 1.5.3-1.5.5.
It generate the unique url for all products.
The link for testing

RenatoSeptember 17, 2013 at 5:32 pmReply

tested on 1.5.6 and it works! Remember to modify product description and save it. Also you have to enable friendly url at your store.

priynakaNovember 4, 2014 at 8:28 amReply

Will it work for informaton like “contact us, my account” etc. ???

Advertise Here