Articles not showing up on search

Hey :slight_smile:

I’ve got a situation here and I would like to ask opinions: "I have an article with 4 variants (like size variants). The configurator type is “selection”. What is happening is that, if I disable the preselected article, that article is not showed up on search results event another variants are active. Is that the right behavior of shopware?

Thanks

Hi,

this behaviour results from \Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory::createQuery: 

            ->innerJoin(
                'product',
                's_articles_details',
                'variant',
                'variant.id = product.main_detail_id
                 AND variant.active = 1
                 AND product.active = 1'
            )

I guess one could argue about this behaviour - but generally Shopware does need an active main variant / preselected variant, so you shouldn’t try to trick it in that regard :slight_smile:

Best regards,

Daniel 

@Daniel Nögel schrieb:

Hi,

this behaviour results from \Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory::createQuery: 

->innerJoin(
‚product‘,
‚s_articles_details‘,
‚variant‘,
‚variant.id = product.main_detail_id
AND variant.active = 1
AND product.active = 1‘
)

I guess one could argue about this behaviour - but generally Shopware does need an active main variant / preselected variant, so you shouldn’t try to trick it in that regard :)

Best regards,

Daniel 

I understand, but here it would make sense to set preselected variant as the next active one. Do you agree?

Hi,

perhaps at least a message / hint might be helpful. You can create new issues at issue.shopware.com any time - so it doesn’t get lost here in our forums

Best regards,

Daniel