I´m not able to create nice looking SEF urls.
- Joomla 2.5.4
- VM 2.0.6
- Joomla SEF enabled
- URL Rewrite enabled
- VM SEF enabled
- Menu home item points to VM frontpage
- Menu item for each category and for each product created
My URLs look like "http://www.mydomain.de/products/my-category/my-product.html?virtuemart_product_id=143&virtuemart_category_id=2"
They should look like "http://www.mydomain.de/products/my-category/my-product.html"
How to solve this?
what happens when you change the home to a joomla article etc.
and leave the shop link to non-home?
Modify /components/com_virtuemart/router.php, line 130-135 from:
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
} else {
to
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
} else {
Simply added:
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
Quote from: uschmi on April 20, 2012, 15:38:12 PM
How to solve this?
This would be the normal url if you have 'SEO Disabled' checked in VM2 'Configuration' - 'SEO' tab. (No need to hack the code)
Quote from: BanquetTables.pro on April 20, 2012, 16:10:57 PM
what happens when you change the home to a joomla article etc.
and leave the shop link to non-home?
this changes nothing for the product-urls...
Quote from: AlexAkhremenko on April 20, 2012, 16:26:08 PM
Modify /components/com_virtuemart/router.php, line 130-135 from:
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
} else {
to
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
} else {
Simply added:
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
This creates perfect urls!!! :)
Shouldn´t this be included into the source?
Quote from: uschmi on April 20, 2012, 17:20:08 PM
This creates perfect urls!!! :)
Shouldn´t this be included into the source?
I think, they should. But I don't know, how to do this. I'm from Belorassian and english is not my native. I'm not versed with how to communicate with developers.
no, it shouldnt
THERE is something else in your setup wrong, or conflicting
SEF urls work great with 2.0++
QuoteTHERE is something else in your setup wrong, or conflicting
Do you realy test this issue? >:(
I also encountered this problem and looking for a solution.
Quote from: AlexAkhremenko on April 20, 2012, 18:00:48 PM
I also encountered this problem and looking for a solution.
If you see an URL that includes EXACTLY the same as what has been marked in red in the first post (ids might be different of course), then you probably have "SEO disabled" activated in VM2 configuration.
If you configured everything correctly, Joomla 2.5.x/VM2.0.x produces URLs like domainname/categoryname/productname.details (or .html if you changed the suffix)
Quote from: jjk on April 20, 2012, 18:23:19 PM
Quote from: AlexAkhremenko on April 20, 2012, 18:00:48 PM
I also encountered this problem and looking for a solution.
If you see an URL that includes EXACTLY the same as what has been marked in red in the first post (ids might be different of course), then you probably have "SEO disabled" activated in VM2 configuration.
If you configured everything correctly, Joomla 2.5.x/VM2.0.x produces URLs like domainname/categoryname/productname.details (or .html if you changed the suffix)
Sorry, but I have to answer back: I had this issue in all VM 2.0.x versions, even with standard Joomla installation a.s.o. And VM2 SEF is definitely configured "SEF enabled" (the SEF-disabled option not checked).
Quote from: uschmi on April 20, 2012, 15:38:12 PM
I´m not able to create nice looking SEF urls.
- Joomla 2.5.4
- VM 2.0.6
- Joomla SEF enabled
- URL Rewrite enabled
- VM SEF enabled
- Menu home item points to VM frontpage
- Menu item for each category and for each product created
My URLs look like "http://www.mydomain.de/products/my-category/my-product.html?virtuemart_product_id=143&virtuemart_category_id=2"
They should look like "http://www.mydomain.de/products/my-category/my-product.html"
How to solve this?
Read carefully, please!
He says: "VM SEF enabled" and "Menu item for each product created". In this example ".html" is not a VM-suffix, it is Joomla SEF suffix, that is set in Joomla SEF configuration.
Try this and you will see!
Quote from: AlexAkhremenko on April 20, 2012, 18:38:04 PM
"Menu item for each product created". In this example ".html" is not a VM-suffix, it is Joomla SEF suffix, that is set in Joomla SEF configuration.
Try this and you will see!
I think this is exactly the difference to the normal use of this view. I am going to add your fix.
Quote from: uschmi on April 20, 2012, 17:20:08 PM
Quote from: AlexAkhremenko on April 20, 2012, 16:26:08 PM
Modify /components/com_virtuemart/router.php, line 130-135 from:
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
} else {
to
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
} else {
Simply added:
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
This creates perfect urls!!! :)
Shouldn´t this be included into the source?
At my web site:
http://lentillas-de-colores.com/
Have the same problem with the friendly url in the products,
I think the solution is very good, but the last point:
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
} else {
i don´t know what file have to modify.
Tepublico,
modify /components/com_virtuemart/router.php, line 130-135
Quote from: AlexAkhremenko on April 20, 2012, 16:26:08 PM
Modify /components/com_virtuemart/router.php, line 130-135 from:
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
} else {
to
case 'productdetails';
$virtuemart_product_id = false;
if (isset($jmenu['virtuemart_product_id'][ $query['virtuemart_product_id'] ] ) ) {
$query['Itemid'] = $jmenu['virtuemart_product_id'][$query['virtuemart_product_id']];
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
} else {
Simply added:
unset($query['virtuemart_product_id']);
unset($query['virtuemart_category_id']);
Hello,
I`ve added this lines to router.php but nothing happend on my site . http://atraktivna.com/component/virtuemart/97/14/tuniki/tunika-moli-detail?Itemid=0
Can you help, please?
That fix is as well as another router fix is included in the latest 2.0.7g version, but as mentioned in another post already, it might be a problem with your GA e-sport template menu. Maybe you should describe your problem to Gavick support. SEF Urls work fine with other templates.
However, first check if your Joomla and VM2 SEF is enabled. At present your site looks like there is no SEF enabled at all.
Excelent solution, I have SEF disable because the HTTPS solution give me for BanquetTables.pro only works without SEF (thanks a lot), so when I disabled this option, enabled the virtuemartRedirect and I added this code to router.php my site begin to work so good.
Excuse me about my english : ).