$user_id = osc_logged_user_id();
$currency = osp_currency();
$symbol = osp_currency_symbol();
$packs = osp_get_user_packs($user_id);
$wallet = osp_get_wallet();
$style = (osp_param('pack_style') == 1 ? 'gallery' : 'list');
$group = ModelOSP::newInstance()->getGroup(osp_get_user_group());
@$user = User::newInstance()->findByPrimaryKey($user_id);
if($currency == 'BTC') {
$amount = isset($wallet['formatted_amount']) ? $wallet['formatted_amount'] : 0;
$formatted_amount = osp_format_btc($amount);
$credit_msg = sprintf(__('Buy Credit pack to save time with checkout. Your current credit is %s', 'osclass_pay'), '<strong>' . $formatted_amount . '</strong >');
} else {
$amount = isset($wallet['i_amount']) ? $wallet['i_amount'] : 0;
if($amount != 0) {
$formatted_amount = osp_format_price(osp_price_divide($amount)/1000000);
$credit_msg = sprintf(__('%s', 'osclass_pay'), '<strong style="margin:0 0 0 10px;clear: none;display:inline-block;font-size:14px;text-decoration:none;font-family:Open Sans,Arial,Helvetica,Verdana,sans-serif!important;font-weight: 500!important;">' . $formatted_amount . '</strong>');
} else {
$credit_msg = __('<strong style="margin:0 0 0 10px;clear: none;display:inline-block;font-size:14px;text-decoration:none;font-family: Open Sans,Arial,Helvetica,Verdana,sans-serif!important;font-weight: 500!important;">0.00 р. </strong>', 'osclass_pay');
}
}
function osp_user_sidebar() {
if(osc_current_web_theme() == 'veronika' || osc_current_web_theme() == 'stela' || osc_current_web_theme() == 'starter' || @USER_MENU_ICONS == 1 ) {
echo '<li class="opt_osp_payment"><a href="
https://test-site-test.com/payment/pack" ><i class="fas fa-wallet"></i> ' . __('<p style="color:#fff;">Wallet</p>', 'osclass_pay') . ' <strong style="font-family: Open Sans,Arial,Helvetica,Verdana,sans-serif!important;font-weight: 500!important;">
<?php echo $credit_msg; ?>
</strong></a></li>';
}
else {
echo '<li class="opt_osp_payment"><a href="' . osc_route_url('osp-item') . '" >' . __('Promotions', 'osclass_pay') . '</a></li>';
}
}