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

#   Bug in "Order notification" email preload

##

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile") Topic Author
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 746
-
- [](http://www.inphase.one)
-

7 years 6 months ago [\#306040](#306040) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  *[Bug in "Order notification" email preload](/forum/3-bug-report/897361-bug-in-order-notification-email-preload#306040 "-- HikaShop version -- : 4.0.3  Hi,  Line 431 is  and is throwing an error (at least in preview).  Obviously, it must be")* was created by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")*

-- HikaShop version -- : 4.0.3

Hi,

Line 431 is Code:

if(in_array($data-&gt;order-&gt;order_status, $unpaid_statuses) &amp;&amp; !empty($data-&gt;cart-&gt;order_payment_method) &amp;&amp; $data-&gt;cart-&gt;order_full_price &gt; 0 &amp;&amp; hikashop_level(1) &amp;&amp; $config-&gt;get('allow_payment_button', 1)) {

and is throwing an error (at least in preview).

Obviously, it must be Code:

if(in_array($data-&gt;order_status, $unpaid_statuses) &amp;&amp; !empty($data-&gt;cart-&gt;order_payment_method) &amp;&amp; $data-&gt;cart-&gt;order_full_price &gt; 0 &amp;&amp; hikashop_level(1) &amp;&amp; $config-&gt;get('allow_payment_button', 1)) {

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczNjEtYnVnLWluLW9yZGVyLW5vdGlmaWNhdGlvbi1lbWFpbC1wcmVsb2FkP3RtcGw9bWFya2Rvd24=) 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: 86564
- Thank you received: 14311
-
-

7 years 6 months ago [\#306041](#306041) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug in "Order notification" email preload](/forum/3-bug-report/897361-bug-in-order-notification-email-preload#306041 "-- HikaShop version -- : 4.0.3  Hi,  Line 431 is  and is throwing an error (at least in preview).  Obviously, it must be")*

Hi,

Thanks for your feedback.
It should actually be $data-&gt;cart instead of $data-&gt;order.
We'll change that for the next version.

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

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

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile") Topic Author
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 746
-
- [](http://www.inphase.one)
-

7 years 6 months ago -  7 years 6 months ago [\#306053](#306053) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Bug in "Order notification" email preload](/forum/3-bug-report/897361-bug-in-order-notification-email-preload#306053 "-- HikaShop version -- : 4.0.3  Hi,  Line 431 is  and is throwing an error (at least in preview).  Obviously, it must be")*

> nicolas wrote: It should actually be $data-&gt;cart instead of $data-&gt;order.

Yeah, sorry, wasn't thinking too much about it.

Though, then it's also wrong in...
- order_status_notification.preload.php, line 451
- order_creation_notification.preload.php, line 460

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

Last edit: 7 years 6 months ago by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTczNjEtYnVnLWluLW9yZGVyLW5vdGlmaWNhdGlvbi1lbWFpbC1wcmVsb2FkP3RtcGw9bWFya2Rvd24=) 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: 86564
- Thank you received: 14311
-
-

7 years 6 months ago [\#306106](#306106) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug in "Order notification" email preload](/forum/3-bug-report/897361-bug-in-order-notification-email-preload#306106 "-- HikaShop version -- : 4.0.3  Hi,  Line 431 is  and is throwing an error (at least in preview).  Obviously, it must be")*

Hi,

It's ok there as there is this code at the beginning of the preload: Code:

if(!isset($data-&gt;order)) $data-&gt;order = new stdClass(); $fs = array('order_number','order_discount_tax','order_shipping_tax','order_payment_tax','order_full_price','order_shipping_price','order_payment_price','order_discount_price','order_currency_id','order_status'); foreach($fs as $f) { if(!isset($data-&gt;order-&gt;$f)){ if(isset($data-&gt;$f)) $data-&gt;order-&gt;$f = $data-&gt;$f; else $data-&gt;order-&gt;$f = ''; } }

this code fills the $data-&gt;order variable with the necessary data in these two preload but not in order_notification so that's why these are not throwing any error.

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

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