Old post : http://forum.opencart.com/viewtopic.php?f=24&t=4853 (for version 1.2.9)
http://forum.opencart.com/viewtopic.php?f=24&t=5146 ( for version 1.3.0 )
Because I'm newbie join forum
If you use verion 1.2.9, If your cart very large, you will wait longtime for update all product and category... ( because rebuild alias url )
At version 1.3.0 or newer...
Very easy, you download attachment and work... I has been test with version 1.3.2 ( no test verion other )
My test at url http://www.webcongty.net/shop.uhm.vn
Sorry, i'm type wrong folder at readme.txt ---> patch to /admin/model/catelog/
website: www.webcongty.net
IT Manager / Linux / MAC / Windows
Web Developments with PHP & MySQL
Webmaster / Search Engine Optimization
Does this hack requires mod_rewrite enabled on my server?
The reason i'm asking is that i do not have this option avalible on my server.
I've tried following your instructions with newest version of opencart but when i create a new product on my site dinlydbog.dk (the first product called "SEO TEST") i get an error when i click it.
Would you mind if I used your code as a starting to point to create an actual admin tool to generate SEO friendly URLs? Thanks!crazydog2401 wrote:Apologize in topic Previous
Old post : http://forum.opencart.com/viewtopic.php?f=24&t=4853 (for version 1.2.9)
http://forum.opencart.com/viewtopic.php?f=24&t=5146 ( for version 1.3.0 )
Because I'm newbie join forum
If you use verion 1.2.9, If your cart very large, you will wait longtime for update all product and category... ( because rebuild alias url )
At version 1.3.0 or newer...
Very easy, you download attachment and work... I has been test with version 1.3.2 ( no test verion other )
My test at url http://www.webcongty.net/shop.uhm.vn
Sorry, i'm type wrong folder at readme.txt ---> patch to /admin/model/catelog/
Your server must support mod_rewrite....Lasse wrote:Hi crazydog
Does this hack requires mod_rewrite enabled on my server?
The reason i'm asking is that i do not have this option avalible on my server.
I've tried following your instructions with newest version of opencart but when i create a new product on my site dinlydbog.dk (the first product called "SEO TEST") i get an error when i click it.
website: www.webcongty.net
IT Manager / Linux / MAC / Windows
Web Developments with PHP & MySQL
Webmaster / Search Engine Optimization
Buy UK Online Free Shipping Rolling Laptop Desk Buy UK Online Over Bed Table
Nevermind, I'm a d-bag. I read the installation again and I see it right there where I looked and didn't pay attention. CategoryNAME or ProductNAME, and ID + ".html" . I guess that makes sense since you can have categories and products with the same name.jgitchel wrote:Thank you by-the-way, and this is great. I have added this in version 1.3.3 and it seems to work well. Is there any bit of code though that can be changed to remove the id tag from the URL? Ex. I made a category named "this is a test" and the url shows this-is-a-test-37.html, 37 being the id number that would normally show without seo url turned on (id=37).
At version 1.3.3, You can remove ID + ".html" CategoryName
Code: Select all
// Fix update with CategoryName
$data['keyword'] = seourlsanitize($data['category_description'][1]['name']);
http://www.webcongty.net/shop.uhm.vn <-- I has been test with version 1.3.3
website: www.webcongty.net
IT Manager / Linux / MAC / Windows
Web Developments with PHP & MySQL
Webmaster / Search Engine Optimization
Matt
Code: Select all
It was like that when I found it, honest!
easy to implement, doesn't involve messing with the database structure and doesn't require huge modifications at all.
done and done
rocksteady,
danno~
Yes, something like that would be fab if it could be added to a release, woudl help make it more 'Matt-Proof'dannowatts wrote:i just wrote a quick javascript snippet so that whatever is typed for the product name, that auto-fills the SEO keyword field. Then if for whatever reason i am wanting to add/edit the SEO keyword to something other than the one auto entered, i can still edit it.
easy to implement, doesn't involve messing with the database structure and doesn't require huge modifications at all.
done and done
rocksteady,
danno~
Could you post the javascript?
Matt
Code: Select all
It was like that when I found it, honest!
Step 1:moggiex wrote:Yes, something like that would be fab if it could be added to a release, woudl help make it more 'Matt-Proof'dannowatts wrote:i just wrote a quick javascript snippet so that whatever is typed for the product name, that auto-fills the SEO keyword field. Then if for whatever reason i am wanting to add/edit the SEO keyword to something other than the one auto entered, i can still edit it.
easy to implement, doesn't involve messing with the database structure and doesn't require huge modifications at all.
done and done
rocksteady,
danno~
Could you post the javascript?
Matt
attached is a .zip file with the file slugCreator.js ( inside the folder slugCreator ).
place the folder ( with the containing .js file ) inside this directory:
admin/view/javascript/
Step 2 :
open up the product_form.tpl
located at , admin/view/template/catalog/
2a
Find
Code: Select all
<div id="tab_general" class="page">
<table class="form">
<?php foreach ($languages as $language) { ?>
Code: Select all
<script type="text/javascript" src="view/javascript/slugCreator/slugCreator.js"></script>
2b
and 2 lines below where you just added that , look for:
Code: Select all
<td><input type="text" name="product_description[<?php echo $language['language_id']; ?>][name]" value="<?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['name'] : ''; ?>" />
Code: Select all
<td><input type="text" name="product_description[<?php echo $language['language_id']; ?>][name]" value="<?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['name'] : ''; ?>"
onBlur="productName_to_postslug('productForm', 'product_description[<?php echo $language['language_id']; ?>][name]', 'keyword')"
/>
and you're done.
BAM!
enjoy
rocksteady,
danno~
Attachments
I think has a problem if I have categories and products with the same name.
website: www.webcongty.net
IT Manager / Linux / MAC / Windows
Web Developments with PHP & MySQL
Webmaster / Search Engine Optimization
Users browsing this forum: No registered users and 93 guests