first commit 2
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 💡 [사용법]
|
||||
// $it_id = '상품코드'; // 필수
|
||||
// $qty = 1; // 선택 (기본값 1)
|
||||
// $btn_text = '바로구매'; // 선택 (버튼 텍스트)
|
||||
// include(G5_THEME_PATH.'/shop/buy_module/link_btn.php');
|
||||
|
||||
$it_id = isset($it_id) ? $it_id : '';
|
||||
$qty = isset($qty) ? $qty : 1;
|
||||
$btn_text = isset($btn_text) ? $btn_text : '바로구매';
|
||||
|
||||
// 처리 파일 경로 (웹 URL)
|
||||
$action_url = G5_THEME_URL.'/shop/buy_module/link_buy_action.php';
|
||||
|
||||
if (!$it_id) {
|
||||
echo '<!-- 상품 ID가 설정되지 않았습니다. -->';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<a href="<?php echo $action_url; ?>?it_id=<?php echo $it_id; ?>&qty=<?php echo $qty; ?>" class="btn_buy_link"><?php echo $btn_text; ?></a>
|
||||
|
||||
<style>
|
||||
.btn_buy_link {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
background: #3f51b5;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn_buy_link:hover {
|
||||
background: #2c3e50;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user