Skip to content

Commit 1e5ecc0

Browse files
committed
added Persoo bundle for product search
1 parent 5772e09 commit 1e5ecc0

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

src/Model/Product/Availability/ProductAvailabilityFacade.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public function getProductAvailabilityInformationByDomainId(Product $product, in
4545
$domainLocale = $this->domain->getDomainConfigById($domainId)->getLocale();
4646

4747
if ($this->isProductAvailableOnDomainCached($product, $domainId)) {
48-
return t('In stock', [], Translator::DEFAULT_TRANSLATION_DOMAIN, $domainLocale);
48+
return $this->getOnStockText($domainLocale);
4949
}
5050

51-
return t('Out of stock', [], Translator::DEFAULT_TRANSLATION_DOMAIN, $domainLocale);
51+
return $this->getOutOfStockText($domainLocale);
5252
}
5353

5454
/**
@@ -261,4 +261,22 @@ public function reset(): void
261261
{
262262
$this->productAvailabilityDomainCache = [];
263263
}
264+
265+
/**
266+
* @param string $domainLocale
267+
* @return string
268+
*/
269+
public function getOnStockText(string $domainLocale): string
270+
{
271+
return t('In stock', [], Translator::DEFAULT_TRANSLATION_DOMAIN, $domainLocale);
272+
}
273+
274+
/**
275+
* @param string $domainLocale
276+
* @return string
277+
*/
278+
public function getOutOfStockText(string $domainLocale): string
279+
{
280+
return t('Out of stock', [], Translator::DEFAULT_TRANSLATION_DOMAIN, $domainLocale);
281+
}
264282
}

0 commit comments

Comments
 (0)