- Posts: 366
- Thank you received: 26
Get $amount, but without prefix
5 years 9 months ago #327203
by Thrane
Get $amount, but without prefix was created by Thrane
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4
Hi
I'm making some changes in the Order Creation Notification e-mail and would like to display the total amount like $amount, but without the currency prefix - is this possible?
Kind regards
Thomas
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4
Hi
I'm making some changes in the Order Creation Notification e-mail and would like to display the total amount like $amount, but without the currency prefix - is this possible?
Kind regards
Thomas
Please Log in or Create an account to join the conversation.
5 years 9 months ago #327207
by nicolas
Replied by nicolas on topic Get $amount, but without prefix
It sure is.
You can use the tag {VAR:order.order_full_price}
However, this might display the price with more decimals than you want.
So a better solution might be:
You can use the tag {VAR:order.order_full_price}
However, this might display the price with more decimals than you want.
So a better solution might be:
Code:
<?php echo round($data->cart->order_full_price,2); ?>
Please Log in or Create an account to join the conversation.
5 years 9 months ago #327243
by Thrane
Replied by Thrane on topic Get $amount, but without prefix
Great!
And it works!
I tried the same on the override of banktransfer_end.php, but with no result.
Tried both of these:
<?php echo JText::_($this->order_full_price);?>
<?php echo round($data->cart->order_full_price,2); ?>
Any hints?
Regards
Thomas
And it works!
I tried the same on the override of banktransfer_end.php, but with no result.
Tried both of these:
<?php echo JText::_($this->order_full_price);?>
<?php echo round($data->cart->order_full_price,2); ?>
Any hints?
Regards
Thomas
Please Log in or Create an account to join the conversation.
5 years 9 months ago - 5 years 9 months ago #327268
by Philip
Replied by Philip on topic Get $amount, but without prefix
Hello,
This is because the data isn't arranged the same every time.
In order to have what you required, don't forget that you can add a "var_dump(this)" in order to see your available data.
Note : Don't do this on an website in production phase on a page that customer can reached, because this display sometime lots of data.
Here, for what you required I think this will fit your expectations :
Regards
This is because the data isn't arranged the same every time.
In order to have what you required, don't forget that you can add a "var_dump(this)" in order to see your available data.
Note : Don't do this on an website in production phase on a page that customer can reached, because this display sometime lots of data.
Here, for what you required I think this will fit your expectations :
Code:
echo $this->order->order_full_price; echo ' '.$this->currency->currency_symbol;
Regards
Last edit: 5 years 9 months ago by Philip.
Please Log in or Create an account to join the conversation.
5 years 9 months ago #327305
by Thrane
Replied by Thrane on topic Get $amount, but without prefix
Perfect!
Thank you
Thank you
Please Log in or Create an account to join the conversation.
Time to create page: 0.165 seconds