- Posts: 14
- Thank you received: 1
Price format in notification emails
3 years 3 months ago #352879
by LorenzoC
Price format in notification emails was created by LorenzoC
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.3.2
-- PHP version -- : 7.4
Dear support,
I correctly see price values in the frontend and in the Orders table in the backend. One euro is for example: 1,00
However, in the notification email, three more zeros are added. In the email template, I just use: {VAR:order.order_full_price}
Can someone advise me?
Kind regards
Lorenzo
-- Joomla version -- : 4.3.2
-- PHP version -- : 7.4
Dear support,
I correctly see price values in the frontend and in the Orders table in the backend. One euro is for example: 1,00
However, in the notification email, three more zeros are added. In the email template, I just use: {VAR:order.order_full_price}
Can someone advise me?
Kind regards
Lorenzo
Please Log in or Create an account to join the conversation.
3 years 3 months ago #352885
by nicolas
Replied by nicolas on topic Price format in notification emails
Hi,
That's normal. The dynamic tag you're using uses the data coming directly from the database and in the database the order_full_price column of the hikashop_order table has a type with 5 decimals.
Then, HikaShop rounds the price when displaying it to 2 decimals as per your currency settings.
Here, that second part isn't done.
So either:
- edit the structure of the hikashop_order table via your PHPMyAdmin access and change the number of decimals from 5 to 2 for that column.
- instead of using this tag, you could add PHP code like this:
That's normal. The dynamic tag you're using uses the data coming directly from the database and in the database the order_full_price column of the hikashop_order table has a type with 5 decimals.
Then, HikaShop rounds the price when displaying it to 2 decimals as per your currency settings.
Here, that second part isn't done.
So either:
- edit the structure of the hikashop_order table via your PHPMyAdmin access and change the number of decimals from 5 to 2 for that column.
- instead of using this tag, you could add PHP code like this:
Code:
<?php echo round($data->cart->order_full_price, 2); ?>
The following user(s) said Thank You: LorenzoC
Please Log in or Create an account to join the conversation.
3 years 3 months ago #352950
by LorenzoC
Replied by LorenzoC on topic Price format in notification emails
Awesome quick reply. SOLVED
Please Log in or Create an account to join the conversation.
Time to create page: 0.216 seconds