테스트 사이트 - 개발 중인 베타 버전입니다

메인타입에 장바구니담기

· 11년 전 · 11 · 1
메인타입에[ 장바구니에 담기] 넣을려고 아래처럼 짜깁기 수정했는데
http://도메인.com/youngcart4/shop/cartupdate.php 에서 Error.. 라고 메세지 나오는데요
무엇이 잘못되었는지요.
======================================================================================
<?
$btn_img = "<img src='$g4[shop_img_path]/btn_cart_in.gif' border=0 alt='장바구니 담기'>";
{
    // 옵션이 있는 상품은 선택할 수 없음
    if (preg_match("/;|\\r/", trim($row['it_opt1']).trim($row['it_opt2']).trim($row['it_opt3']).trim($row['it_opt4']).trim($row['it_opt5']).trim($row['it_opt6']))) {
        $onclick_str = "옵션이 있는 상품이므로 바로 장바구니에 담을 수 없습니다.";
    }
 
    echo "
 <form name='flistskin7_$i' method='post' action='$g4[shop_path]/cartupdate.php'>
    <input type='hidden' name='sw_direct' value='0'>
    <input type='hidden' name='it_id' value='$row[it_id]'>
    <input type='hidden' name='it_name' value='".stripslashes($row[it_name])."'>
    <input type='hidden' name='it_amount' value='$it_amount'>
    <input type='hidden' name='it_point' value='$row[it_point]'>
    <input type='hidden' name='ct_qty' value='1'> ";
    if (!$row['it_gallery']) {
        if ($onclick_str)
            echo "<a href=\"javascript:alert('$onclick_str'); location.href='$g4[shop_path]/item.php?it_id=$row[it_id]';\">$btn_img</a>";
        else
            echo "<a href=\"javascript:document.flistskin7_$i.submit();\">$btn_img</a></form>";
 } }
?>

댓글 작성

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

로그인하기

댓글 1개

shop/maintype20.inc.php 를

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<?
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if ($i > 0 && $i % $list_mod == 0)
echo "</tr><tr>";

$href = "<a href='$g4[shop_path]/item.php?it_id=$row[it_id]' class=item>";
?>
<td width="<? echo $td_width ?>%" align=left valign=top>
<form method=post action="<?=$g4[shop_path]?>/cartupdate.php">
<input type=hidden name=it_id value="<?=$row[it_id]?>">
<input type=hidden name=it_amount value="<?=get_amount($row)?>">
<input type=hidden name=it_point value="<?=$row[it_point]?>">
<input type=hidden name=ct_qty value="1">
<table width=98% cellpadding=2 cellspacing=0 border=0>
<tr>
<td rowspan=2 width='' align=center>&nbsp;<?=$href?><?=get_it_image($row[it_id]."_s", $img_width, $img_height)?></a>&nbsp;</td>
<td width=50%><?=$href?><?=stripslashes($row[it_name])?></a></td>
<td width=30% align=right valign=bottom><span class=amount><?=display_amount(get_amount($row), $row[it_tel_inq])?></span>&nbsp;</td>
</tr>
<tr>
<td colspan=2><?=$row[it_basic]?>&nbsp;</td>
</tr>
</table>
<input type="submit" value="장바구니">
</form>
</td>
<?
}

// 나머지 td 를 채운다.
if (($cnt = $i%$list_mod) != 0)
for ($k=$cnt; $k<$list_mod; $k++)
echo "<td>&nbsp;</td>\n";
?>
</tr>
</table>

이런식으로 수정해 보시기 바랍니다.

프로그램의 기능을 추가, 수정하시는 경우 고객지원이 어렵습니다.

게시글 목록

번호 제목
56073
56067
56065
56060
56058
56055
56051
56048
56044
56043
56042
56039
56035
56032
56030
56028
56025
56018
56012
56010