Add realtime cart update in sale and receiving (#1154)

This commit is contained in:
jekkos committed 2017-02-21 23:28:22 +01:00
1 parent 53dcdc02cf
commit e55b5a743a
2 files changed
+12 -1

No files matched your search

+6 -1
View File
@@ -188,7 +188,7 @@ if (isset($success))
}
?>
<td><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td>
<td><a href="javascript:document.getElementById('<?php echo 'cart_'.$line ?>').submit();" title=<?php echo $this->lang->line('receivings_update')?> ><span class="glyphicon glyphicon-refresh"></span></a></td>
<td><a href="javascript:$('#<?php echo 'cart_'.$line ?>').submit();" title=<?php echo $this->lang->line('receivings_update')?> ><span class="glyphicon glyphicon-refresh"></span></a></td>
</tr>
<tr>
<?php
@@ -516,6 +516,11 @@ $(document).ready(function()
}
}
}
$('[name="price"],[name="quantity"],[name="discount"]').focusout(function() {
var index = $(this).parents("tr").index() - 1;
$("#cart_" + index).submit();
});
});
</script>
+6
View File
@@ -695,6 +695,12 @@ $(document).ready(function()
}
}
}
$('[name="price"],[name="quantity"],[name="discount"]').focusout(function() {
var index = $(this).parents("tr").index() - 1;
$("#cart_" + index).submit();
});
});
function check_payment_type_giftcard()