Hidden Products Available In Sitemap

Hi,I would like to be able to add our hidden products to sitemap.Most of our hidden products are just sold products that we keep in catalog.We store them in hidden sold/archive category.

Also basic question.Is it bad idea for SEO to add sold items to sitemap ? Can this for example help to bring more traffic from search engines ? Thanks advance for any help.

Hello!

In order to include hidden products into the sitemap, you can change the following code:

while ($params['pid'] = db_get_fields('SELECT product_id FROM ?:products WHERE status = ?s ORDER BY product_id ASC ?p', ObjectStatuses::ACTIVE, db_paginate($page, $products_per_page))) {

to this one:

while ($params['pid'] = db_get_fields('SELECT product_id FROM ?:products WHERE status IN (?a) ORDER BY product_id ASC ?p', [ObjectStatuses::ACTIVE, ObjectStatuses::HIDDEN], db_paginate($page, $products_per_page))) {

in the app/addons/google_sitemap/func.php file.

As for the SEO, I am afraid, but I cannot give you any advice on this.

Thank you for the instructions,it is appreciated !

Thank you for the instructions,it is appreciated !

You are welcome, I am glad to help you!