Error on add to cart and remove from mini cart

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
1 year 11 months ago #340762

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 3.10.6
-- PHP version -- : 7.4.28

I'm getting javascript errors when trying to add to cart or remove items from a saved cart via the mini cart. Any ideas? This is occurring for all users.

Screenshot:
www.evernote.com/l/ACjPLan1KpdGpJmV0wey7kIi70Zy0o2_3Ik

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 11 months ago #340763

Hi,

If you look at the response from the server for the AJAX add to cart request with your browser's developers tool you can see this:
i.imgur.com/2OyGT7b.png

0 Call to undefined method hikashopCartClass::getCartProductsInfo()
This function getCartProductsInfo is defined in the file administrator/components/com_hikashop/classes/cart.php and is used at only one place in HikaShop, in the file components/com_hikashop/controllers/product.php
Both are core files of HikaShop and that this function definitely exists (or the add to cart wouldn't work for anyone using HikaShop since the 4.5.0 has been released) in administrator/components/com_hikashop/classes/cart.php in the latest version of HikaShop (which you have).
So the only conclusion is that either the file administrator/components/com_hikashop/classes/cart.php was modified to remove that function (which I suppose isn't the case, or you would have figured out it came from your modifications), or that you're using an old version of the file administrator/components/com_hikashop/classes/cart.php. This could happen if the joomla installer couldn't replace the file during the update process because of wrong permissions on that file. In that case, you could delete the file and redo an install of the HikaShop install package to add back to correct version of that file.

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

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
1 year 11 months ago #340780

It was related to the customizations we had you do. I had failed to fully apply the patch to the cart.php on this website but didn't realize it. I've re-applied the patch and it is now working correctly. Thank you for steering me in the right direction!

The following user(s) said Thank You: Philip

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

Time to create page: 0.057 seconds
Powered by Kunena Forum