News:

Looking for documentation? Take a look on our wiki

Main Menu

Wrong url in multi variants

Started by Sillero, January 04, 2023, 18:20:06 PM

Previous topic - Next topic

Sillero

Hello, I have been working with Virtuemart for a long time and this is my first message, I want to thank you for all the time and effort for the development of this great component.

I have a store and for a long time I have always observed an error and I have never been able to determine why it happened. I have done a clean install with J3 and VM 3.8.9 and the same thing is still happening.
When there are products with multiple variants, when entering one, for example:
testsite.com/category1/variant-main-product1
and then I click on a variant, the url changes after ajax load to:
testsite.com/category1/subproduct1
But if later I enter another article with multi variants as well:
testsite.com/category2/variant-main-product2
When clicking on one of the variants of this article, the url changes to the following:
testsite.com/category1/variant-main-product2
When in reality the category to which it belongs is 2. If I click again on any variant or on the main product, the url is correctly updated to 1.
There are two problems with this, the user sometimes gets confused or when sharing the url the category structure does not correspond to the article and on the other hand google is crawling and indexing many wrong urls or establishes a different canonical version from the correct one.
I would really appreciate it if you know where the problem might be.

hazael

it is possible that you have this product in several different categories, but only one category is the default for the URL in this product

Sillero

Hi, thanks for answer. No, only one category for each parent product. I think this is something related to some JavaScript cache or so... it is happend when you go to any product and then you enter in another multi variant product and select a child product, after AJAX refresh the URL get the previous category route. You can try in a fresh installation

Sillero

Hi, I've made a simple video to illustrate the behavior, maybe it's easier to understand.

https://www.veed.io/view/fdce7b30-7db6-4ce6-b613-9efc6f31683c?panel=share

If we are in any article and then we enter another one that has multivariants, when selecting an option the url changes to the route of the previous article seen.
This is a fresh install of Joomla 3.9.24 and virtuemart 3.8.9 10473.

I have also checked to remove the "Use ajax for product content" setting option and the result is the same.

Maybe someone can point me in the right direction to investigate.



GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

I only work on bugs on vm4.0.12, please.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Sillero

Thank you both very much for answering.

I have done the test in the latest version (4.0.12 10777) with a fresh installation and I can confirm that the behavior is the same.

Here I leave a video:
https://www.veed.io/view/b10c1acc-273e-440d-9a6a-e4ccb9a0c78d?panel=share