영카트 바로주문 새창띄우는 방법좀 ㅠㅠ.. 채택완료

Copy
<div style="text-align:center; padding:15px 0;">					<?php if ($is_orderable) { ?>						<input type="submit" onclick="document.pressed=this.value;" value="바로구매" class="btn btn-<?php echo $btn2;?> btn-lg">						<input type="submit" onclick="document.pressed=this.value;" value="장바구니" class="btn btn-<?php echo $btn1;?> btn-lg">						<?php if ($naverpay_button_js) { ?>							<div style="margin-top:20px;"><?php echo $naverpay_request_js.$naverpay_button_js; ?></div>						<?php } ?>					<?php } ?>					<?php if(!$is_orderable && $it['it_soldout'] && $it['it_stock_sms']) { ?>						<button type="button" onclick="popup_stocksms('<?php echo $it['it_id']; ?>','<?php echo $ca_id; ?>');" class="btn btn-primary">재입고알림(SMS)</button>					<?php } ?>				</div>				</form> 				<script>					// BS3					$(function() {						$("select.it_option").addClass("form-control input-sm");						$("select.it_supply").addClass("form-control input-sm");					}); 					// 재입고SMS 알림					function popup_stocksms(it_id, ca_id) {						url = "./itemstocksms.php?it_id=" + it_id + "&ca_id=" + ca_id;						opt = "scrollbars=yes,width=616,height=420,top=10,left=10";						popup_window(url, "itemstocksms", opt);					} 					// 바로구매, 장바구니 폼 전송					function fitem_submit(f) {						if (document.pressed == "장바구니") {							f.sw_direct.value = 0;						} else { // 바로구매							f.sw_direct.value = 1;						} 						// 판매가격이 0 보다 작다면						if (document.getElementById("it_price").value < 0) {							alert("전화로 문의해 주시면 감사하겠습니다.");							return false;						} 						if($(".it_opt_list").size() < 1) {							alert("선택옵션을 선택해 주십시오.");							return false;						} 						var val, io_type, result = true;						var sum_qty = 0;						var min_qty = parseInt(<?php echo $it['it_buy_min_qty']; ?>);						var max_qty = parseInt(<?php echo $it['it_buy_max_qty']; ?>);						var $el_type = $("input[name^=io_type]"); 						$("input[name^=ct_qty]").each(function(index) {							val = $(this).val(); 							if(val.length < 1) {								alert("수량을 입력해 주십시오.");								result = false;								return false;							} 							if(val.replace(/[0-9]/g, "").length > 0) {								alert("수량은 숫자로 입력해 주십시오.");								result = false;								return false;							} 							if(parseInt(val.replace(/[^0-9]/g, "")) < 1) {								alert("수량은 1이상 입력해 주십시오.");								result = false;								return false;							} 							io_type = $el_type.eq(index).val();							if(io_type == "0")								sum_qty += parseInt(val);						}); 						if(!result) {							return false;						} 						if(min_qty > 0 && sum_qty < min_qty) {							alert("선택옵션 개수 총합 "+number_format(String(min_qty))+"개 이상 주문해 주십시오.");							return false;						} 						if(max_qty > 0 && sum_qty > max_qty) {							alert("선택옵션 개수 총합 "+number_format(String(max_qty))+"개 이하로 주문해 주십시오.");							return false;						} 						if (document.pressed == "장바구니") {							$.post("./itemcart.php", $(f).serialize(), function(error) {								if(error != "OK") {									alert(error.replace(/\\n/g, "\n"));									return false;								} else {									if(confirm("장바구니에 담겼습니다.\n\n바로 확인하시겠습니까?")) {										window.open("./cart.php");									}								}							});							return false;						} else {							return true;						}					}				</script>

 

여기서 장바구니를 window.open("./cart.php"); 이런식으로 새창을 띄우는게끔 수정했는데

바로주문은 어디서 수정을 해야할지 모르겠네요 ..ㅠㅠ

<input type="submit" onclick="document.pressed=this.value;" value="바로구매" class="btn btn-<?php echo $btn2;?> btn-lg"> 여기에다 target="_blank" 줘도 안되고.. 도저히 못찾겠습니다.. 

도움 부탁드릴게요 ㅠ

답변 1개

채택된 답변
+20 포인트
바로주문을 감싸고 있는 form에 target="_blank" ​를 한번 넣어보고 해보세요
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

감사합니다^^!

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고