바로구매 클릭시 주소줄에 &type 을 추가하고 싶습니다.
본문
상품 구매페이지에서 '바로구매' 버튼을 클릭했을 경우
주문서 작성페이지가 나옵니다.
이때 주소가 /shop/orderform.php?sw_direct=1
이렇게 나오게 되는데요,
이 뒤에 변수(?)를 하나 추가하려면 어떻게 해야할까요.
/shop/orderform.php?sw_direct=1&type=test 이런식으로 주소를 만들고 싶습니다.
** 모든 상품에서는 아니고 특정상품일때만 추가하고싶습니다.
아래와 같이 특정상품을 선택해주고 있습니다.
<form name="fitem" method="post" action="<?php echo $action_url; ?>" onsubmit="return fitem_submit(this);">
<input type="hidden" name="it_id[]" value="<?php echo $it_id; ?>">
<input type="hidden" name="sw_direct">
<input type="hidden" name="url">
<div style="width:850px;height:400px;position:absolute;margin:auto;left:0px;right:0px;top:0px;bottom:0px;">
<div style="width:850px;height:330px;position;relative;box-shadow:0px 0px 25px rgba(0,0,0,0.2);border-radius:10px;overflow:hidden;">
<?php if ($it_id == 1551656760) {?><input type="image" src="/img/m_pr_30.png" onclick="document.pressed=this.value;" id="sit_btn_buy" style="outline:none"><?}?>
<?php if ($it_id == 1551716255) {?><input type="image" src="/img/m_pr_60.png" onclick="document.pressed=this.value;" id="sit_btn_buy" style="outline:none"><?}?>
<?php if ($it_id == 1551717516) {?><input type="image" src="/img/m_pr_90.png" onclick="document.pressed=this.value;" id="sit_btn_buy" style="outline:none"><?}?>
답변 1
아래와 같이 추가해주면 됩니다.
<input type="hidden" name="url">
<input type="hidden" name="type" value="test">
답변을 작성하시기 전에 로그인 해주세요.