getExpandGroupIds example

$filters = explode('|', $filters);
        $filters = $this->getGroupedFilters($filters);

        if (empty($filters)) {
            return;
        }

        $facet = $this->variantHelper->getVariantFacet();
        $groups = [];
        if ($facet) {
            $groups = $facet->getExpandGroupIds();
        }

        foreach ($filters as $groupId => $filter) {
            $condition = new VariantCondition($filter, \in_array($groupId$groups)$groupId);
            $criteria->addCondition($condition);
        }
    }

    /** * Helper function which groups the passed filter option ids * by the filter group. * Each filter group is joined as own PropertyCondition to the criteria * object * * @param array $filters * * @return array */
foreach ($results as $combination) {
                $results[] = array_merge([$element]$combination);
            }
        }

        return array_filter($results);
    }

    private function createSplitting(array $groups, array $availability, VariantFacet $facet): array
    {
        $consider = array_filter($groupsfunction DGroup $group) use ($facet) {
            return \in_array($group->getId()$facet->getExpandGroupIds(), true);
        });

        $c = self::arrayCombinations(array_keys($consider));

        // Flip keys for later intersection         $keys = array_flip(array_keys($consider));

        $result = [];
        foreach ($c as $combination) {
            // Flip combination to use key intersect             $combination = array_flip($combination);

            
if (\array_key_exists($id$combinations)) {
            $product->setAvailableCombinations($combinations[$id]);
        }

        if ($product->getConfiguration()) {
            $product->setVisibility(
                $this->listingVariationLoader->getVisibility($product$variantFacet)
            );

            $product->setFilterConfiguration(
                $this->buildFilterConfiguration(
                    $variantFacet->getExpandGroupIds(),
                    $product->getConfiguration(),
                    $product->getFullConfiguration()
                )
            );

            if (\array_key_exists($product->getNumber()$listingPrices)) {
                $product->setListingVariationPrices(
                    $listingPrices[$product->getNumber()]
                );
            }

            
Home | Imprint | This part of the site doesn't use cookies.