Skip to content
Permalink
2a61c0a1da
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (14 sloc) 559 Bytes
$(document).ready(function() {
$("#add_line_item_to_order").on("click", function() {
if($('#add_variant_id').val() == ''){ return false; }
update_target = '#' + $(this).attr("data-update");
$.post(this.href,
{ "line_item[variant_id]": $('#add_variant_id').val(),
"line_item[quantity]": $('#add_quantity').val() },
function(data) {
$(update_target).html(data);
});
return false;
});
$('[data-hook="add_product_name"]').find(".variant_autocomplete").variantAutocomplete();
});