VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: paulmason411 on June 27, 2011, 17:03:02 pm

Title: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on June 27, 2011, 17:03:02 pm
Hi Guys,

I've just written and released a router.php file for VirtueMart SEF URL's. You can download it and get a better explanation here:

http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart

Please leave a comment if you have and feedback.

Cheers,
Paul
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: AH on June 28, 2011, 21:00:51 pm
Please could you think about adding the product id to the end of the url

This would then achieve uniqueness for items that have the same description
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on June 29, 2011, 16:55:17 pm
is this only for apache servers? what about lighttd servers? i have use your rooter.php but my links are still not sef
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Habbakuk on June 30, 2011, 06:42:33 am
I've written my own router.php files before, wanting to create better SEO links for Virtuemart, and I've always used /product_id or /category_id, instead of just the category or product name. There are also other free SEF router files available online.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: VM_Fans on June 30, 2011, 13:05:58 pm
Just to overwrite the old file?
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on July 02, 2011, 07:17:34 am
Please could you think about adding the product id to the end of the url

This would then achieve uniqueness for items that have the same description

Thanks Hutson, I could add the id's in. I'll look into this.

is this only for apache servers? what about lighttd servers? i have use your rooter.php but my links are still not sef

This was written the same way as the core Joomla components, so I'm not sure if Joomla SEF works with lighttd but if so it should work.

I've written my own router.php files before, wanting to create better SEO links for Virtuemart, and I've always used /product_id or /category_id, instead of just the category or product name. There are also other free SEF router files available online.

Using an id for the URL isn't a SEF URL. Google looks at the url for keywords, so that is why you need the category and product name. Also it makes it more readable for people who bookmark, & refer the link.

Just to overwrite the old file?

I don't think VirtueMart have a router file in their standard installation but if you have added one in then it's probably best to rename the current router.php file to router_bak.php then copy it in, test it and if you are happy with the results delete the router_bak.php.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: PRO on July 02, 2011, 14:36:23 pm
says that he added router.php
http://dev.virtuemart.net/projects/virtuemart/versions/13

BUT, i do not see it in my last download
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on July 02, 2011, 17:37:11 pm
says that he added router.php
http://dev.virtuemart.net/projects/virtuemart/versions/13

BUT, i do not see it in my last download


I downloaded the latest version 1.9 and you can find the router file  here: VirtueMart_1.1.9-COMPLETE_PACKAGE.j15.zip\com_virtuemart_1.1.9.j15.zip\router.php

This router.php file was available a while ago as a separate download link. I've tested it out and it's a little bit messy as it converts all the querystring variables to a SEF style url, instead of keeping it neat with just the keywords  from the category and product name
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on July 09, 2011, 08:10:37 am
I've just updated the router.php file. It's looking a lot more solid.

Check it out:
http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on July 09, 2011, 14:19:46 pm
I would like to make this work for lighttd servers. I have to make the enable sef urls for joomla option to work with lighttd? I will make a research and post back again
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on July 24, 2011, 05:07:42 am
Hi Guys,

Just wanted to let you know that after a couple of weeks of testing and a few updates, the router has graduated from it's BETA status to stable.

Please leave me any notes or feedback, I appreciate it.

Cheers,
Paul
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on August 02, 2011, 10:41:30 am
we just have to put it on components/com_virtuemart/ and to enable Search Engine Friendly URLs on joomla global configuration / seo settings?
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 02, 2011, 10:46:28 am
we just have to put it on components/com_virtuemart/ and to enable Search Engine Friendly URLs on joomla global configuration / seo settings?

Yes, that's correct!
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on August 02, 2011, 11:19:54 am
in my site if i click on a category i get the correct link:
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/10
but if i click on a subcategory from the menu on the left i get this
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/index.php?option=com_virtuemart&page=shop.browse&category_id=48&Itemid=1
which is the previous visited category plus the current subcategory without sef
can we do something about it?

Is it possible to have the whole category path and not only home/last-subcategory?

also my banners on the right http://www.something.gr/index.php/component/banners/click/311 are not sef
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 04, 2011, 13:20:15 pm
in my site if i click on a category i get the correct link:
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/10
but if i click on a subcategory from the menu on the left i get this
http://www.something.gr/index.php/home/%CE%A3%CF%80%CE%AF%CF%84%CE%B9--%CE%9A%CE%AE%CF%80%CE%BF%CF%82/index.php?option=com_virtuemart&page=shop.browse&category_id=48&Itemid=1
which is the previous visited category plus the current subcategory without sef
can we do something about it?

I had a look a couple of days ago and I think there was a problem with the type of virtuemart menu you were using (it was rendering the links after the server had loaded). I just checked your site today and it seems like you have changed it. Let me know if you are still having problems. Cheers.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on August 05, 2011, 13:25:00 pm
i still have the problem with the menu but its not a big deal, i have another more serious problem:

when someone is browsing a category http://www.sitenamehere.gr/index.php?option=com_virtuemart&page=shop.browse&category_id=26&Itemid=1 he cannot use the next previous page buttons, as you can see nothing happens when i click on the 2nd page
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 10, 2011, 03:56:48 am
when someone is browsing a category http://www.aleamarket.gr/index.php?option=com_virtuemart&page=shop.browse&category_id=26&Itemid=1 he cannot use the next previous page buttons, as you can see nothing happens when i click on the 2nd page

