22 lines
498 B
PHP
22 lines
498 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace External\CykloSpecialityBundle\Context;
|
|
|
|
use KupShop\KupShopBundle\Util\Contexts;
|
|
|
|
class CurrencyContext extends \KupShop\I18nBundle\Context\CurrencyContext
|
|
{
|
|
protected function loadActive()
|
|
{
|
|
if ($user = Contexts::get(\KupShop\KupShopBundle\Context\UserContext::class)->getActive()) {
|
|
if (!empty($user->currency)) {
|
|
return $user->currency;
|
|
}
|
|
}
|
|
|
|
return parent::loadActive();
|
|
}
|
|
}
|