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

#   Error Notice in Order status notification Email

##

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago -  11 years 4 months ago [\#206273](#206273) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  *[Error Notice in Order status notification Email](/forum/3-bug-report/877790-error-notice-in-order-status-notification-email#206273 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH&#95;COMPONENT - assumed 'JPATH&#95;COMPONENT' in /home/icxdev04/public&#95;html/libraries/legacy/view/legacy.php on line 164  I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.    I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.")* was created by *[icomex](/forum/user/4967-icomex "View icomex's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28
-- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH_COMPONENT - assumed 'JPATH_COMPONENT' in /home/icxdev04/public_html/libraries/legacy/view/legacy.php on line 164

I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.

**Notice: Use of undefined constant JPATH\_COMPONENT - assumed 'JPATH\_COMPONENT' in /home/icxdev04/public\_html/libraries/legacy/view/legacy.php on line 164**

I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.

Last edit: 11 years 4 months ago by [icomex](/forum/user/4967-icomex "View icomex's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 4 months ago [\#206302](#206302) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Error Notice in Order status notification Email](/forum/3-bug-report/877790-error-notice-in-order-status-notification-email#206302 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH&#95;COMPONENT - assumed 'JPATH&#95;COMPONENT' in /home/icxdev04/public&#95;html/libraries/legacy/view/legacy.php on line 164  I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.    I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.")*

Hi,

When is that message displayed ? In the email received by the customer ?
If you change the order status in the backend, and you enable the option to notify the customer, is that error displayed too ?

Could you try for testing purposes to add the line: define(JPATH_COMPONENT,'hikashop'); at the top of the preload part of the order status notification email ?

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#206363](#206363) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Error Notice in Order status notification Email](/forum/3-bug-report/877790-error-notice-in-order-status-notification-email#206363 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH&#95;COMPONENT - assumed 'JPATH&#95;COMPONENT' in /home/icxdev04/public&#95;html/libraries/legacy/view/legacy.php on line 164  I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.    I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.")*

It is in the customer notification email.

I will run the local status change test, and then add the line to the template preload and let you know what I learn. (I did verify that the template involved was using the declared 2.5.0 versions of the template code.)

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago -  11 years 4 months ago [\#206366](#206366) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Error Notice in Order status notification Email](/forum/3-bug-report/877790-error-notice-in-order-status-notification-email#206366 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH&#95;COMPONENT - assumed 'JPATH&#95;COMPONENT' in /home/icxdev04/public&#95;html/libraries/legacy/view/legacy.php on line 164  I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.    I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.")*

Changing the status in the back end and sending a customer notification did not produce the error.

Immediately making another purchase displayed the error as expected. Apparently it only happens during the automated PayPal confirmation after a purchase.

Adding the suggested line to the preload section of the email template and making another purchase ***changed*** the error:

**Notice: Use of undefined constant JPATH\_COMPONENT - assumed 'JPATH\_COMPONENT' in /home/icxdev04/public\_html/media/com\_hikashop/mail/order\_status\_notification.preload.modified.php on line 9**

Line 9 being the line where I added the provided line of code.

Last edit: 11 years 4 months ago by [icomex](/forum/user/4967-icomex "View icomex's Profile").

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#206406](#206406) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Error Notice in Order status notification Email](/forum/3-bug-report/877790-error-notice-in-order-status-notification-email#206406 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH&#95;COMPONENT - assumed 'JPATH&#95;COMPONENT' in /home/icxdev04/public&#95;html/libraries/legacy/view/legacy.php on line 164  I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.    I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.")*

OK, I have made the error go away but I have absolutely no idea how. But it did use your suggested line of code.

I was thinking through the sequence of events during a purchase/paypal payment/confirmation/thanks page and decided the only non-Hika code running between handing off to PayPal and sending the notification email could be our own custom plugin, which has a call for **onAfterOrderCreate** and **onAfterOrderUpdate** triggers. Now nowhere in that plugin is there a usage of JPATH_COMPONENT. In fact, the **onAfterOrderUpdate** only calls the DBO object and issues two direct queries to the database. That's it. Over the entire plugin, it loads the application, it loads the user and it loads the DBO. Nothing else that even uses a path as far as I know.

But putting your line Code:

define(JPATH_COMPONENT,'hikashop');

at the top of the plugin has made the error go away.

I have no idea how or why. But maybe that will help you track down the weirdness.
I'll include the plugin file, just in case it helps.

*This attachment is hidden for guests.
Please log in or register to see it.*

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

11 years 4 months ago [\#206402](#206402) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error Notice in Order status notification Email](/forum/3-bug-report/877790-error-notice-in-order-status-notification-email#206402 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28 -- Error-message(debug-mod must be tuned on) -- : Notice: Use of undefined constant JPATH&#95;COMPONENT - assumed 'JPATH&#95;COMPONENT' in /home/icxdev04/public&#95;html/libraries/legacy/view/legacy.php on line 164  I notice this after the 2.5.0 update on a development site - but I am not certain whether it was there immediately before.    I confirmed that I am using the default template for that email. It does not appear in other Order emails, including one which I customized. I am not sure how to correct this error, or even hide it without lowering the reporting error level.")*

There is a typo in the code provided by Xavier.
Try like this instead:
define('JPATH_COMPONENT','hikashop');

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

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