public static function showPrice($arg)
{
$options = ['amount' => '', 'discount' => 0, 'thousandSuffix' => 1];
if (is_array($arg)) {
$options = $arg + $options;
if (isset($options['price'])) {
$options['amount'] = $options['price'];
}
} else {
$options['amount'] = $arg;
}
switch (config('app.payment_method')) {
case 'Points':
$points = self::thousandSuffix($options['amount']);
if ($options['thousandSuffix']) {
$points .= ' <small>' . trans('store.points') . '</small>';
}
return $points;
default:
setlocale(LC_MONETARY, config('app.lc_monetary'));
$format = '%i';
if ($options['discount']) {
$format = str_replace('##', $options['discount'], trans('product.globals.price_after_discount'));
}
return self::money_format($format, $options['amount']);
}
}