상품금액이 0원일 때 쿠폰 적용 오류 안내 코드 추가

This commit is contained in:
chicpro
2013-12-09 11:39:16 +09:00
parent 1b16512ddb
commit 153b19b1f8
3 changed files with 12 additions and 1 deletions

View File

@ -909,6 +909,10 @@ $(function() {
$("#od_coupon_frm").remove();
var $this = $(this);
var price = parseInt($("input[name=org_od_price]").val()) - parseInt($("input[name=item_coupon]").val());
if(price <= 0) {
alert('상품금액이 0원이므로 쿠폰을 사용할 수 없습니다.');
return false;
}
$.post(
"./ordercoupon.php",
{ price: price },

View File

@ -4,7 +4,10 @@ include_once('./_common.php');
if($is_guest)
exit;
$price = $_POST['price'];
$price = (int)$_POST['price'];
if($price <= 0)
echo '상품금액이 0원이므로 쿠폰을 사용할 수 없습니다.';
// 쿠폰정보
$sql = " select *

View File

@ -1172,6 +1172,10 @@ $(function() {
$("#od_coupon_frm").remove();
var $this = $(this);
var price = parseInt($("input[name=org_od_price]").val()) - parseInt($("input[name=item_coupon]").val());
if(price <= 0) {
alert('상품금액이 0원이므로 쿠폰을 사용할 수 없습니다.');
return false;
}
$.post(
"./ordercoupon.php",
{ price: price },