Hi,
For your first issue, please add the code:
if(empty($_GET['redirect_popup'])){
$url = hikashop_currentURL();
if(strpos($url,'?')){
$url .='&';
}else{
$url .='?';
}
$js = 'parent.window.location.href=\''.$url.'redirect_popup=1\';setTimeout(function(){window.top.hikashop.closeBox();},200);';
echo '<html><head><script type="text/javascript">'.$js.'</script></head><body></body></html>';
exit;
}
after the line:
if($frontend && $ctrl == 'order' && JRequest::getString('task') == 'invoice' && !$app->isAdmin()){
in the file plugins/hikashop/attachinvoice/attachinvoice.php and that should fix it.
For your second question, you use $data->cart->products but this variable is actually called $order->products in the invoice PDF. Change it and it should work.