Hi,
Please try to add the code:
foreach($doc->_custom as $custom) {
if($custom_already){
$custom_already--;
continue;
}
$custom = preg_replace('#<script .*type="text/javascript" src=".*"></script>#iU', '', $custom);
$custom = preg_replace('#<script .*type=[\'"]text/javascript[\'"]>#iU', '<script type="text/javascript">', $custom);
$custom = str_replace(
array('<script type="text/javascript">', '</script>'),
array('<script type="text/javascript">setTimeout(function(){', '},20);</script>'),
$custom);
echo $custom;
}
foreach($doc->_script as $script) {
if($script_already){
$script_already--;
continue;
}
echo '<script type="text/javascript">'."\r\n".$script."\r\n".'</script>';
}
after the code:
$add_to_cart = hikashop_getLayout('product','add_to_cart_listing',$params,$js);
echo $add_to_cart;
in the file plugins/system/hikashopproductinsert/hikashopproductinsert_view.php and see if that helps.