I'll have a look into this, thanks for pointing it out.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on August 11, 2011, 14:09:53 pm
for now i have disable the sef urls from joomla.
In order to understand what i mean, when im browsing a category:
http://www.sitenamehere.gr/index.php/home/%CE%94%CE%B9%CE%AC%CE%B4%CF%81%CE%BF%CE%BC%CE%BF%CE%B9/26
the next pages of the category have links like this:
http://www.sitenamehere.gr/index.php/home/%CE%94%CE%B9%CE%AC%CE%B4%CF%81%CE%BF%CE%BC%CE%BF%CE%B9/26&limit=25&limitstart=50
which are not working.

Without sef the above links are:
http://www.sitenamehere.gr/index.php?option=com_virtuemart&category_id=26&page=shop.browse&Itemid=1&limit=25&limitstart=0
http://www.sitenamehere.gr/index.php?option=com_virtuemart&category_id=26&page=shop.browse&Itemid=1&limit=25&limitstart=25

Also other options are not working like &limit=85 which change the number of displayed products on every page
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 12, 2011, 09:19:16 am
Thanks for pointing that out Margaret. Unfortunately I haven't had time to work on the router file this week. I'll allocate some time for next week, and let you know how I progress. Cheers, Paul.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 19, 2011, 06:10:52 am
Hi Margaret,

I've done some testing and can see that the Sort by listbox causes some issues. It's unfortunately the way Virtuemart has written the listbox to not allow URL rewriting. I've added this as a known issue. You can check out the updated documentation: http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 19, 2011, 06:12:05 am
I've just updated the router.php file to handle Manufacturer pages, and added the instructions on how to link to it: http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Margaret on August 22, 2011, 10:09:36 am
ok thenks for checking this out.
For your consideretion this virtuemart sef module works with listbox options http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/virtuemart-administration/15248
Maybe you can check it out and find a workaround for your module too?
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on August 22, 2011, 10:18:27 am
Thanks Margaret, I'll check it out.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Jordan Weinacker on September 03, 2011, 16:35:36 pm
Hi Paul I uploaded the router.php to component/virtuemart and turned on SEF URLs through the backend of joomla!.  I am having a problem with the check out button still.  It gives me a 404 page not found error when I click the check out button.  Could you please help me with this?
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Jordan Weinacker on September 03, 2011, 16:58:52 pm
attatched to the above post

I also cannot delete the products from my cart...it gives me the same error.

please email me at jordan.weinacker@gmail.com
Thanks
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: paulmason411 on September 13, 2011, 02:20:47 am
I also cannot delete the products from my cart...it gives me the same error.

This works fine on my store, can you send me a link to yours? Thanks.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: christhomas1966 on October 28, 2011, 13:13:05 pm
Hi Paul

Any chance you could reply to my email and comments which I put on your site regarding problems using the virtuemart component menu whilst using your extension.

I'm developing www.menter.net at the moment. When I use your extension and the virtuemart standard menu in hte left hand site of my page, the virtuemart left hand menu disappears when I click on a product (when your extension is disabled the virtuemart left hand menu disappears).

Do I need to create a custom menu? If I do I would then loose the search engine box etc.

Best regards

Chris   
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: BigHard on November 23, 2011, 07:22:03 am
I've just updated the router.php file. It's looking a lot more solid.

Check it out:
http://paulmason.name/blog/item/search-engine-friendly-sef-urls-for-virtuemart


Hi Paulmason411

Thanks for your VM Router. I'm having a problem with Portuguese characters as you can see at http://www.natiris.pt/pt/produtos/cc3a9rebro/17 (http://www.natiris.pt/pt/produtos/cc3a9rebro/17). Instead of "cérebro" it's showing "cc3a9rebro". How can I deal with this?

Waiting your answer.

Regards
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Kis54 on December 06, 2011, 19:19:47 pm
This works fine on my shop... thanks
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: Stonedfury on January 13, 2012, 21:52:06 pm
I know I saw it somewhere, but I am having a problem with -- in the url, and duplicate names as well. I have posted on your site however I think it needs approval. Just a link to the solution or the solution itself would be great.

Thank you in advance for this wonderful addition.
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: ssanchez on March 15, 2012, 01:49:32 am
Ohh man paulmason411 I LOVE YOU!!!! that was so easy.. lol Thanks bro..
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: stuartthomas on March 24, 2012, 09:48:51 am
Hello friends,

I have downloaded router.php and implement to make SEF Url. I think its better options to make search engine friendly URL and I have always used product Id instead of product name for creation URL . that is nice...
Title: Re: Search Engine Friendly (SEF) Urls for Virtuemart
Post by: nortkele on January 22, 2016, 17:08:59 pm
Hello Paul,
first of all thank you for this router. Perfect job. I saw that topic is expired but I found it today and I have question - issue .
I'm using Joomla 1.5.26 and Virtuemart 1.1.6.
If you permit me my question - issue is:
Router uploaded in correct folder. We start to use it until reached to product list (in one category for example) . On product list we have about 20 products. Till this point all URL are SEF. But when we click on product link  (to see more details for product or order product) browser start loading and redirect me to start page without opening the details for product.
Can you advise us how to proceed please.