This is how you have Automatic OpenCart 1.5 SEO Friendly URL Creation.
It’s a dead easy cool fix
Open:
public_html/admin/view/template/common/header.tpl
Find
Paste Just Before: </head>
<script type="text/javascript">// <![CDATA[
$(document).ready(function(){
// Auto SEO URL by ItsAdam.co.uk
var keyword = $("input[name=keyword]").val();
if(!keyword){
$("input[name*='_description']").keyup(function(){
var text = $(this).val();
text = text.toLowerCase();
text = text.replace(/[^a-zA-Z0-9]+/g,'_');
$("input[name=keyword]").val(text);
});}})
// ]]></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, 1.5.0.1, 1.5.0.2, 1.5.0.3, 1.5.0.4, 1.5.0.5
Enjoy!
Also, if you’re looking for a SEO Company that have experience with opencart then contact Dijitul.com Ltd, mention this website for a good price!
Or for a quick quote contact: seo@itsadam.co.uk and we will discuss your OpenCart SEO Needs!
15 comments:
This didnt work on my site. im running 1.5
Saad, Make sure you’ve edited the correct files, it works on all known versions of opencart 1.5, it’s just simple jQuery!
Thanks! This came in handy.
Find? and paste where? Thanks!
@Antics83, Should be just before </head> -Seems wordpress doesn’t like that even whilst being wrapped in code, sigh!
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:)
nice one
works fine
Sorry. It doesnt work. Please describe correctly.
This works flawlessly on all 1.5 versions of OpenCart.
In the wise words of internet memes “Your Doing it Wrong!”
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
Will this work on 1.4.9.4?
Not sure mate, if the admin boxes are named the same in the code then it should do!
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
http://pastebin.com/E7YFEiyE
Will this work on 1.5.3 ?
Its not working on 1.5.2.1