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

Featured Products URLs

Started by tophatco, August 29, 2014, 18:36:02 PM

Previous topic - Next topic

tophatco

Hey All,

I am working with Joomla 3.3.3 and VM 2.9.9 and noticed what I think may be an issue with the featured products URLS.

I have the Joomla Home page set to the Virtuemart Front page with the Featured Products module enabled on the homepage.

The problem is, the URL's for the featured products do not reflect the categories and sub-categories. For example:

www.domain.com/category/sub-category/product-name-detail might be the URL if you follow the store navigation but the featured products urls are

www.domain.com/product-name-detail leaving out the categories completely.

This would be an issue with SEO because it would create duplicate URLs to the same information.

Am I doing something wrong or are others experiencing this?

Thanks.

AH

Have you checked the canonical url for both links

Google will use this for indexing
Regards
A

Joomla 3.10.11
php 8.0

tophatco

Quote from: Hutson on August 30, 2014, 00:37:44 AM
Have you checked the canonical url for both links

Google will use this for indexing

Both link urls are different and the rel is canonical for both.

tophatco

Quote from: tophatco on August 30, 2014, 01:12:39 AM
Both link urls are different and the rel is canonical for both.

Looks like I may have been wrong about the canonical urls. Not sure what I was thinking.

Although, with the Virtuemart Front Page set as the default Home item, when I click on a product in the Product Module, I get that product but I get a category view below the product information, with all categories just like on the home page, but with a different layout. I think it's ignoring my html override for the category view and reverting to the default within the component.  I don't really want this category view showing if possible after clicking on a featured product, even if the canonical url is right. Any ideas?

Even if I set Featured Articles as the default home item and create a new menu item for the Shop, I still get a category layout of all categories below the featured product when I click on it from the module.

tophatco

Quote from: tophatco on September 04, 2014, 20:59:28 PM
Even if I set Featured Articles as the default home item and create a new menu item for the Shop, I still get a category layout of all categories below the featured product when I click on it from the module.

To somewhat answer myself.  By removing the
// Show child categories
    if (VmConfig::get('showCategory', 1)) {
echo $this->loadTemplate('showcategory');
    }

from the default template override for the product_details, the list of all categories below a featured product goes away when clicking on a featured product. None are child categories though and really shouldn't be showing.

The URL still doesn't include the categories.  The canonical might be right. I could live with this maybe but then you see issues like the breadcrumbs not functioning properly this way.

tophatco

Quote from: tophatco on September 04, 2014, 21:59:17 PM
The URL still doesn't include the categories.  The canonical might be right. I could live with this maybe but then you see issues like the breadcrumbs not functioning properly this way.

Looking more into this. 

The breadcrumbs and product navigation are off if I click on a featured product because the category ID is not included in the non SEO URL. Because the category number is missing other features do not perform properly. For example the URL I get for a featured product is:

index.php?option=com_virtuemart&Itemid=101&lang=en&view=productdetails&virtuemart_category_id=&virtuemart_product_id=129

Notice there is no number after virtuemart_category_id=

I am not using any module overrides and by looking at the module I can see $product->virtuemart_category_id in the echo for the link but I am guessing it is not properly being returned.

I noticed this while toying with sh404sef. I can actually set the correct URL for it to fix each featured product, but can only do that if I am using sh404sef for URL rewrites and I am not sure yet if I want sh404sef handling the rewrites because they do not include the category aliases in the URL.

Also with sh404sef I can remove the duplicate canonical links but then have no canonical links unless I manually set one for each url.