- Posts: 12
- Thank you received: 0
Decimal points
- Meilech DuBrow
- Topic Author
- Offline
- New Member
-
Less
More
12 years 10 months ago #20280
by Meilech DuBrow
Decimal points was created by Meilech DuBrow
For the pre-defined amounts, I don't want to show any decimal places--in other words, only dollar amount, no cents.
Right now, if I enter 10000, it shows $10,000.00. I want it to show $10,000
Which file do I modify to make this change?
Thank you.
Right now, if I enter 10000, it shows $10,000.00. I want it to show $10,000
Which file do I modify to make this change?
Thank you.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 10 months ago #20423
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Decimal points
Hi Meilech
Could you please send me the link to the page so that I can guide you ? Sorry for lately response, for some reasons, I didn't receive notification when you post this forum question !
Tuan
Could you please send me the link to the page so that I can guide you ? Sorry for lately response, for some reasons, I didn't receive notification when you post this forum question !
Tuan
Please Log in or Create an account to join the conversation.
- Avi
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
12 years 9 months ago #22150
by Avi
Replied by Avi on topic Re: Decimal points
Solution:
Look for
<input type="radio" name="rd_amount" class="inputbox" value="<?php echo $amount; ?>" <?php echo $checked ; ?> onclick="clearTextbox();" /><?php echo ' '.$this->config->currency_symbol.number_format($amount , 2) ;?>
in /components/com_jdonation/views/donation/tmpl/default.php
and change it to
<input type="radio" name="rd_amount" class="inputbox" value="<?php echo $amount; ?>" <?php echo $checked ; ?> onclick="clearTextbox();" /><?php echo ' '.$this->config->currency_symbol.number_format($amount) ;?>
By removing the ", 2" from after "$amount", you're saying that you do NOT want 2 numbers after a decimal to appear. See here for details: www.w3schools.com/php/func_string_number_format.asp
Look for
<input type="radio" name="rd_amount" class="inputbox" value="<?php echo $amount; ?>" <?php echo $checked ; ?> onclick="clearTextbox();" /><?php echo ' '.$this->config->currency_symbol.number_format($amount , 2) ;?>
in /components/com_jdonation/views/donation/tmpl/default.php
and change it to
<input type="radio" name="rd_amount" class="inputbox" value="<?php echo $amount; ?>" <?php echo $checked ; ?> onclick="clearTextbox();" /><?php echo ' '.$this->config->currency_symbol.number_format($amount) ;?>
By removing the ", 2" from after "$amount", you're saying that you do NOT want 2 numbers after a decimal to appear. See here for details: www.w3schools.com/php/func_string_number_format.asp
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 9 months ago #22168
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Decimal points
Thanks Avi for sharing the solution. I will try to work on a config option which allows changing currency format from configuration of Joom Donation next week so that you won't have to hack the code.
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Dang Thuc Dam, Dang Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.