Hi,
1. The modification will make the button return to the previous page. That's all. Not return to the last listing page. To have it return to the last page before the checkout change that code to:
echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,$_SESSION['previous_url'],'window.location=\''.$_SESSION['previous_url'].'\';return false;','id="hikashop_checkout_shopping_button"');
and then edit the files "show" and "listing" of the view "product" via the menu Display>Views and add that line at the beginning:
<?php $_SESSION['previous_url'] = hikashop_currentURL(); ?>
2. This has nothing to do with the modification. Update your HikaShop and that should solve the error.