Skip to content

Commit

Permalink
Merge pull request #1209 from plentymarkets/feature/manufacturer_data…
Browse files Browse the repository at this point in the history
…_sets

add filtering to set components
  • Loading branch information
stentrop authored Dec 4, 2024
2 parents 32c5572 + 8ce8e17 commit 32b32ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Api/Resources/VariationResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace IO\Api\Resources;

use IO\Services\TemplateConfigService;
use Plenty\Modules\Webshop\ItemSearch\Helpers\ResultFieldTemplate;
use Plenty\Modules\Webshop\ItemSearch\SearchPresets\SingleItem;
use Plenty\Modules\Webshop\ItemSearch\SearchPresets\VariationList;
Expand Down Expand Up @@ -55,9 +56,11 @@ public function index(): Response

$resultFieldTemplate = $this->request->get('resultFieldTemplate', '');
if (strlen($resultFieldTemplate)) {
/** @var TemplateConfigService $templateConfigService */
$templateConfigService = pluginApp(TemplateConfigService::class);
$searchFactory->withResultFields(
ResultFieldTemplate::load('Webshop.ResultFields.' . $resultFieldTemplate)
);
)->withReducedManufacturerData($templateConfigService->get('item.manufacturer_data', 'all'));
}

$variations = $itemSearchService->getResults($searchFactory);
Expand Down

0 comments on commit 32b32ed

Please sign in to comment.