calling Endpoint to get the correct invoice
localStorage.setItem("invoicedata","https://sac.247erp.com/invoice/pdf?id="+_orderid);
console.log("_invoicedata ="+ _invoicedata);
console.log("_orderid ="+ _orderid);
});
/* $(".button.invoice").attr("target","_blank");
$(".button.view").attr("href","#");
$(".button.view").attr("data",$(".button.invoice").attr("href"));
$(".button.view").click(function() {
localStorage.setItem("invoicedata",$(".button.view").attr("data"));
});*/
});
$(".post-type-archive-product .products").on("click", ".quantity input", function() {
return false;
});
$(".post-type-archive-product .products").on("change input", ".quantity .qty", function() {
var add_to_cart_button = $(this).parents( ".product" ).find(".add_to_cart_button");
// For AJAX add-to-cart actions
add_to_cart_button.data("quantity", $(this).val());
// For non-AJAX add-to-cart actions
add_to_cart_button.attr("href", "?add-to-cart=" + add_to_cart_button.attr("data-product_id") + "&quantity=" + $(this).val());
});
// Trigger on Enter press
$(".post-type-archive-product .products").on("keypress", ".quantity .qty", function(e) {
if ((e.which||e.keyCode) === 13) {
$( this ).parents(".product").find(".add_to_cart_button").trigger("click");
}
});
});
-->