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

Product Collection: Add support for filtering products by featured status #11522

Merged

Commits on Oct 31, 2023

  1. Add support for filtering products by featured status

    - Added `featured` attribute to `ProductCollectionQuery` type to enable filtering by featured status.
    - Implemented `FeaturedProductsControl` to provide a toggle option in the inspector controls.
    - Integrated `FeaturedProductsControl` into `ProductCollectionInspectorControls`.
    - Added `get_featured_query` function in `ProductCollection` class to generate query for fetching featured products.
    - Updated existing functions and queries in `ProductCollection` class to support featured products filtering.
    imanish003 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    9fc5471 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b575ad8 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2023

  1. Refactor handling of 'featured' parameter

    This commit makes the handling of the 'featured' parameter consistent in the ProductCollection class. Previously, the 'featured' parameter was being type-casted to boolean, which was not necessary and could lead to incorrect results. Now, the 'featured' parameter is used directly without type-casting, and the check for 'featured' products in the get_featured_query method has been updated accordingly. This ensures that the 'featured' parameter is handled consistently and correctly throughout the class.
    imanish003 committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    3685504 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3a772ce View commit details
    Browse the repository at this point in the history
  3. Handle undefined 'featured' index

    This commit adds null coalescing operator to handle the case when 'featured' index is not set in the $query array. This prevents potential PHP notices or errors that may arise when trying to access an undefined index.
    imanish003 committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    a915457 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Configuration menu
    Copy the full SHA
    bb45dd0 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Configuration menu
    Copy the full SHA
    6112133 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. Configuration menu
    Copy the full SHA
    db472a0 View commit details
    Browse the repository at this point in the history
  2. Resolve conflicts

    imanish003 committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    d5fc783 View commit details
    Browse the repository at this point in the history