장바구니 최대수량 선택 오류 및 잘못된 코드 수정

This commit is contained in:
thisgun
2019-12-30 13:17:28 +09:00
parent 58b66e968f
commit 4a1596b55b
3 changed files with 10 additions and 5 deletions

View File

@ -184,7 +184,9 @@ else // 장바구니에 담기
and ct_status = '쇼핑' ";
$row4 = sql_fetch($sql4);
if(($sum_qty + $row4['ct_sum']) > $it['it_buy_max_qty'])
$option_sum_qty = ( $act === 'optionmod' ) ? $sum_qty : $sum_qty + $row4['ct_sum'];
if(($option_sum_qty) > $it['it_buy_max_qty'])
alert($it['it_name'].'의 선택옵션 개수 총합 '.number_format($it['it_buy_max_qty']).'개 이하로 주문해 주십시오.', './cart.php');
}
}

View File

@ -72,7 +72,7 @@ $mshop_categories = get_shop_category_array(true);
echo '<ul class="sub_cate sub_cate3">'.PHP_EOL;
?>
<li>
<a href="<?php echo $mshop_ca_href.$mshop_ca_row4['ca_id']; ?>"><?php echo get_text($mshop_ca_row4['ca_name']); ?></a>
<a href="<?php echo shop_category_url($mshop_ca_row4['ca_id']); ?>"><?php echo get_text($mshop_ca_row4['ca_name']); ?></a>
<?php
$mshop_ca_res5 = sql_query(get_mshop_category($mshop_ca_row4['ca_id'], 10));
if(sql_num_rows($mshop_ca_res5))
@ -83,7 +83,7 @@ $mshop_categories = get_shop_category_array(true);
echo '<ul class="sub_cate sub_cate4">'.PHP_EOL;
?>
<li>
<a href="<?php echo $mshop_ca_href.$mshop_ca_row5['ca_id']; ?>"><?php echo get_text($mshop_ca_row5['ca_name']); ?></a>
<a href="<?php echo shop_category_url($mshop_ca_row5['ca_id']); ?>"><?php echo get_text($mshop_ca_row5['ca_name']); ?></a>
</li>
<?php
}

View File

@ -21,6 +21,9 @@ $li_width = intval(100 / $this->list_mod);
$li_width_style = ' style="width:'.$li_width.'%;"';
for ($i=0; $row=sql_fetch_array($result); $i++) {
$item_link_href = shop_item_url($row['it_id']);
if ($i == 0) {
if ($this->css) {
echo "<ul id=\"sct_wrap\" class=\"{$this->css}\">\n";
@ -37,7 +40,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "<li class=\"sct_li{$li_clear}\"$li_width_style><div class=\"li_wr\">\n";
if ($this->href) {
echo "<div class=\"sct_img\"><a href=\"{$this->href}{$row['it_id']}\">\n";
echo "<div class=\"sct_img\"><a href=\"{$item_link_href}\">\n";
}
if ($this->view_it_img) {
@ -54,7 +57,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
}
if ($this->href) {
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_txt\">\n";
echo "<a href=\"{$item_link_href}\" class=\"sct_txt\">\n";
}
if ($this->view_it_name) {