News:

Support the VirtueMart project and become a member

Main Menu

Hov remove VIRTUEMART from URL?

Started by pkubik, November 05, 2017, 18:59:20 PM

Previous topic - Next topic

pkubik

Good day
I have a problem, I can not delete the virtuemart from URL. My website url is still: domain.com/virtuemart/category/product I tried everything possible and nothing helps. I also attach screens to my settings. What am I wrong with?

Joomla! 3.8.1 and VirtueMart 3.2.4, htaccess ir original from joomla


Studio 42

Add a virtuemart category link menu to root category(no category selected and no manufacturer) or to the virtuemart view(Obselete)

pkubik

Screen 1.png - moved virtuemart to main menu - without change, still the same URL: domain.com/virtuemart/category/product

Screen 2.png - moved virtuemart to main menu and add as submenu - HOME, URL is: domain.com/home/virtuemart/category/product

Jörgen

Change the headline of the menu item to something else than Virtuemart perhaps ?

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

YOu have to set virtuemart as default menu and not use an article or if you want change virtuemart in the link, then change the alias.
Joomla use always yoursite/menu-alias/...
Another solution is to add item menus for all main categories in a hidden menu(no joomla module set) so alias begin from root

pkubik

I managed to remove the VIRTUEMART from the URL. Now is the menu address i need: domain.com/category/product

I created a hidden menu in it VirtueMart » Category Layout and link to link to each menu in virtuemart. Is that right? Do I need to create a new hidden menu in the joomla menu for each menu from the virtuemart? It seems complicated to me.

Studio 42

No only the 1st level category, all inherited links use same menu item.
If you have a subcategory then menu is yoursite.com/category/subcategory and product in this yoursite.com/category/subcategory/product
But this is better if you use the breadcrumb, if you add menu items for all categories in root then you loose the breadcrumb levels but you can then have yoursite.com/subcategory/product
This is needed because in Joomla the menu settings get inherited.
If you want simplify your product URL, it's possible in latests VM release, see the config SEO part.

pkubik

OK, i create in the main menu, screen 1:
Home (Alias: home)
Articles » Featured Articles


then i create hidden menu and create for all major categories from VM, screen 2:
Sady na nehty (Alias: sady-na-nehty)
VirtueMart » Category Layout


links are now created in the form: domain.com/category/subcategory/product

Is this the only solution? It is very complicated to create two menus, one in VM and again in joomla!

New problem, if is product displayed on the homepage with the module:
VM - Featured products is URL: domain.com/category/product but if I find it through the menu is URL:  domain.com/category/subcategory/product this creates duplicate links.

how to create links only in shape: domain.com/category/product

pkubik

I found the solution. But adds a subcategory to all products. I need to remove the subcategory, how to do it?

in the administrator\components\com_virtuemart\models\product.php
on line 426: if(VmConfig::get('show_subcat_products',false)){
change to: if(VmConfig::get('show_subcat_products',true)){

links are now created in the form: domain.com/category/subcategory/product.html
But i need all links in the form: domain.com/category/product.html how to do it?

Studio 42

Vm always use Joomla logic
If you have a menu vmcategory then this is the root and subcategory is vmcategory/subcategory.
TO change this behavior, you need to hack Joomla+Vm
The problem is that sef link to the main menu (vmcategory) is the way Joomla know how to display the modules for eg. so changing this need to modify more in Joomla.
If you need simplified links, you need then sh404 or any rewriting plugins that can modify links.
This links are then used by the SEF tool to revert original link before Joomla router.
Eg setting in your sef tool subcategory = vmcategory/subcategory, he can intercept the link subcategory and send back to Joomla the right link, so Joomla can work and set right parameters.
This is only a basic explain, it not really work this way

pkubik

You're right. It is best to use the SEF tool. Which component is better for SEO: sh404SEF or JoomSEF ?

jjk

Quote from: pkubik on November 09, 2017, 21:21:50 PM
You're right. It is best to use the SEF tool. Which component is better for SEO: sh404SEF or JoomSEF ?

Using those third party SEF tools usually create other problems. Which menu structure do you actually want to achieve? Do you want to display a page showing your VM categories as the default home page or do you want a non-VM homepage with for example a 'Shop' link.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations