Skip to content

Commit

Permalink
AMC-483: Dot not use option code as admin label in single store mode
Browse files Browse the repository at this point in the history
  • Loading branch information
magentix committed Nov 6, 2024
1 parent aa34142 commit c285398
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Helper/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function getStores($arrayKey = 'store_id')
continue;
}

if ($this->storeManager->isSingleStoreMode() && (int)$websiteId !== 0) {
if ($this->isSingleStoreMode() && (int)$websiteId !== 0) {
continue;
}

Expand Down Expand Up @@ -195,6 +195,14 @@ public function getStores($arrayKey = 'store_id')
return $data;
}

/**
* @return bool
*/
public function isSingleStoreMode(): bool
{
return $this->storeManager->isSingleStoreMode();
}

/**
* Retrieve all store combination
*
Expand Down
2 changes: 1 addition & 1 deletion Job/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public function insertSwatchOption(): void
/** @var string $value */
$value = 'labels-' . $local;

if ($this->configHelper->getOptionCodeAsAdminLabel() && $store['store_id'] == 0) {
if (!$this->storeHelper->isSingleStoreMode() && $this->configHelper->getOptionCodeAsAdminLabel() && $store['store_id'] == 0) {
$value = 'code';
}

Expand Down

0 comments on commit c285398

Please sign in to comment.