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 | 34 | var order = $(this) |
35 | 35 | .data('id'); |
36 | 36 | if (id.val() ) { |
37 | - if(count.val()<=0) { | |
37 | + console.log(count.val()); | |
38 | + if(parseInt(count.val()) > 0) { | |
38 | 39 | var newCountVal = count.val(); |
39 | 40 | } else { |
40 | 41 | var newCountVal = 1; |
... | ... | @@ -49,7 +50,6 @@ $(function() { |
49 | 50 | }, function(data) { |
50 | 51 | if (data.success) { |
51 | 52 | var sum = $('#total-sum').text(); |
52 | - console.log(sum); | |
53 | 53 | $('#total-sum') |
54 | 54 | .html(parseInt(sum) + parseInt(data.price)); |
55 | 55 | $('#product-rows') | ... | ... |