Skip to content

Support combination feature values in feature filters - #1292

Open
jf-viguier wants to merge 2 commits into
PrestaShop:devfrom
jf-viguier:feat/combination-feature-filters
Open

Support combination feature values in feature filters#1292
jf-viguier wants to merge 2 commits into
PrestaShop:devfrom
jf-viguier:feat/combination-feature-filters

Conversation

@jf-viguier

@jf-viguier jf-viguier commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
Questions Answers
Description? See below.
Type? new feature
BC breaks? no
Deprecations? no
Fixed ticket? PrestaShop/PrestaShop#37479
How to test? See below.
Sponsor company creabilis.com

Description

PrestaShop 9.3 introduced feature values at combination level (PrestaShop/PrestaShop#41830). This PR brings them into the faceted search: feature filters now also take combination (product_attribute) feature values into account, so a feature carried only by combinations shows up in the facets with correct product counts.

The behavior is gated first by PrestaShop >= 9.3, then by the combination_feature_values feature flag. On older versions, or with the flag off, nothing changes.

About rawTable

The MySQL adapter maps each filter field to a DB table, and the query builder prepends _DB_PREFIX_ to that name. To merge product-level and combination-level values, id_feature / id_feature_value are now mapped to a derived sub-select (a UNION of feature_product and combination values resolved through product_attribute) instead of feature_product. Since a derived table is already a full SQL expression and not a table name, a new rawTable flag on the join mapping tells the builder to use it as-is, without prepending the prefix.

How to test

  1. On PrestaShop >= 9.3, enable the combination_feature_values feature flag.
  2. Create a feature and assign its values only to a product's combinations (not to the product itself).
  3. Add that feature to the filter template of the product's category.
  4. Front office: the feature appears in the faceted filters, with the combination values and correct product counts.

Feature filters now also take combination (product_attribute) feature
values into account, so a feature carried only by combinations appears
in the facets with correct product counts. Gated by PrestaShop >= 9.3
and the combination_feature_values feature flag.
Narrow the container to Psr\Container\ContainerInterface so PHPStan
resolves get() through an interface available on every PrestaShop
version, instead of the ContainerBuilder branch that is not resolvable
under the 9.0.3 analysis target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants