VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: idor on February 19, 2020, 10:35:00 AM

Title: I need unique URL for Product Page
Post by: idor on February 19, 2020, 10:35:00 AM
Hello,

In virtuemart eshop I have various products in several categories.
I notices that the URL & breadcrumbs is different in the same product.
Ex. I have these categories:
Category 1 > Category 2 > Pruduct
and the product belongs in Categoy 1 and 2

The problem is that I get two different links
www.mysite.com/category-1/category-2/product.html
and www.mysite.com/category-1/product.html

and breadcrumbs  Category 1 > Category 2 > Pruduct
and Category 1 > Pruduct

I need the beadcrumb to be always Category 1 > Category 2 > Pruduct
and the URL
www.mysite.com/category-1/category-2/product.html

How can I solve this?

Thank you
Title: Re: I need unique URL for Product Page
Post by: balai on February 19, 2020, 11:11:52 AM
It a known issue.

Although you cannot change the url format, you can set a "canonical" category to your product, through the product form.

This will indicate to the search engines, which url to index (based on the category).
Hence no matter which page is visited, they will treat those 2 as the same page.
Title: Re: I need unique URL for Product Page
Post by: idor on February 19, 2020, 11:34:11 AM
Can I eliminate the first link
www.mysite.com/category-1/product.html
and always call the second?
www.mysite.com/category-1/category-2/product.html

I need the only one link to exist to be the one based on the last level category.

Maybe with .htaccess if it´s not possible through VM?
Title: Re: I need unique URL for Product Page
Post by: idor on February 22, 2020, 12:53:37 PM
Finally I installed sh404sef plugin and I get www.mysite.com/product-name.html
which is OK for me.
Title: Re: I need unique URL for Product Page
Post by: idor on February 22, 2020, 12:57:20 PM
About the breadcrumbs I still have no solution.
What I need is to maintain the Virtuemart category path and finally the product name
Category 1 > subategory 1a > Sub-subategory 1ai etc... > Product Name

I would appreciate if someone could help me with this.
Title: Re: I need unique URL for Product Page
Post by: PRO on February 24, 2020, 16:56:23 PM
Quote from: dkaneloglou on February 22, 2020, 12:53:37 PM
Finally I installed sh404sef plugin and I get www.mysite.com/product-name.html
which is OK for me.


no need to do that, you could just disable "full category tree" in urls