News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product canonical url also as browser url

Started by tonis, December 23, 2013, 12:33:39 PM

Previous topic - Next topic

tonis

Hello

I have problems with products in more categories...

I have searched and found that it creates more urls for one product, but it adds a canonical url to the webpage head, that correct and works...

But it creates this ... problems (for me):

When I add the categories to menu items, it displays the breadcrumbs wrong ... for example ... the product is in subsubcategory1 and subsubcategory2 ... after little browse within the categories you can become this breadcrumb output - home > category1 > subcategory1 > subsubcategory1 > subsubcategory2 > product

the urls are somehow "slowed", I acces the product form category 1 - it shows url from category 1, then I acces product from category 2, it shows url for the category 1, then I acces it form category 3 and it shows the url from category 2

To work with some social ads is very confusing ... for example when I have FB likes on products ... it splits the likes for one product to more urls
The same with disqus comments ... you can imagine that this is a realy big problem when the comments are split.


How can be add the older system, where the product were displayed on the category with the lowest ID? I think the canonical url still works that way ... can the canonical url be the url displayed in the browser?

Thanks for your help...

J2.5, VM 2.0.24

tonis

If someone wants to use the canonical url as default product url I provide a little modification

administrator/components/com_virtuemart/models/product.php

on line 1049, function getProductSingle
change
if (!empty($product->categories) and is_array ($product->categories) and count($product->categories)>1){

to
if (!empty($product->categories) and is_array ($product->categories) and count($product->categories)>1000){

or use some other high number, but 1000 is I thing enough, no one will have one product in such number of categories...