Skip to content

Commit

Permalink
Change id to code in adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreGauthier committed Feb 6, 2024
1 parent 03c38ec commit 77111ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Search/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function search(
): Result {
$data = [
'requestType' => '' !== $search ? 'product_search' : 'product_catalog',
'localizedCatalog' => $channel->getId() . '_' . $locale,
'localizedCatalog' => $channel->getCode() . '_' . $locale,
'currentCategoryId' => str_replace('/', '_', (string) $taxon->getCode()),
'search' => $search,
'currentPage' => $page,
Expand Down
4 changes: 2 additions & 2 deletions src/Service/IndexOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function createIndex(string $entityType, ChannelInterface $channel, Local
{
/** @var LocalizedCatalog $localizedCatalog */
$localizedCatalog = $this->localizedCatalogSynchronizer->getByIdentity(
$channel->getId() . $locale->getId()
$channel->getCode() . $locale->getId()
);
$indexData = [
'entityType' => $entityType,
Expand All @@ -56,7 +56,7 @@ public function getIndexByName(string $entityType, ChannelInterface $channel, Lo
{
/** @var LocalizedCatalog $localizedCatalog */
$localizedCatalog = $this->localizedCatalogSynchronizer->getByIdentity(
$channel->getId() . '_' . $locale->getCode()
$channel->getCode() . '_' . $locale->getCode()
);

$indices = $this->client->query(IndexApi::class, 'getIndexCollection');
Expand Down

0 comments on commit 77111ee

Please sign in to comment.