Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

[Product Query] When a specific variation is used (e.g. on-sale variation), the filter blocks have to render data that matches the variation #7245

Closed
Tracked by #42616
gigitux opened this issue Sep 28, 2022 · 0 comments · Fixed by #7257
Assignees
Labels
block: filter by attribute Issues related to the Filter by Attribute block. block: filter by price Issues related to the Filter by Price block. block: filter by rating Issues related to the Filter by Rating block. block: filter by stock Issues related to the Filter by Stock block. block-type: product-query Issues related to/affecting all product-query variations.

Comments

@gigitux
Copy link
Contributor

gigitux commented Sep 28, 2022

When a specific variation is used (e.g. on-sale variation), the filter blocks have to render data that matches the variation.

For example, when on-sale variation is used, the Filter Products by Price block should render as max price $55.00.
The same for the Filter Products by Attributes. The counter number near the attribute is related to all the products.

image
image

So we have to take care of the kind of variation (e.g.:on sale, most sold products), but also of the pagination settings. For example, the merchant can show only the first 6 products but also show the first 12 products or all the products of a specific variation.

@gigitux gigitux added block: filter by price Issues related to the Filter by Price block. block: filter by attribute Issues related to the Filter by Attribute block. block: filter by stock Issues related to the Filter by Stock block. block: filter by rating Issues related to the Filter by Rating block. block-type: product-query Issues related to/affecting all product-query variations. labels Sep 28, 2022
@gigitux gigitux self-assigned this Sep 28, 2022
gigitux added a commit that referenced this issue Sep 29, 2022
…e variation #7245

fix filter blocks: the data (e.g: max price or stock-status) match the variation
gigitux added a commit that referenced this issue Nov 2, 2022
* Product Query: Fix pagination issue

* Product Query - Add support for the Filter By Price Block #6790

Product Query - Add support for the Filter By Price Block

* fix query relation

* fix on sale query

* Product Query - Add support for the Filter By Attributes block #6790

Product Query - Add support for the Filter By Attributes block

* fix bugged pagination and on-sale filter after refactor

* address feedback

* Product Query - Add support for the Filter By Stock Block #6790

Product Query - Add support for the Filter By Stock Block

* Fix filter blocks: the data (e.g: max price or stock-status) match the variation #7245

fix filter blocks: the data (e.g: max price or stock-status) match the variation

* disable phcs rules on top of the file

* replace parameter name

* fix eslint error
senadir pushed a commit to senadir/woocommerce-blocks that referenced this issue Nov 12, 2022
* Product Query: Fix pagination issue

* Product Query - Add support for the Filter By Price Block woocommerce#6790

Product Query - Add support for the Filter By Price Block

* fix query relation

* fix on sale query

* Product Query - Add support for the Filter By Attributes block woocommerce#6790

Product Query - Add support for the Filter By Attributes block

* fix bugged pagination and on-sale filter after refactor

* address feedback

* Product Query - Add support for the Filter By Stock Block woocommerce#6790

Product Query - Add support for the Filter By Stock Block

* Fix filter blocks: the data (e.g: max price or stock-status) match the variation woocommerce#7245

fix filter blocks: the data (e.g: max price or stock-status) match the variation

* disable phcs rules on top of the file

* replace parameter name

* fix eslint error
gigitux added a commit that referenced this issue Nov 28, 2022
* Product Query: Fix pagination issue

* Product Query - Add support for the Filter By Price Block #6790

Product Query - Add support for the Filter By Price Block

* fix query relation

* fix on sale query

* Product Query - Add support for the Filter By Attributes block #6790

Product Query - Add support for the Filter By Attributes block

* fix bugged pagination and on-sale filter after refactor

* address feedback

* Product Query - Add support for the Filter By Stock Block #6790

Product Query - Add support for the Filter By Stock Block

* Fix filter blocks: the data (e.g: max price or stock-status) match the variation #7245

fix filter blocks: the data (e.g: max price or stock-status) match the variation

* rename allowControls to allowedControls

* add support to the global query

* fix eslint error

* bot: update checkstyle.xml

* Update src/BlockTypes/ProductQuery.php

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* fix global query generation

* bot: update checkstyle.xml

* try: refactor merge_queries

* remove debug code

* fix: unpack assoc array php 7.4

* try: refactor merge_queries to take any form of input without unpacking
and preparing the input arrays

* add missing query vars

* add feature flag

* updates comment

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: filter by attribute Issues related to the Filter by Attribute block. block: filter by price Issues related to the Filter by Price block. block: filter by rating Issues related to the Filter by Rating block. block: filter by stock Issues related to the Filter by Stock block. block-type: product-query Issues related to/affecting all product-query variations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant