vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
18 stars 13 forks source link

[Bug]: Invalid visibility for baseFilterProductsQuery #498

Open rain2o opened 2 years ago

rain2o commented 2 years ago

Describe the Bug

When using actions such as category-next/loadCategoryProducts it ultimately uses the baseFilterProductsQuery helper to establish the base filters. However, in this function it uses a filter for visibility of any in [2, 3, 4].

In Magento's context, visibility of 3 is "Search" - meaning these products by default won't show on a category view, but will show in search results. In our situation we use this status to hide products from category views, but still accessible other ways (search being one example).

This might be considered a feature request, but from a Magento perspective this seems like a bug. We recently updated our VSF to the latest version and suddenly we have a lot of products showing on our category view that shouldn't be. The only workaround at the moment is to make our own query instead of using what's provided by VSF core.

Current behavior

Products which are set to visibility 3 ("Search" in Magento) are included in the core search query used for things like Category view.

Expected behavior

Product listings in places like Category view should include only visibility 2 ("Catalog") and 4 ("Search, Catalog").

Steps to reproduce

Set a product's visibility in Magento to "Search" and include it in a category. View the category view, using for example the Capybara theme.

What version of Vue Storefront are you using?

1.12.2

What version of Node.js are you using?

v12.22.6

What browser (and version) are you using?

All browsers, not browser-specific

What operating system (and version) are you using?

macOS

Relevant log output

No response

Able to fix / change the documentation?

Code of Conduct