[Skip to main content](#vessel-content)

#   Total Price In Email

##

- **[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")**
- [![nic7071's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42433-nic7071 "View nic7071's Profile") Topic Author
- [ Offline](/forum/user/42433-nic7071)

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago -  9 years 2 months ago [\#277010](#277010) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277010 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")* was created by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")*

hi,
i got some questions and need some codes and help in customizing my email tempales.

**1.**
i'd like to add a custom variable to show total price inside couple of hikashop email templates.
i think i have to define that in preload file and then add the echo code in html
how can i do that ?
by total price i mean the price that user has paid
total price - coupoun discount - point discount + shipping costs
and any other changes !

Thanks

Last edit: 9 years 2 months ago by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")**
- [![nic7071's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42433-nic7071 "View nic7071's Profile") Topic Author
- [ Offline](/forum/user/42433-nic7071)

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago -  9 years 2 months ago [\#277022](#277022) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  Replied by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")* on topic *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277022 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")*

**2.**

this code :
&lt;?php echo hikashop_getDate($data-&gt;cart-&gt;order_created); ?&gt;
is returning Shamsi/Persian Date in Admin notification email
but in Status notification email this code is returning English Date Format.
i want a code to return the order creation date in Shamsi/Persian Format in StatusNotification Email !

P.S: My Joomla Admin is in English and my Joomla Front End is in Persian RTL format!

Last edit: 9 years 2 months ago by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")**
- [![nic7071's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42433-nic7071 "View nic7071's Profile") Topic Author
- [ Offline](/forum/user/42433-nic7071)

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago -  9 years 2 months ago [\#277027](#277027) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  Replied by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")* on topic *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277027 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")*

**3.**
i'd like to show the name of order statuses instead of namekey.
cause it looks like i cannot change the name key but i have changed the name of my statuses and i want to use my status names instead of name keys inside my email templates.

is it possible ?

Last edit: 9 years 2 months ago by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

9 years 2 months ago -  9 years 2 months ago [\#277014](#277014) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277014 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")*

Hi,

1.
I don't understand what you mean by total price.
The total price is available like that in the HTML version of the email:
&lt;?php echo $data-&gt;cart-&gt;order_full_price; ?&gt;

This already includes the shipping costs, the points and coupon discounts, etc. It'a actually already displayed in the email and labelled as "total", so I'm not sure what you're trying to do.

2.
The second parameter of the hikashop_getDate function is the format:
[ php.net/manual/en/function.date.php](http://php.net/manual/en/function.date.php)
You can use the same formats than the examples there with the hikashop_getDate function so you can set exactly the format you want.

3.
Both the name and the namekey are available in the table #__hikashop_orderstatuses.
So you can load the corresponding row from that table with a MySQL query to get the name based on the namekey.

Last edit: 9 years 2 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")**
- [![nic7071's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42433-nic7071 "View nic7071's Profile") Topic Author
- [ Offline](/forum/user/42433-nic7071)

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago [\#277099](#277099) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  Replied by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")* on topic *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277099 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")*

Hi Nicolas,
Thanks for your answer.
1.
i'm using the code u mentioned and it's working,
any way it's returning number like this: 5102000.00000
can i remove the additional zeros and add thousand separator like this: 5,102,000

2.
Thanks to the article you introduced it's done.

3.
can you tell me the code that echoes the Name of Order Statuses instead of name keys ?
i'm currently using this code and this is returning the namekey.

{VAR:order.order_status}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

9 years 2 months ago [\#277106](#277106) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277106 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")*

Hi,

1.
Sure. You can use the number_format function of PHP for that:
[ php.net/manual/en/function.number-format.php](http://php.net/manual/en/function.number-format.php)

3.
This one:
&lt;?php echo $data-&gt;mail_status; ?&gt;

The following user(s) said Thank You: [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")**
- [![nic7071's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42433-nic7071 "View nic7071's Profile") Topic Author
- [ Offline](/forum/user/42433-nic7071)

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago [\#277197](#277197) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  Replied by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")* on topic *[Total Price In Email](/forum/35-orders-management/891701-total-price-in-email#277197 "hi, i got some questions and need some codes and help in customizing my email tempales.  1. i'd like to add a custom variable to show total price inside couple of hikashop email templates. i think i have to define that in preload file and then add the echo code in html how can i do that ? by total price i mean the price that user has paid total price - coupoun discount - point discount + shipping costs and any other changes !  Thanks")*

Thanks Man ![;-)](/media/kunena/emoticons/24.png ";-)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MTcwMS10b3RhbC1wcmljZS1pbi1lbWFpbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.070 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
