I would like to show Commerce products in the sitemap. When I edit the Commerce product type, I do not get an option to enable Simple XML sitemap. For all other content types the XML sitemap is generated, so how do I do it for Commerce nodes?

In accordance with @gbyte's request, I also logged the issue in in the Commerce module under https://www.drupal.org/node/2691989

Comments

platinum1 created an issue. See original summary.

gbyte’s picture

I haven't tested D8 commerce yet, but in D7 you would usually create a product display (a node) which would reference products. This should work with the simple sitemap node plugin.

If commerce for D8 works differently, it should not be too hard to create a plugin for a product entity. I will gladly accept patches!

platinum1’s picture

I checked with the Commerce group. D8 Commerce no longer works with display nodes which reference Commerce products. The Commerce product is displayed directly.

gbyte’s picture

Title: Sitemap for Commerce products » Support commerce product entities
Category: Support request » Feature request

At the moment I do not have time resources to write and test non-core plugins. Writing a plugin for this module is quite simple and requires only a few lines of code - the testing is the time consuming part.

Best case scenario, you would create a plugin and submit it here AND to the commerce queue asking them to incorporate it into commerce 8.x. You could submit only here, but at the moment I am not sure if it makes sense to support non-core modules out of the box. In this case, you can spin up a custom module with only this plugin.

I will keep this issue open, I'm sure there will be others among the 1000+ users who will at some point need this and will be able to contribute.

gbyte’s picture

Please check out the plugin request process described on the project page.

platinum1’s picture

Thank you for the feedback. I have already added the request to the Commerce queue.

gbyte’s picture

Please link the commerce issue in this issue's description. Also please consider helping creating this patch.

platinum1’s picture

Issue summary: View changes
gbyte’s picture

gbyte’s picture

  • gbyte.co committed 2c8196e on 8.x-2.x
    Issue #2688654 by platinum1: Support commerce product entities
    
gbyte’s picture

Hi Andreas, please download the dev version to test the commerce product support. Clearing the caches will be necessary so the new plugin gets registered.

Settings for all products of a type can be set on its edit page: admin/commerce/config/product-types/[type]/edit
On product edit pages, the product type settings can be overwritten for any product.

Thanks for sponsoring this functionality!

gbyte’s picture

Status: Active » Fixed

I'm going to mark this issue as fixed, but make sure to update it if necessary.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

edurenye’s picture

Looks like it is not working again, it generates sitemap for nodes but not for commerce_products.
Forget it, it's working fine.