Back to PhocacartCurrency class

Method getCurrenciesSelectBox

public static
getCurrenciesSelectBox
()

Method getCurrenciesSelectBox - Source code

public static function getCurrenciesSelectBox()
{
    $session = Factory::getSession();
    $active = $session->get('currency', 0, 'phocaCart');
    if ((int) $active < 1) {
        $active = self::getDefaultCurrency();
    }
    $currencies = self::getAllCurrencies();
    $o = '';
    if (!empty($currencies)) {
        $o = HTMLHelper::_('select.genericlist', $currencies, 'id', 'class="form-select chosen-select ph-input-select-currencies"', 'value', 'text', $active);
    }
    return $o;
}