Products in unpublished category show in VM search results

Started by e-trader, December 04, 2013, 22:40:45 PM

Previous topic - Next topic

e-trader

Products that are only in an unpublished category show in VM search results.
Using the standard VM search module.
VM 2.024b
JM 2.5.14

Is it a bug or a feature?

Milbo

nice question. in fact it is a feature. The reason is that it a product can have multiple categories. Furthermore you can use unpublished categories as calculation rules. Therefore it would be hard to decide if a product should be unpublished, or better said it would take too much performance. But you can use the product listing and only list product of a certain category and unpublish them. Even if you have 1200 products in a category it takes only maximum 2 minutes.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

e-trader

Hello Milbo, your reply is much appreciated. Understood about the performance loss.

One other side effect is the following; the SEF URL of products in unpublished categories is different than if the category would be published. For example:

SEF link of product in published category in search results: www.mydomain.com/category-a/product-a
SEF link of same product in unpublished category in search results: www.mydomain.com/product-a

This causes duplicate URLs in Google. Apparently Google craws search results. This is what triggered this question. I still want Google to keep the products in the index, so I do not unpublish them.

I've prevented the duplicate links in a template override by removing the links of products located in unpublished categories with some checks (in our case stock check).

Thanks again.

Milbo

This is interesting. Your products have a canonical link, which is using the first category of hte product. So if you unpublish the second category it shouldnt be a problem. But interesting view point. Which file did you change? which line? I think about to add it by default, but,... people cant buy the products then, or? hmmm.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

If you are concerned about 'duplicate content', that's no problem at all because different urls pointing to the same content/product is not what the search engines consider duplicate content. Duplicate content is for example, if you run some mirrors of your shop on different domains. However, I know somebody who does this extensively for many years already and still didn't get punished by Google.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

on the other side,... before the link was with category  www.mydomain.com/category-a/product-a
if you unpublish the category, the link with category is not anylonger "valid", but best is... the old link, points automatically to the new one with the new canonical url. So if you decide to keep your products published, google should notice that the old link is obsolete and pointing to a page withe new canonical. When you publish the category again. Bot links are still valid. This link
www.mydomain.com/product-a is imho always valid, even it is published in a category. The category creates the canonical link because the category is good for SEO.

VM2 provides theoretically for any product endless links. This is restricted by the maximum link size. It is not a problem for google, because the canonical is always the same.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

e-trader

We have products that can be sold once (unique product) and products that can be sold many times over. The once-off products are moved to an unpublished category when sold. Google still can re-visit the product page and keep it indexed, while they do not show up or clutter the category browse screen. The ones that can be re-sold over and over remain listed in the same category forever because of the important "notify me" functionality.

Setting an action when products are out of stock per category would be very helpful here (feature request).

Our products are only in one category. It is the primary category of the product that is unpublished, in that case the category path in the SEF URL disappears. The cannonial link then also changes to one without the category path. All old links still work also.  I checked a product, and Google now has two listings for it. One for the old full path including category and one without the category path. When following these links, both have the cannonial link without the path now. This is as Milbo describes it.

Will Google remove the listing of the page where the canonical link not refers to and is this not duplicate content?

Maybe the question is also should the cannonial link be the path with or without the unpublished category? Of course, the product should not be moved to other categories but can not be hidden when out of stock for one category and shown when out of stock for another. This is the essence of how I got to this all..

Thanks for all the replies and insights.

Milbo

imho you dont need todo anything. Google should update it
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/