You have bookmarked items
Jump To:
Viewing Topic "How to disable decimals in price options?"

4 Item(s)     Sort:  Newest Oldest

per page
 
  Post
Posted By: IG
Total Posts: 4
Joined Date: Mar 16, 2019

I'm working in a project to an African country with a lower currency (1USD=350) and so I wantn to hide or disable the decimal part of the price, as it is not used. How can I do that?


Tks.

Posted : Mar 16, 2019
Posted By: Mike Barr
Total Posts: 342
Joined Date: Jun 25, 2013

Hi, 

We don't have the setting for this, however, you can change the format in the code. We have one function that formats the displayed amount.

You can change this in component/com_jbusinessdirectory/assets/utils.php 
Search for the function getPriceFormat and change


$amountString = number_format($amount , 2 , $dec_point, $thousands_sep);


to


$amountString = number_format($amount , 0 , $dec_point, $thousands_sep);

Posted : Mar 18, 2019
Posted By: IG
Total Posts: 4
Joined Date: Mar 16, 2019

Thank you.

And how can I edit the Default Time Zone indications, in order to add also the locations related to the directory? For example: change the GMT: +1 from "Brussels, Copenhagen, Madrid, Paris" to "Brazzaville, Windhoek, Luanda, Kinshasa". I can't find this in the language files of the component, and the core Joomla files are different.

Tks

 

[UPDATE: I've got it: I can edit it in the same utils.php file. SOLVED]

 



Posted : Mar 18, 2019
Posted By: Mike Barr
Total Posts: 342
Joined Date: Jun 25, 2013

You're welcome. Let us know if anything else 

Posted : Mar 19, 2019

4 Item(s)     Sort:  Newest Oldest

per page
 

Viewing Topic "How to disable decimals in price options?"


      You have bookmarked items
Jump To:

Who is online

 
Users browsing this topic 1 logged customers:: 0 and guest 1 (based on users active over the past 5 minutes)