El success
es el nombre de la callback
función y no la promise
.
Deberías usar:
$.ajax({
type: "POST",
url: "<?php echo site_url('con_product/ins_product'); ?>",
data: data,
success: function() {
alert("Products list is ready to be printed");
window.open("<?php echo site_url('con_product/print_product'); ?>","_blank");
window.open("<?php echo site_url('con_product/form_product'); ?>","_self");
}
});
O el done
promesa:
$.ajax({
type: "POST",
url: "<?php echo site_url('con_product/ins_product'); ?>",
data: data
}).done(function() {
alert("Products list is ready to be printed");
window.open("<?php echo site_url('con_product/print_product'); ?>","_blank");
window.open("<?php echo site_url('con_product/form_product'); ?>","_self");
});