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

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

##

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

Less More

- Posts: 75
- Thank you received: 7
-
-

7 years 1 week ago [\#312881](#312881) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  *[Call to a member function getCart() on null when editing user information](/forum/33-customers/898639-call-to-a-member-function-getcart-on-null-when-editing-user-information#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&#95;hikashop/classes/address.php:246  Call stack # Function Location 1 () JROOT/administrator/components/com&#95;hikashop/classes/address.php:246 2 hikashopAddressClass-&gt;save() JROOT/administrator/components/com&#95;hikashop/controllers/user.php:118 3 UserController-&gt;saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710 4 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:1976 5 hikashopController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/hikashop.php:72 6 require&#95;once() JROOT/libraries/src/Component/ComponentHelper.php:402 7 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377 8 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101 9 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159 10 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:196 11 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;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.")* was created by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")*

-- 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-&gt;save() JROOT/administrator/components/com_hikashop/controllers/user.php:118
3 UserController-&gt;saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710
4 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:1976
5 hikashopController-&gt;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-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
10 Joomla\CMS\Application\AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
11 Joomla\CMS\Application\CMSApplication-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2N1c3RvbWVycy84OTg2MzktY2FsbC10by1hLW1lbWJlci1mdW5jdGlvbi1nZXRjYXJ0LW9uLW51bGwtd2hlbi1lZGl0aW5nLXVzZXItaW5mb3JtYXRpb24/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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86560
- Thank you received: 14307
-
-

7 years 1 week ago [\#312894](#312894) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Call to a member function getCart() on null when editing user information](/forum/33-customers/898639-call-to-a-member-function-getcart-on-null-when-editing-user-information#312894 "-- 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&#95;hikashop/classes/address.php:246  Call stack # Function Location 1 () JROOT/administrator/components/com&#95;hikashop/classes/address.php:246 2 hikashopAddressClass-&gt;save() JROOT/administrator/components/com&#95;hikashop/controllers/user.php:118 3 UserController-&gt;saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710 4 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:1976 5 hikashopController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/hikashop.php:72 6 require&#95;once() JROOT/libraries/src/Component/ComponentHelper.php:402 7 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377 8 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101 9 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159 10 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:196 11 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2N1c3RvbWVycy84OTg2MzktY2FsbC10by1hLW1lbWJlci1mdW5jdGlvbi1nZXRjYXJ0LW9uLW51bGwtd2hlbi1lZGl0aW5nLXVzZXItaW5mb3JtYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 75
- Thank you received: 7
-
-

7 years 1 week ago [\#312909](#312909) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  Replied by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")* on topic *[Call to a member function getCart() on null when editing user information](/forum/33-customers/898639-call-to-a-member-function-getcart-on-null-when-editing-user-information#312909 "-- 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&#95;hikashop/classes/address.php:246  Call stack # Function Location 1 () JROOT/administrator/components/com&#95;hikashop/classes/address.php:246 2 hikashopAddressClass-&gt;save() JROOT/administrator/components/com&#95;hikashop/controllers/user.php:118 3 UserController-&gt;saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710 4 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:1976 5 hikashopController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/hikashop.php:72 6 require&#95;once() JROOT/libraries/src/Component/ComponentHelper.php:402 7 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377 8 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101 9 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159 10 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:196 11 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;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.")*

Yes that worked perfectly, thanks!

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

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

Less More

- Posts: 49
- Thank you received: 4
-
-

6 years 8 months ago [\#315772](#315772) by [sauvain](/forum/user/37052-sauvain "View sauvain's Profile")  Replied by *[sauvain](/forum/user/37052-sauvain "View sauvain's Profile")* on topic *[Call to a member function getCart() on null when editing user information](/forum/33-customers/898639-call-to-a-member-function-getcart-on-null-when-editing-user-information#315772 "-- 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&#95;hikashop/classes/address.php:246  Call stack # Function Location 1 () JROOT/administrator/components/com&#95;hikashop/classes/address.php:246 2 hikashopAddressClass-&gt;save() JROOT/administrator/components/com&#95;hikashop/controllers/user.php:118 3 UserController-&gt;saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710 4 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:1976 5 hikashopController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/hikashop.php:72 6 require&#95;once() JROOT/libraries/src/Component/ComponentHelper.php:402 7 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377 8 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101 9 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159 10 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:196 11 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;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.")*

I have the same problem as described in this ticket.
I changed the line as described:
$checkoutHelper = hikashop_get('class.checkout');
To:
$checkoutHelper = hikashop_get('helper.checkout');

There is no error anymore but the modification is not applied.

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

Less More

- Posts: 86560
- Thank you received: 14307
-
-

6 years 8 months ago [\#315777](#315777) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Call to a member function getCart() on null when editing user information](/forum/33-customers/898639-call-to-a-member-function-getcart-on-null-when-editing-user-information#315777 "-- 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&#95;hikashop/classes/address.php:246  Call stack # Function Location 1 () JROOT/administrator/components/com&#95;hikashop/classes/address.php:246 2 hikashopAddressClass-&gt;save() JROOT/administrator/components/com&#95;hikashop/controllers/user.php:118 3 UserController-&gt;saveaddress() JROOT/libraries/src/MVC/Controller/BaseController.php:710 4 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:1976 5 hikashopController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/hikashop.php:72 6 require&#95;once() JROOT/libraries/src/Component/ComponentHelper.php:402 7 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377 8 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101 9 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159 10 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:196 11 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;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.")*

Hi,

First, please download the install package of the 4.2.2 on our website and install it on yours. That way, you'll get all the latest patches.
Then please try to reproduce the issue, and if you do, please provide a link with precise instructions for us to be able to reproduce the issue.

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

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