*

danads

  • ***
  • 43 posts
Button for user logged -- info in header
« on: November 21, 2019, 07:51:35 PM »
Can you help me with the formula to be displayed above how many credits / money he has in his wallet :
When users log in on top of the site (header) near favorites, number of ads where is the dollar to show (see pictures) the amount that the user has in the wallet.

Meanwhile I tried something with copy paste from plugin pay in header theme like this and I want to know if it's okay,
or it is wrong that I copied and the pay plugin it won't work well after this.....

Code: [Select]
<?php

$wallet 
osp_get_wallet();

if(
$currency == 'BTC') {
$amount = isset($wallet['formatted_amount']) ? $wallet['formatted_amount'] : 0;
$formatted_amount osp_format_btc($amount);

} else {
$amount = isset($wallet['i_amount']) ? $wallet['i_amount'] : 0;
if(
$amount != 0) {
$formatted_amount osp_format_price(osp_price_divide($amount)/1000000);
}
}
?>

Code: [Select]
<a class="alert tr1" title="<?php _e('Wallet''veronika'); ?>" href="<?php echo osc_route_url('osp-pack'); ?>"><i class="fa fa-money faa-horizontal animated" style="font-size:18px;"></i> <span class="counter"><?php echo $formatted_amount?></span></a>

*

MB Themes

Re: Button for user logged -- info in header
« Reply #1 on: November 25, 2019, 01:01:51 PM »
@danads
Your code looks pretty fine.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots