outeredge / magento-structured-data-module

Magento Structured Data Module by outer/edge
MIT License
46 stars 13 forks source link

Configurable ptoduct shows all it's child products even if it's "disabled" or "out of stock" #66

Closed ronakchauhan closed 5 months ago

ronakchauhan commented 5 months ago

Magento version: 2.4.5-p2 php : 8.1 Module version: 4.0.8

Module configuration: 'structureddata' => [ 'product' => [ 'enable' => '1', 'use_short_description' => '1', 'include_children' => '1', 'include_weight' => '0' ], 'cms' => [ 'enable' => '0' ], 'contact' => [ 'enable' => '0' ] ]

Configurable product:

Schema-Markup-Validator

Solution: show only those products which are visible on frontend and enabled and in stock.

davidwindell commented 5 months ago

@ronakchauhan it is good practice to show all variants including out of stock products, but I agree that disabled products should not be shown. We will get those excluded in our next release.

I am not sure about URLs for not visible individually products, we will have to look into that further.

davidwindell commented 5 months ago

@ronakchauhan we have tried to reproduce this but couldn't get disabled products to show. The module is working as expected showing out of stock products, you could use a plugin to customise this behaviour as required.