I want to make SEO friendly tag URL in magento.
Currently it is abc.com/tag/product/list/tagId/17/
but i want to make it abc.com/tag/xyz
I tried this by using "URL rewrite management" but it is not working.
Please help.
I want to make SEO friendly tag URL in magento.
Currently it is abc.com/tag/product/list/tagId/17/
but i want to make it abc.com/tag/xyz
I tried this by using "URL rewrite management" but it is not working.
Please help.
Im using Magento 1.8.1 and tried the Marius's solution but I had one problem: 2+ keyword tags (with a space between words) was going to 404 page and the spaces in url were changed to %20. One keyword tag is working like a charm!
So, I modified his module to show a spaced word on Tag Module and 'hyphenized' in the URL.
File: Easylife/Tag/Model/Tag.php
File: Easylife/Tag/Controller/Router.php
Its working for me now.
Best regards and thanks for the module Marius!
First I want to say that this is a nice question. Got me all fired up.
It works with the url management but it's kind of a drag. To much work.
For example I added this in the url management.
Saved. now when calling
ROOT/tag/camera
I see the prodcts tagged with 'camera'.But for sure this is not the way to go. if you have more than 10 tags you get bored.
So the idea is to make a module that will make magento recognize tags like
tag/something
and will change the links for tags to the same format above, so you won't have to edit a lot of templates.I named the module
Easylife_Tag
. You need for it the following files.app/etc/modules/Easylife_Tag.xml
- the declaration fileapp/code/local/Easylife/Tag/etc/config.xml
- the configuration fileapp/code/local/Easylife/Tag/Model/Tag.php
- the rewritten tag modelapp/code/local/Easylife/Tag/Model/Resource/Tag.php
- rewritten tag resource modelapp/code/local/Easylife/Tag/Controller/Router.php
- the custom router - see comments inlineThat's it. Clear the cache and give it a go.
[EDIT].
You can find the full extension here. The only difference is that it uses the
community
code pool instead of local as described above.