VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: Zbira on May 21, 2021, 16:54:12 PM

Title: Virtuemart product placed in multiple categories generates only one URL
Post by: Zbira on May 21, 2021, 16:54:12 PM
Having one Virtuemart product placed in multiple categories. But the URL is generated only from one category. How can i make the url appear differently in each category ?

Example: product
Quotecomputer1
is created in Virtuemart product list.

Placed in multiple categories
Quotecomputers, home computers, office computers.

Then url of each product I suppose:

Quoteeshop/computers/computer1
eshop/home-computers/computer1
eshop/office-computers/computer1

But this does not happen. The created url is only one for each category:

Quoteeshop/computers/computer1

When browsing categories, the product is listed correctly in each category, but have only one url. For example I am in category

Quotehome computers
the product is listed in this category, ok. But when I click on product detail, it is always redirected to url
Quoteeshop/computers/computer1

The correct should be
Quoteeshop/home-computers/computer1
.

It is bad because it confuses a customer who is redirected to a product in different category.

Have you experiences why product placed in multiple categories does not generate separate url for each category and how to make this without interfering to core code ? Thank you in advance for your tips.
Title: Re: Virtuemart product placed in multiple categories generates only one URL
Post by: pinochico on May 21, 2021, 17:25:40 PM
I don't know, I don't even want to guess what you're wrong (and you're wrong, because it works correctly on our e-shops), because you didn't provide the original live url so I could click through and do the analysis myself.

I'll wait and see :)
Title: Re: Virtuemart product placed in multiple categories generates only one URL
Post by: jenkinhill on May 21, 2021, 18:20:48 PM
When I try this the product URL displayed in the browser address bar shows the correct (new) category for each category, but the canonical URL remains the same as in the first category where the product was published in each case.