Call to a member function getCart() on null when editing user information

  • Posts: 59
  • Thank you received: 2
  • Hikashop Business
1 week 7 hours ago #312881

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.24
-- Browser(s) name and version -- : Google Chrome Version 78.0.3904.87 (Official Build) (64-bit)
-- Error-message(debug-mod must be tuned on) -- : Call to a member function getCart() on null
/mnt/data/vhosts/casite-584904.cloudaccess.net/httpdocs/administrator/components/com_hikashop/classes/address.php:246

Call stack
# Function Location
1 () JROOT/administrator/components/com_hikashop/classes/address.php:246
2 hikashopAddressClass->save() JROOT/administrator/components/com_hikashop/controllers/user.php:118
3 UserController->saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710
4 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:1976
5 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:72
6 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
9 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
10 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51

I haven't had to actually edit the customer information for awhile, so I'm not sure if this issue existed before I upgraded to the latest Hikashop version.

The 'Call to a member function getCart() on null' error appears when I click the OK button after editing the billing or shipping addresses after they are created.

I can create the billing/shipping address with no problems, but I cannot edit an existing one.

I set error reporting to maximum, and I pasted in the info that shows when I try to save an edit.

Thanks for any help.

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
6 days 18 hours ago #312894

Hi,

Thank you for the details.
You can change the line:
$checkoutHelper = hikashop_get('class.checkout');
To:
$checkoutHelper = hikashop_get('helper.checkout');
in the file /administrator/components/com_hikashop/classes/address.php and that will fix the problem.
We've added that patch on our end too so you can also download again the install package of HikaShop on our website and install it on yours to get the patch.

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

  • Posts: 59
  • Thank you received: 2
  • Hikashop Business
6 days 12 hours ago #312909

Yes that worked perfectly, thanks!

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

Time to create page: 0.053 seconds
Powered by Kunena Forum