Ejemplo n.º 1
0
    ?>
                        </div>
                        <?php 
} else {
    ?>
                        <div class="extras" style="display:none">
                            <div class="park-view">Extras</div>
                            <div class="extras_in_cart"></div>
                        </div>
                        <?php 
}
?>

                        <?php 
if (NULL != $user_cart) {
    $cart_info = cart_info($options, $user_cart, $user_extras);
    ?>
                        <div class="avrg">
                            <div>TOTAL</div>
                            <div class="c-090 avrgtotal"><?php 
    echo $cart_info['total_price'];
    ?>
 <?php 
    echo $options['currency'];
    ?>
</div>
                            <?php 
    if ($options['currency'] != $options['user_currency']) {
        ?>
                            <div class="c-090 avrgdefault"><?php 
        echo $cart_info['total_user_price'];
Ejemplo n.º 2
0
                        $subtotal = $result['subtotal'] = $rec_goods['subtotal'];
                        @($subtotal_exchange_integral = $rec_goods['subtotal_exchange_integral']);
                    }
                }
                //二次开发--购物车中积分兑换时总共消耗的积分 begin
                //$subtotal_exchange_integral_of_cart = get_subtotal_exchange_integral_of_cart();
                //$result['subtotal_exchange_integral_of_cart'] = ($subtotal_exchange_integral_of_cart > 0) ? $subtotal_exchange_integral_of_cart : '';
                //购物车的描述的格式化
                $result['subtotal'] = $subtotal;
                $result['subtotal_exchange_integral'] = empty($subtotal_exchange_integral) ? 0 : $subtotal_exchange_integral;
                $result['cart_amount_desc'] = $cart_goods['total']['goods_price'];
                $result['market_amount_desc'] = $cart_goods['total']['market_price'] . $cart_goods['total']['saving'] . $cart_goods['total']['save_rate'];
            }
        }
    }
    $result['cartnum'] = cart_info();
    die($json->encode($result));
}
/* 对商品信息赋值 */
$cart_goods = get_cart_goods();
$smarty->assign('goods_list', $cart_goods['goods_list']);
$smarty->assign('total', $cart_goods['total']);
$smarty->assign('footer', get_footer());
$smarty->display('cart.html');
/**
 * 更新购物车中的商品数量
 *
 * @access  public
 * @param   array   $arr
 * @return  void
 */
Ejemplo n.º 3
0
            $_SESSION['email'] = '';
            $_SESSION['user_rank'] = 0;
            $_SESSION['discount'] = 1.0;
        }
    }
}
if ((DEBUG_MODE & 1) == 1) {
    error_reporting(E_ALL);
} else {
    error_reporting(E_ALL ^ E_NOTICE);
}
if ((DEBUG_MODE & 4) == 4) {
    include ROOT_PATH . 'includes/lib.debug.php';
}
/* 判断是否支持gzip模式 */
if (gzip_enabled()) {
    ob_start('ob_gzhandler');
}
/* wap头文件 */
//if (substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '/')) != '/user.php')
//{}
header("Content-Type:text/html; charset=utf-8");
if (empty($_CFG['wap_config'])) {
    echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><title>" . $GLOBALS['_CFG']['shop_name'] . "</title></head><body><p align='left'>对不起,{$_CFG['shop_name']}暂时没有开启手机购物功能</p></body></html>";
    exit;
}
//20:56 2013-7-11
$GLOBALS['smarty']->assign('shop_name', $GLOBALS['_CFG']['shop_name']);
$GLOBALS['smarty']->assign('service_phone', $GLOBALS['_CFG']['service_phone']);
$GLOBALS['smarty']->assign('cart_info', cart_info());