SP Booking Add New Currency - Question | JoomShaper

SP Booking Add New Currency

Yofie Setiawan

Yofie Setiawan

Extension 3 years ago

Hi,

How to add new currency which not listed on SP Booking default settings?

0
3 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #14558

Hello Yofie Setiawan

Please go to this location: administrator/components/com_spbooking/models/fields and add new currency in this spcurrency.php file.

Best regards

0
Yofie Setiawan
Yofie Setiawan
Accepted Answer
3 years ago #14559

Hi Thanks Ofi, that works.

Can i ask another related questions...

  1. How to add space between currency and numbers?
  2. How to remove ".00" on the back of the numbers?
0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #14601
  1. Please go to this location: components/com_spbooking/helpers/helper.php and find this line

public static function formatPrice($price, $currency = null, $format = null, $position = null, $allow_space = false, $decimal = 0, $dec_point = '.', $thousands_sep=',') {

then change it to

public static function formatPrice($price, $currency = null, $format = null, $position = null, $allow_space = true, $decimal = 0, $dec_point = '.', $thousands_sep=',') {

  1. Please go to these locations: components/com_spbooking/layouts/accomodations/grid/item.php, components/com_spbooking/layouts/accomodations/list/item.php and find this line

SpbookingHelper::formatPrice($accomodation->price_from, $accomodation->currency, $accomodation->currency_type, $accomodation->currency_position, false, 2); ?>

then change it to

SpbookingHelper::formatPrice($accomodation->price_from, $accomodation->currency, $accomodation->currency_type, $accomodation->currency_position, false, 0); ?>

0