From cd005259caf0ea5a1efbc8ebd0c41f14dc3d7082 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Sat, 21 Apr 2018 16:52:59 +0300 Subject: [PATCH] - category - order --- models/Order.php | 2 ++ web/js/order.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/models/Order.php b/models/Order.php index 6e02aa3..79a0f6c 100755 --- a/models/Order.php +++ b/models/Order.php @@ -72,6 +72,8 @@ 'label_id', 'delivery_id', 'payment_id', + 'phone', + 'name' ], 'required', ], diff --git a/web/js/order.js b/web/js/order.js index eb23356..adbbb56 100755 --- a/web/js/order.js +++ b/web/js/order.js @@ -34,7 +34,8 @@ $(function() { var order = $(this) .data('id'); if (id.val() ) { - if(count.val()<=0) { + console.log(count.val()); + if(parseInt(count.val()) > 0) { var newCountVal = count.val(); } else { var newCountVal = 1; @@ -49,7 +50,6 @@ $(function() { }, function(data) { if (data.success) { var sum = $('#total-sum').text(); - console.log(sum); $('#total-sum') .html(parseInt(sum) + parseInt(data.price)); $('#product-rows') -- libgit2 0.21.4