Hi,
The switching of the template is to check whether or not you have the problem with the default template or not. Not a solution.
It's just a temporary thing you can do for 2 minutes, or event better, do on a copy of the website so that you don't impact your live website at all.
It's indeed possible that it comes from a view override in the template leading to that error.
Alternatively, you could try renaming the folder template/YOUR_TEMPLATE/html/com_hikashop/product/ to deactivate all the view overrides on the products from your template and see if you still have the issue. If not, it means that the issue comes from one of the files in that folder. Otherwise, I would recommend updating your HikaShop as it's a really old one now. It's not even fully compatible with Joomla 3.9.x. You're lucky that it doesn't break.
With the new HikaShop, and the "add to cart legacy" setting turned off in the HikaShop configuration, as long as you don't have a view override on the add to cart system, this problem cannot happen.