<?php require $cfg['path'] . '/configs/config_shopcoins.php'; require_once $cfg['path'] . '/models/orderdetails.php'; require_once $cfg['path'] . '/models/order.php'; $data_result = array(); $data_result['error'] = null; $coupon_count = (int) request('coupon_count'); $coupons = array(); $timenow = mktime(0, 0, 0, date("m", time()), date("d", time()), date("Y", time())); if (!$tpl['user']['user_id']) { $data_result['error'] = "noauth"; } $shopcoins = (int) request('shopcoins'); $orderdetails_class = new model_orderdetails($db_class, $shopcoinsorder); $order_class = new model_order($db_class, $shopcoinsorder, $tpl['user']['user_id']); $order = request('order'); $postindex = request('postindex'); $delivery = request('delivery'); $postindex = str_replace("'", "", $postindex); $clientdiscount = $orderdetails_class->getClientdiscount($tpl['user']['user_id']); $meetingtotime = request('meetingtotime'); $payment = request('payment'); $metro = request('metro'); $metrovalue = request('metrovalue'); $meetingdate = request('meetingdate'); $meetingfromtime = request('meetingfromtime'); $rows = $orderdetails_class->forBasket($clientdiscount); $bascetsum = $rows["mysum"]; $amountbascetsum = $rows['mysumamount']; $vipcoinssum = $rows['vipcoinssum'];
$shopcoins = (integer)request('shopcoins'); $onefio = request('onefio'); $onephone = request('onephone'); $amount = (integer) request('amount'); $basket_type = request('basket_type'); if($tpl['user']['user_id']==352480){ //var_dump($shopcoinsorder); } $erroramount = ""; if (!$amount) $amount = 1; $helpshopcoinsorder_class = new model_helpshopcoinsorder($db_class); $order_class = new model_order($db_class); $orderdetails_class = new model_orderdetails($db_class,$shopcoinsorder); $data_result = array(); $data_result['error'] = null; if (!$shopcoins) $data_result['error'] = "noshopcoins"; $rows = $shopcoins_class->getRowByParams(array('shopcoins'=>$shopcoins)); if(!$rows){ $data_result['error'] = "noshopcoins"; } else { $price = $rows['price']; $ShopcoinsMaterialtype = $rows["materialtype"];
<? require_once $cfg['path'] . '/models/order.php'; require_once $cfg['path'] . '/models/orderdetails.php'; require $cfg['path'] . '/configs/config_shopcoins.php'; $order_class = new model_order($db_class); $orderdetails_class = new model_orderdetails($db_class,$shopcoinsorder); $shopcoins = intval(request("shopcoins")); $pageinfo = request("pageinfo"); $amount = request("amount"); $ourcoinsorder = array(); $ourcoinsorderamount = array(); if ($shopcoinsorder) { $result_ourorder = $shopcoins_class->getMyOrderdetails($shopcoinsorder); foreach ( $result_ourorder as $rows_ourorder){ $ourcoinsorder[] = $rows_ourorder["catalog"]; $ourcoinsorderamount[$rows_ourorder["catalog"]] = $rows_ourorder["amount"]; } } if ($pageinfo=="delete" and $shopcoinsorder) { $rows5 = $order_class->getRowByParams(array('`order`'=>$shopcoinsorder)); if ($rows5['check']==0) { //удаляем позицию из заказа $orderdetails_class->deletePostion($shopcoins);
<?php require_once $cfg['path'] . '/models/helpshopcoinsorder.php'; require_once $cfg['path'] . '/models/order.php'; require_once $cfg['path'] . '/models/orderdetails.php'; require_once $cfg['path'] . '/models/mails.php'; $shopcoins = (int) request('shopcoins'); $onefio = request('onefio'); $onephone = request('onephone'); $amount = request('amount'); $helpshopcoinsorder_class = new model_helpshopcoinsorder($db_class); $order_class = new model_order($db_class); $orderdetails_class = new model_orderdetails($db_class, $shopcoinsorder); $data_result = array(); $data_result['error'] = null; if (!$shopcoins || !$onefio || !$onephone) { $data_result['error'] = "noshopcoins"; } $amount = (int) $amount ? (int) $amount : 1; $erroramount = ""; $rows = $shopcoins_class->getRowByParams(array('shopcoins' => $shopcoins)); if (!$rows) { $data_result['error'] = "noshopcoins"; } else { $oldamount = $rows['amount']; $price = $rows['price']; $ShopcoinsMaterialtype = $rows["materialtype"]; if ($price < $minpriceoneclick) { $data_result['error'] = "stopsummin"; } if ($rows['group'] == 1604) {
<? require $cfg['path'] . '/configs/config_shopcoins.php'; require_once $cfg['path'] . '/models/order.php'; $code1 = request('code1'); $code2 = request('code2'); $code3 = request('code3'); $code4 = request('code4'); $number = request('number'); $dateuse = ''; $dateout = ''; $order_class = new model_order($db_class); $data_result = array(); $data_result['error'] = null; $iscoupon = 0; $iscoup = 0; $dissum = 0; $orderin = 0; if ($code1 && $code2 && $code3 && $code4 && $tpl['user']['user_id'] && $tpl['user']['user_id']<>811 && $shopcoinsorder) { $user_data = $user_class->getUserData(); if($user_data['vip_discoint']&&(!$user_data['vip_discoint_date_end']||$user_data['vip_discoint_date_end']>time())){ $data_result['error'] = "error3"; } else { //получаем данные о введенном купоне
$sql = "UPDATE `order` set molotok = 2 where `order`.`order`='".intval($order_id)."'"; $res = mysql_query($sql); } if (isset($_COOKIE['yamarket'])) { update_order_molotok($shopcoinsorder, 2); }*/ //нужно посчитать сумму заказа if (!$tpl['user']['user_id']){ $tpl['shop']['errors'][] = "Авторизуйтесь!"; header("location: ".$cfg['site_dir']."shopcoins?page=orderdetails"); die(); } $order_class = new model_order($db_class,$shopcoinsorder,$tpl['user']['user_id']); $orderdetails_class = new model_orderdetails($db_class,$shopcoinsorder); // $user_data = $user_class->getUserData(); $tpl['user']['vip_discoint'] = 0; $tpl['user']['vip_discoint_end'] = 0; if($tpl['user']['user_id']){ if($user_data['vip_discoint']&&(!$user_data['vip_discoint_date_end']||$user_data['vip_discoint_date_end']>time())){ $tpl['user']['vip_discoint'] = $user_data['vip_discoint']; if($user_data['vip_discoint_date_end']) $tpl['user']['vip_discoint_end'] = $user_data['vip_discoint_date_end']; } } $sumallorder= 1;
<? require $cfg['path'] . '/configs/config_shopcoins.php'; require_once $cfg['path'] . '/models/order.php'; require_once $cfg['path'] . '/models/orderdetails.php'; require_once $cfg['path'] . '/models/catalogshopcoinsrelation.php'; require_once($cfg['path'] . '/models/mails.php'); $order_class = new model_order($db_class,$shopcoinsorder,$tpl['user']['user_id']); $orderdetails_class = new model_orderdetails($db_class,$shopcoinsorder); $catalogshopcoinsrelation_class = new model_catalogshopcoinsrelation($db_class); $addinordersubmit = request('addinordersubmit'); $MetroName =''; $tpl['addinorder']['error'] = ''; if ($blockend > time()) { $tpl['addinorder']['error'] = "Возможность добавления к предыдущим заказам приостановлена до " . date('H:i', $blockend); } else if (!$tpl['user']['user_id']) { $tpl['addinorder']['error'] = "Нужна авторизация на сайте для оформления этого заказа."; } else if (!$tpl['user']['orderusernow']) { $tpl['addinorder']['error'] = "У вас нет заказов для объединения с этим, поэтому минимальная сумма заказа должна быть 500 руб."; } else { $rows90 = $order_class->getOrder(); if ($rows90['check']==1) $tpl['addinorder']['error'] = "Заказ $shopcoinsorder уже оформлен Вами. Вы можете его просомтреть в \"Ваши заказы\""; }