VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: visitmontaione on November 17, 2022, 22:10:52 PM

Title: How to set up a category url [not solved]
Post by: visitmontaione on November 17, 2022, 22:10:52 PM
Hello, let's say I have a product like wine called "mywine"

"mywine" is under categories: Wine > red wines

I don't understand why - when I click on the product "mywine" I can see the url like /wine/mywine and not /wine/red-wines/mywine as I would like to be.

Is it possible to setup url like the second way?

PS. I've already setup the Joomla menu as Wine (as virtuemart category) and Red wines (as virtuemart category child of Wine).

Where I am going wrong?

Thanks.
Title: Re: How to set up a category url
Post by: pinochico on November 18, 2022, 10:52:39 AM
SEO: recommends keeping the URL as short as possible.

This:
wine/red-wine/my-wine1/my-wine2/my-extra-wine-1l

Not recommended

This:
wine/my-extra-wine-wine-1l

It's more correct.



P.S..
The site URL, VM version and Joomla version are basic information for analysis.
Title: Re: How to set up a category url
Post by: visitmontaione on November 18, 2022, 10:57:30 AM
Probably you have not understood my question.

I don't want to do so long urls wine/red-wine/my-wine1/my-wine2/my-extra-wine-1

But just 2 categories: Wine > red wines > Mywineproduct

So I repeat my question. Is there a way to do so, independently if it is a good Seo practice or not?

Thanks
Title: Re: How to set up a category url
Post by: pinochico on November 18, 2022, 11:01:32 AM
pls don't catch my words, is only example :D
Title: Re: How to set up a category url
Post by: visitmontaione on November 18, 2022, 18:43:23 PM
I've "partially" solved updating to VM 4.0.7.10744.

Even selecting to rebuilt the whole category tree (see attachment), the first sub-category is missed.

Link https://www.visitmontaione.com/joomla4/it/shop
Title: Re: How to set up a category url [partially solved]
Post by: visitmontaione on November 21, 2022, 08:54:27 AM
I have tried all possibilities, but I can't make the category tree working fine.

I have done as follow:

In Joomla menu a new menu with:

1-

Shop
  > vini
      > vini bianchi
      > vini rossi
2-

Than I setup categories in VM products categories in the same way.

3-

From Joomla menu I've linked as follow:

The menu item Shop is linked to an article. Inside this article there is a VM module that recall products.

Vini > to VM category Vini
Vini bianchi > to VM category Vini bianchi
Vini rossi > to VM category Vini rossi

4-
VM configuration:
- Seo enabled
- Usa l'intero ramo della categoria per costruire l'URL del prodotto yes

5-
The output in home page is not correct and products link do not respect the category tree.

So at the end I have to understand if the VM component has a bug or if I am wrong in something, but I've tried all possibilities.



Title: Re: How to set up a category url [partially solved]
Post by: pinochico on November 21, 2022, 09:46:41 AM
This can never work.
You don't have a VM menu ID anywhere to create the correct URLs.

So the fault is on your side because you just think/want it to work properly

Create a menu item for the VM (preferably for TOP CATEGORY) and put it in the new HIDDEN menu.

Then the URLs for the VMs will be generated correctly.

If you have a Multilanguage shop, you need to create one for each language and have the Multilanguage shop and Joomla set up correctly.
Title: Re: How to set up a category url [partially solved]
Post by: visitmontaione on November 21, 2022, 10:05:47 AM
Thanks for your reply.

Quote from: pinochico on November 21, 2022, 09:46:41 AM
This can never work.
You don't have a VM menu ID anywhere to create the correct URLs.

So the fault is on your side because you just think/want it to work properly

This is a good new.

Let's go by step.

I've created a Joomla menu item for "vini". But what di you mean when you say:

Quote from: pinochico on November 21, 2022, 09:46:41 AM
Create a menu item for the VM (preferably for TOP CATEGORY) and put it in the new HIDDEN menu.

What is a Hidden menu...?

If I give you credentials could you please take a closer look to my Joomla setup? I'am going crazy for that... :o
Title: Re: How to set up a category url [partially solved]
Post by: jenkinhill on November 21, 2022, 12:54:19 PM
Hidden menus are an essential feature when developing in Joomla.
https://www.joomlart.com/tutorials/joomla-4-tutorials-how-to-create-hidden-menu-items-in-joomla
Title: Re: How to set up a category url [partially solved]
Post by: visitmontaione on November 21, 2022, 13:19:02 PM
Thank you jenkinhill, I've read the article about hidden links and I have followed this information.

It seems to work, but there is a products for which the category not follow the tree.

Could you be so kind to help me checking from here https://www.visitmontaione.com/joomla4/it/shop

The products is CRISOPERLA - IL CORNIALE

The link go to https://www.visitmontaione.com/joomla4/it/shop/vini/crisoperla-il-corniale instead of https://www.visitmontaione.com/joomla4/it/shop/vini/vini-bianchi/crisoperla-il-corniale

I can't understand where I am going wrong... :'(

Thanks a lot in advance
Title: Re: How to set up a category url [partially solved]
Post by: Jörgen on November 21, 2022, 16:16:27 PM
Check if there is something with


Jörgen @ Kreativ Fotografi
Title: Re: How to set up a category url [partially solved]
Post by: visitmontaione on November 21, 2022, 16:33:13 PM
Hello Jörgen, thank you for your reply.

I've checked all these infos dozens of times.

I've also cancelled the Crisoperla wine (it was ID 1) and created a new one. Same issue.

Now after saving, suddenly even the subcategory "Vini rossi" has disappear...

I also marked in the joomla menu, the item menu correspondant at the categories as "hidden".

Nothing...
Title: Re: How to set up a category url [partially solved]
Post by: visitmontaione on November 21, 2022, 16:46:00 PM
Weird things....

Now after saving, suddenly even the subcategory "Vini rossi" has disappear.

Than I go - from the top menu - to category "vini rossi".

Than back to shop home page.

Sub Categories for redwine has appeared again, except for white wine Crisoperla.

Please not that I have cancelled my cache more and more time.

So it is not even a problem of cache.

I am doing websites since 1998 and with Joomla since 2009, I can understand everything and maybe I can go wrong with some settings, but this is really strange.

Beyond any reasonable doubt I am afraid it's just a bug of VM.
Title: Re: How to set up a category url [not solved]
Post by: Jörgen on November 21, 2022, 20:09:48 PM
I still think "vini rossi" and "Crisoperla" has something that is unique, otherwise I would think other categories and products would behave badly.
It could still be a VM issue, but I think product or category specific data has something to do with it.

BTW i clicked the "social media" box to the right, and then everything freezes, what is it supposed to do. Does not matter which wine I choose.

Jörgen @ Kreativ Fotografi
Title: Re: How to set up a category url [not solved]
Post by: visitmontaione on November 21, 2022, 22:42:51 PM
Thank you so much Joergen for your kind reply.

As I see you have a lot of patient, if it isn't too much trouble for you, I would kindly ask you if (tomorrow, of course), you can have a look inside my website backend.

Of course I can give you credentials to enter.

Maybe in few minutes we can understand if is is really my mistake or a VM issue.

Thank you so much in advance for your kind help.

Regards from Italy.
Title: Re: How to set up a category url [not solved]
Post by: Studio 42 on November 22, 2022, 11:26:24 AM
Have you set the canonical link to the right category for this product ?
Title: Re: How to set up a category url [not solved]
Post by: visitmontaione on November 22, 2022, 11:28:29 AM
Yes, nothing change...

I think I've tried all possibilities... ::)