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

#   Discrepancy between Order notifications

##

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

Less More

- Posts: 14
- Thank you received: 1
-
-

3 years 4 months ago -  3 years 4 months ago [\#353199](#353199) by [LorenzoC](/forum/user/67074-lorenzoc "View LorenzoC's Profile")  *[Discrepancy between Order notifications](/forum/26-product-category-display/906684-discrepancy-between-order-notifications#353199 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.3.2 -- PHP version -- : 7.4  Dear support, I'm working on my first project with Hikashop Business and I'm quite happy with it.  I need your help to understand why admin emails are different from user ones: I use the same code for both:  I have &quot;Order administrator notification&quot; for shop owners that returns:  I have &quot;Order status notification&quot; for users that returns:  &#42; Why doesn't the date script for users work? If I remove the php error show, the date is blank  &#42; Why admin status is Created instead of Confirmed?  &#42; Why does the € format show 1 € instead of 1,00 € ?  Kindest regards Lorenzo")* was created by *[LorenzoC](/forum/user/67074-lorenzoc "View LorenzoC's Profile")*

-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.3.2
-- PHP version -- : 7.4

Dear support,
I'm working on my first project with Hikashop Business and I'm quite happy with it.

I need your help to understand why admin emails are different from user ones:
I use the same code for both: Code:

&lt;p&gt;&lt;strong&gt;ID: &lt;/strong&gt;{VAR:order.order_id}&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Date: &lt;/strong&gt;&lt;?php echo hikashop_getDate($data-&gt;order_created); ?&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Total: &lt;/strong&gt;&lt;?php echo round($data-&gt;cart-&gt;order_full_price, 2); ?&gt; €&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Status: &lt;/strong&gt;&lt;?php echo $data-&gt;mail_status; ?&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Email:&lt;/strong&gt; {VAR:customer.user_email}&lt;/p&gt;

I have "Order administrator notification" for shop owners that returns:

> ID: 30
> Date: 07-07-2023 15:57
> Total: 1 €
> Status: Created

I have "Order status notification" for users that returns:

> ID: 30
> Date: Notice: Undefined property: stdClass::$order\_created in media/com\_hikashop/mail/order\_status\_notification.html.modified.php on line 25
> Total: 1 €
> Status: Confirmed

1. Why doesn't the date script for users work? If I remove the php error show, the date is blank
2. Why admin status is Created instead of Confirmed?
3. Why does the € format show 1 € instead of 1,00 € ?

Kindest regards
Lorenzo

Last edit: 3 years 4 months ago by [LorenzoC](/forum/user/67074-lorenzoc "View LorenzoC's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY2ODQtZGlzY3JlcGFuY3ktYmV0d2Vlbi1vcmRlci1ub3RpZmljYXRpb25zP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

3 years 4 months ago [\#353204](#353204) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Discrepancy between Order notifications](/forum/26-product-category-display/906684-discrepancy-between-order-notifications#353204 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.3.2 -- PHP version -- : 7.4  Dear support, I'm working on my first project with Hikashop Business and I'm quite happy with it.  I need your help to understand why admin emails are different from user ones: I use the same code for both:  I have &quot;Order administrator notification&quot; for shop owners that returns:  I have &quot;Order status notification&quot; for users that returns:  &#42; Why doesn't the date script for users work? If I remove the php error show, the date is blank  &#42; Why admin status is Created instead of Confirmed?  &#42; Why does the € format show 1 € instead of 1,00 € ?  Kindest regards Lorenzo")*

Hi,

1. $data contains the data of the order being saved to the database. When the order administrator notification email is sent, the order is being created and thus $data contains all the order data. When the order status notification email is sent, the order status is being updated from created to updated, and so only the data which is being modified is available in $data. In that second case, the whole data is available in $data-&gt;cart

2. Because the email is sent when the order is created, not when it is being confirmed. HikaShop sends 4 emails:
- the "order creation notification" to the user when the order is created
- the "order admin notification" to the admin when the order is created
- the "order status notification" to the user when the order status is changed automatically from "created" to "confirmed" by a payment method receiving a notification of payment or when you manually change the status of an order and activate the nofitication of the user
- the "payment notification" to the admin when a payment method receives a payment notification. It will even send it when the payment is refused of when there is a problem with the notification so that the admin can check if there is something wrong

3. The round function returns the number as a float:
[ www.php.net/manual/en/function.round.php](https://www.php.net/manual/en/function.round.php)
Then, you do an echo on that float and in that case, PHP itself displays it the way it want.
If you want a display where you have more control on the format, you want to use number_format to convert the float to a string before the echo :
[ www.php.net/manual/en/function.number-format.php](https://www.php.net/manual/en/function.number-format.php)

The following user(s) said Thank You: [LorenzoC](/forum/user/67074-lorenzoc "View LorenzoC's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY2ODQtZGlzY3JlcGFuY3ktYmV0d2Vlbi1vcmRlci1ub3RpZmljYXRpb25zP3RtcGw9bWFya2Rvd24=) 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.041 seconds

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