Hello i would like to ask how is it possible to make a product to have a specific url. I want my products to have the url that i fill in alias only. I don't want the ? with the category id, to increase the SEO.
You would need to link every product into Joomla menu, so it would use the Joomla routing. But depending on the amount of products is a time consuming procedure and you need to take care if you delete or add a new product in Virtuemart to synchronize your Joomla menu entries.
Thank you franzpeter for your reply :) Yes i was thinking of that but as you say it is time consuming because i have too many products. Thank you again for the reply
If you want product URLs to only have product alias (e.g. example.com/product-alias), you need this setup:
Make sure SEF is enabled (in Joomla config, VM config and SEF plugin). And rewriting to remove index.php from URL.
Create a homepage menu item with type VirtueMart Category or Frontpage.
In VM SEO settings, disable "Use product link suffix" and "Use full category tree for product links". Be aware that when disabling these options you can't have duplicate product and/or category names because that will cause issues. And that categories will also have flat links as well (e.g. example.com/category/subcategory will turn into example.com/subcategory). If you want full category URLs while using these settings, I can show you a core hack.
Hi Ghost.
That would be most interesting, if not to hard to fix.
/Cheers
betterlead, just play a bit with the options.
Quote from: betterlead on June 01, 2016, 12:38:12 PM
Hi Ghost.
That would be most interesting, if not to hard to fix.
/Cheers
If you want to keep full category URLs when using flat product URLs, change this:
if($this->full) {
if($parent_ids = $catModel->getCategoryRecurse($virtuemart_category_id,$catMenuId)){
$parent_ids = array_reverse($parent_ids) ;
}
} else {
$parent_ids[] = $virtuemart_category_id;
}
to this
if($parent_ids = $catModel->getCategoryRecurse($virtuemart_category_id,$catMenuId)){
$parent_ids = array_reverse($parent_ids) ;
}
in router.php.
Hmmm but this looks like the $this->full condition is wrong and should be another variable, or? I mean "Use full category tree for product links" should show the categories, even we disable "Use product link suffix"