- Posts: 5
- Thank you received: 0
Language problem: Contact form
-
natt
Inactive member - Topic Author
- New Member
Less
More
1 year 8 months ago #50278
by natt
Replied by natt on topic Language problem: Contact form
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6742
- Thank you received: 715
1 year 8 months ago #50282
by milos
Replied by milos on topic Language problem: Contact form
Hello,
To change the number format, please edit files:
/templates/sparky_framework/html/com_content/featured/default_item.php
/templates/sparky_framework/html/com_content/category/blog_item.php
/templates/sparky_framework/html/com_content/article/default.php
and change this:
to this:
In number_format function, there are 4 parameters:
$field->value -> this is value
2 -> this is number of decimal places
, -> decimal separator
. -> thousands separator
More details here: php.net/manual/en/function.number-format.php
Regards,
Milos
To change the number format, please edit files:
/templates/sparky_framework/html/com_content/featured/default_item.php
/templates/sparky_framework/html/com_content/category/blog_item.php
/templates/sparky_framework/html/com_content/article/default.php
and change this:
Code:
if( $field->label == "Price") {
echo '<div class="price">' . $template->params->get('currencySymbol', '$') . number_format($field->value) . '</div>';
}
to this:
Code:
if( $field->label == "Price") {
echo '<div class="price">' . $template->params->get('currencySymbol', '$') . number_format($field->value, 2, ',', '.') . '</div>';
}
In number_format function, there are 4 parameters:
$field->value -> this is value
2 -> this is number of decimal places
, -> decimal separator
. -> thousands separator
More details here: php.net/manual/en/function.number-format.php
Regards,
Milos
The following user(s) said Thank You: natt
Please Log in to join the conversation.
Time to create page: 0.115 seconds