Add space character before/after currency symbol

  • Tuan Pham Ngoc
  • Topic Author
  • Offline
  • Administrator
  • Administrator
More
6 years 1 month ago #110080 by Tuan Pham Ngoc
Add space character before/after currency symbol was created by Tuan Pham Ngoc
If you want to add space character before or after currency symbol in event price display, you can use this override:

1. Create a folder called override under components/com_eventbooking/helper
2. Get this file, unzip it, upload the receive file to that folder

Regards,

Tuan
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #114631 by Mick Graham
Replied by Mick Graham on topic Add space character before/after currency symbol
Get what file?

Please Log in or Create an account to join the conversation.

More
5 years 8 months ago #115511 by Petter
Hi Tuan,

There is already a helper.php in that folder; it seems to address fees for group registration etc.

Can these two be merged together somehow?

Rgds,

Petter

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Topic Author
  • Offline
  • Administrator
  • Administrator
More
5 years 8 months ago #115557 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add space character before/after currency symbol
Hi Petter

Yes. You can just get this code and place it inside the existing class
Code:
public static function formatCurrency($amount, $config, $currencySymbol = null) { $decimals = isset($config->decimals) ? $config->decimals : 2; $dec_point = isset($config->dec_point) ? $config->dec_point : '.'; $thousands_sep = isset($config->thousands_sep) ? $config->thousands_sep : ','; $symbol = $currencySymbol ? $currencySymbol : $config->currency_symbol; return $config->currency_position ? (number_format($amount, $decimals, $dec_point, $thousands_sep) . ' ' . $symbol) : ($symbol . ' ' . number_format($amount, $decimals, $dec_point, $thousands_sep)); }

Regards,

Tuan

Please Log in or Create an account to join the conversation.