示例#1
0
 $total_point += intval($pro_config['point_new_order']);
 $total_old = $total;
 $data_order['order_name'] = nv_substr($nv_Request->get_title('order_name', 'post', '', 1), 0, 200);
 $data_order['order_email'] = nv_substr($nv_Request->get_title('order_email', 'post', '', 1), 0, 250);
 $data_order['order_phone'] = nv_substr($nv_Request->get_title('order_phone', 'post', '', 1), 0, 20);
 $data_order['order_note'] = nv_substr($nv_Request->get_title('order_note', 'post', '', 1), 0, 2000);
 $data_order['order_shipping'] = $nv_Request->get_int('order_shipping', 'post', 0);
 $check = $nv_Request->get_int('check', 'post', 0);
 if ($data_order['order_shipping']) {
     $data_order['shipping']['ship_name'] = $nv_Request->get_title('ship_name', 'post', '');
     $data_order['shipping']['ship_phone'] = $nv_Request->get_title('ship_phone', 'post', '');
     $data_order['shipping']['ship_address_extend'] = $nv_Request->get_title('ship_address_extend', 'post', '');
     $data_order['shipping']['ship_location_id'] = $nv_Request->get_int('ship_location', 'post', 0);
     $data_order['shipping']['ship_shops_id'] = $nv_Request->get_int('shops', 'post', 0);
     $data_order['shipping']['ship_carrier_id'] = $nv_Request->get_int('carrier', 'post', 0);
     $price_ship = nv_shipping_price($total_weight, $pro_config['weight_unit'], $data_order['shipping']['ship_location_id'], $data_order['shipping']['ship_shops_id'], $data_order['shipping']['ship_carrier_id']);
     $total_weight_price = empty($price_ship) ? 0 : $price_ship;
 }
 $total += $total_weight_price;
 if (($total > $counpons['total_amount'] or empty($total)) and NV_CURRENTTIME >= $counpons['date_start'] and ($counpons['uses_per_coupon_count'] < $counpons['uses_per_coupon'] or empty($counpons['uses_per_coupon'])) and (empty($counpons['date_end']) or NV_CURRENTTIME < $counpons['date_end'])) {
     // Ap dung giam gia cho tung san pham dac biet
     if ($total_coupons > 0) {
         if ($counpons['type'] == 'p') {
             $total = $total - $total_coupons * $counpons['discount'] / 100;
         } else {
             $total = $total_coupons - $counpons['discount'];
         }
     } else {
         if ($counpons['type'] == 'p') {
             $total = $total - $total * $counpons['discount'] / 100;
         } else {
示例#2
0
            if ($coupons_check) {
                $total = $total - $counpons['discount'];
            }
        }
    }
    if ($coupons_check) {
        $_SESSION[$module_data . '_coupons']['discount'] = $total_old - $total;
    }
}
if ($nv_Request->isset_request('get_shipping_price', 'get')) {
    $weight = $nv_Request->get_float('weight', 'get', 0);
    $weight_unit = $nv_Request->get_string('weight_unit', 'get', '');
    $location_id = $nv_Request->get_int('location_id', 'get', 0);
    $shops_id = $nv_Request->get_int('shops_id', 'get', 0);
    $carrier_id = $nv_Request->get_int('carrier_id', 'get', 0);
    $ship_price = nv_shipping_price($weight, $weight_unit, $location_id, $shops_id, $carrier_id);
    if (!empty($ship_price)) {
        $total += $ship_price;
    }
}
if ($pro_config['active_price'] == '0') {
    $total = 0;
}
$total = nv_number_format($total, nv_get_decimals($pro_config['money_unit']));
$lang_tmp['cart_title'] = $lang_module['cart_title'];
$lang_tmp['cart_product_title'] = $lang_module['cart_product_title'];
$lang_tmp['cart_product_total'] = $lang_module['cart_product_total'];
$lang_tmp['cart_check_out'] = $lang_module['cart_check_out'];
$lang_tmp['history_title'] = $lang_module['history_title'];
$lang_tmp['active_order_dis'] = $lang_module['active_order_dis'];
$lang_tmp['wishlist_product'] = $lang_module['wishlist_product'];