I discovered something new while playing around with menu items and settings.
I unpublished all the previous user-related menu items, except for "Virtuemart account maintenance" and "Virtuemart list orders" (which I think are the only ones I need).
So now the cart page hasn't a menu item assigned, and is accessible only through the cart module.
Cherry Picker module has the same settings above, that should be display it only on VM homepage and VM category pages.
What I expected:
Cherry Picker module wouldn't be displayed niether on the VM user menu items nor on cart page (as it isn't VM home or a VM category page).
What I obtained:
Cherry Picker module isn't displayed on the published VM user menu items.
On the other hand it is displayed on cart page (and also on edit billing/shipping address pages when using the cart links)
What I discovered:
I was wrong when I said that the problem was in the "view".
Looking at the body classes, I see that the cart page opens correctly in "view-cart" and all user pages open correclty in "view-user". No difference if they have a menu item or not.
The difference is that if they have a menu item, the "itemid-" body class is the correspondant menu item (obviously), but if they don't have one the "itemid-" body class refers to VM homepage menu item.
I think that the problem lies in this "fallback".
With Joomla SEO settings ON the fallback is always VM homepage. So Cherry Picker module is there.
With Joomla SEO settings OFF the fallback seems to be the previous page you are coming from. So if you came from a VM page, it will be VM homepage. If you came from a VM user page with a menu item assigned, it will be its itemid. If you came form another Joomla core page there is no itemid fallback. According to this, Cherry Picker module will/won't be displayed.
Searching this forum I found other questions about this, with some workarounds.
1) creating a Joomla url type menu for the pages that don't have a specific menu type:https://forum.virtuemart.net/index.php?topic=135757.msg474028#msg474028
2) creating a conditional module position in order to hide the module on some views:http://forum.virtuemart.net/index.php?topic=135937.0
In my opinion these may be good patches to solve the "layout problem" and so I will take them into consideration.
But I also think that they don't touch the "URLs problems".
In my case, with SEO settings on, I get the following URLs:
- "Virtuemart account maintenance" page (has menu item): www.mysite.it/my-menu-item-alias
- "Virtuemart cart" page (doesn't have a menu item): www.mysite.it/my-vm-homepage-menu-item-alias
- "Edit billing/shipping address" pages from cart links (a specific menu item doesn't exist): www.mysite.it/my-vm-homepage-menu-item-alias
What I consider to be "URLs problems" are:
1) the words "cart" and "editaddresscartBT" in the URLs are not translated, and as far as I know aren't translatable
2) I don't get the point of having my-vm-homepage-menu-item-alias in the URL: for example if my alias is "products" (because my menu item title is "Products"), what I get is www.mysite.it/products/cart
, or even worse www.mysite.it/products/user/editaddresscartBT
. Why having something that relates to the user "under/inside" products (or whatever)?
I solved the last point changing the menu item alias (not the title) to "shop"...which to me makes more sense. But I don't know if it's a good choice.
jjk (or any other of you here), can you share your thoughts about this all?
And regarding what I call "URLs problems", does my reasoning make sense or mine are ghost problems?