Author Topic: I need unique URL for Product Page  (Read 831 times)

dkaneloglou

  • Beginner
  • *
  • Posts: 37
I need unique URL for Product Page
« 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

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1398
Re: I need unique URL for Product Page
« Reply #1 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.

dkaneloglou

  • Beginner
  • *
  • Posts: 37
Re: I need unique URL for Product Page
« Reply #2 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?

dkaneloglou

  • Beginner
  • *
  • Posts: 37
Re: I need unique URL for Product Page
« Reply #3 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.

dkaneloglou

  • Beginner
  • *
  • Posts: 37
Re: I need unique URL for Product Page
« Reply #4 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.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: I need unique URL for Product Page
« Reply #5 on: February 24, 2020, 16:56:23 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
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)