mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-15 06:39:33 +00:00
Adapt Buerklin-provider to new settings system: add missing instance of BuerklinSettings
This commit is contained in:
parent
ac0c83a311
commit
aed7632d25
1 changed files with 3 additions and 2 deletions
|
|
@ -54,6 +54,7 @@ class BuerklinProvider implements InfoProviderInterface
|
||||||
private readonly HttpClientInterface $client,
|
private readonly HttpClientInterface $client,
|
||||||
private readonly OAuthTokenManager $authTokenManager,
|
private readonly OAuthTokenManager $authTokenManager,
|
||||||
private readonly CacheItemPoolInterface $partInfoCache,
|
private readonly CacheItemPoolInterface $partInfoCache,
|
||||||
|
private readonly BuerklinSettings $settings,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -129,7 +130,7 @@ class BuerklinProvider implements InfoProviderInterface
|
||||||
|
|
||||||
$cacheKey = sprintf(
|
$cacheKey = sprintf(
|
||||||
'buerklin.product.%s',
|
'buerklin.product.%s',
|
||||||
md5($code . '|' . $this->language . '|' . $this->currency)
|
md5($code . '|' . $this->settings->language . '|' . $this->settings->currency)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($this->productCache[$cacheKey])) {
|
if (isset($this->productCache[$cacheKey])) {
|
||||||
|
|
@ -276,7 +277,7 @@ class BuerklinProvider implements InfoProviderInterface
|
||||||
|
|
||||||
if (!is_array($prices) || count($prices) === 0) {
|
if (!is_array($prices) || count($prices) === 0) {
|
||||||
$pVal = $product['price']['value'] ?? null;
|
$pVal = $product['price']['value'] ?? null;
|
||||||
$pCur = $product['price']['currencyIso'] ?? ($this->currency ?: 'EUR');
|
$pCur = $product['price']['currencyIso'] ?? ($this->settings->currency ?: 'EUR');
|
||||||
|
|
||||||
if (is_numeric($pVal)) {
|
if (is_numeric($pVal)) {
|
||||||
$prices = [
|
$prices = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue