Author Topic: Hov remove VIRTUEMART from URL?  (Read 341 times)

pkubik

  • Beginner
  • *
  • Posts: 12
Hov remove VIRTUEMART from URL?
« on: November 05, 2017, 18:59:20 pm »
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

pkubik

  • Beginner
  • *
  • Posts: 12
Re: Hov remove VIRTUEMART from URL
« Reply #1 on: November 05, 2017, 19:00:54 pm »
continuation

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Hov remove VIRTUEMART from URL?
« Reply #2 on: November 06, 2017, 02:29:47 am »
Add a virtuemart category link menu to root category(no category selected and no manufacturer) or to the virtuemart view(Obselete)

pkubik

  • Beginner
  • *
  • Posts: 12
Re: Hov remove VIRTUEMART from URL?
« Reply #3 on: November 06, 2017, 07:14:36 am »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 1097
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.5
Re: Hov remove VIRTUEMART from URL?
« Reply #4 on: November 06, 2017, 09:55:44 am »
Change the headline of the menu item to something else than Virtuemart perhaps ?

regards

Jörgen @ Kreativ Fotografi
Joomla 3.8.1
Virtuemart 3.2.5
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Hov remove VIRTUEMART from URL?
« Reply #5 on: November 06, 2017, 10:30:55 am »
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

  • Beginner
  • *
  • Posts: 12
Re: Hov remove VIRTUEMART from URL?
« Reply #6 on: November 06, 2017, 13:06:09 pm »
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

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Hov remove VIRTUEMART from URL?
« Reply #7 on: November 06, 2017, 14:29:52 pm »
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

  • Beginner
  • *
  • Posts: 12
Re: Hov remove VIRTUEMART from URL?
« Reply #8 on: November 08, 2017, 07:34:23 am »
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

  • Beginner
  • *
  • Posts: 12
Re: Hov remove VIRTUEMART from URL?
« Reply #9 on: November 09, 2017, 09:01:01 am »
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

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Hov remove VIRTUEMART from URL?
« Reply #10 on: November 09, 2017, 12:15:19 pm »
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

  • Beginner
  • *
  • Posts: 12
Re: Hov remove VIRTUEMART from URL?
« Reply #11 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 ?

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3184
  • using Piwik instead of Google Analytics
Re: Hov remove VIRTUEMART from URL?
« Reply #12 on: November 10, 2017, 22:17:21 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