Error on Checkout Confirmation using Joomla 4

  • Posts: 71
  • Thank you received: 0
  • Hikashop Business Hikashop Essential
3 years 2 weeks ago #336926

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 4.0.4
-- PHP version -- : 7.4.16
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()

Hi, we I complete my Joomla 4 checkout, the following error is shown;
Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()

What does this mean and how do I resolve this issue?

The error is shown on the following URL - pewter.raburt.co.nz/my-cart/checkout/confirm

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 2 weeks ago #336932

Hi,

This means that you've customized the "preload" section of some of your emails in the menu System>Emails. And you did this with an old version of HikaShop. And thus the PHP code in your customized "preload" is old code which doesn't support Joomla 4.

The simplest solution is to delete the file where the error happens so that you'll use the default preload of the email. However, you might lose some customization you had in place there. Not knowning what is in your customized preload, I can't say for sure what is the solution.
However, I think it's probable that you have the code

$app->isAdmin()
on the line of the error. And in that case, you can just replace it by:
hikashop_isClient('administrator')
and it will fix the error.
You can do that via FTP or editing the order creation notification email preload via the menu System>Emails.

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum