Commit cd005259caf0ea5a1efbc8ebd0c41f14dc3d7082
1 parent
72e5c0d7
- category
- order
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
models/Order.php
web/js/order.js
@@ -34,7 +34,8 @@ $(function() { | @@ -34,7 +34,8 @@ $(function() { | ||
34 | var order = $(this) | 34 | var order = $(this) |
35 | .data('id'); | 35 | .data('id'); |
36 | if (id.val() ) { | 36 | if (id.val() ) { |
37 | - if(count.val()<=0) { | 37 | + console.log(count.val()); |
38 | + if(parseInt(count.val()) > 0) { | ||
38 | var newCountVal = count.val(); | 39 | var newCountVal = count.val(); |
39 | } else { | 40 | } else { |
40 | var newCountVal = 1; | 41 | var newCountVal = 1; |
@@ -49,7 +50,6 @@ $(function() { | @@ -49,7 +50,6 @@ $(function() { | ||
49 | }, function(data) { | 50 | }, function(data) { |
50 | if (data.success) { | 51 | if (data.success) { |
51 | var sum = $('#total-sum').text(); | 52 | var sum = $('#total-sum').text(); |
52 | - console.log(sum); | ||
53 | $('#total-sum') | 53 | $('#total-sum') |
54 | .html(parseInt(sum) + parseInt(data.price)); | 54 | .html(parseInt(sum) + parseInt(data.price)); |
55 | $('#product-rows') | 55 | $('#product-rows') |