poma1

views chenge new

Oct 27th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.57 KB | None | 0 0
  1. <?php echo $header; ?>
  2.  
  3. <?php echo $content_top; ?>
  4.  
  5. <div class="breadcrumb">
  6.     <?php foreach ($breadcrumbs as $breadcrumb) { ?>
  7.     <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
  8.     <?php } ?>
  9. </div>
  10.  
  11. <header class="heading">
  12.     <a href="index.php?route=account/products" style="display: inline-block;vertical-align: top;padding: 0 10px;text-align: center;"><img src="/image/products.png"><br>Товары</a>
  13.     <a href="/index.php?route=account/order" style="display: inline-block;vertical-align: top;padding: 0 10px;text-align: center;"><img src="/image/orders.png"><br>Заказы</a>
  14.     <a href="index.php?route=account/export" style="display: inline-block;vertical-align: top;padding: 0 10px;text-align: center;"><img src="/image/export.png"><br>Экспорт</a>
  15.     <a href="index.php?route=account/product_return" style="display: inline-block;vertical-align: top;padding: 0 10px;text-align: center;"><img src="/image/returns.png"><br>Возвраты</a>
  16.     <a href="index.php?route=account/account" style="display: inline-block;vertical-align: top;padding: 0 10px;text-align: center;"><img src="/image/help.png"><br>Помощь</a>
  17.     <!--h1><?php echo $heading_title; ?></h1-->
  18. </header>
  19.  
  20. <?php
  21.  
  22.     if ($column_left && $column_right) {
  23.         $main = "col-sm-6 middle sideleft"; }
  24.     else if ($column_left || $column_right) {
  25.         $main = "col-sm-9";
  26.         if($column_left) $main.=" sideleft"; else $main.= " sideright";
  27.     }
  28.     else { $main = "col-sm-12"; }
  29.  
  30.     ?>
  31. <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="return" class="form" role="form">
  32.     <div class="row">
  33.  
  34.         <?php echo $column_left; ?>
  35.  
  36.         <section id="maincontent" class="<?php echo $main; ?>" role="main">
  37.  
  38.             <div class="mainborder">
  39.  
  40.                 <?php if ($column_left || $column_right) { ?>
  41.                 <div id="toggle_sidebar"></div>
  42.                 <?php } ?>
  43.  
  44.                 <table class="table table-bordered">
  45.  
  46.                     <thead>
  47.                     <tr>
  48.                         <td colspan="2">
  49.                             <?php echo $text_order_detail; ?>
  50.                         </td>
  51.                     </tr>
  52.                     </thead>
  53.  
  54.                     <tbody>
  55.                     <tr>
  56.                         <td style="width: 50%;">
  57.                             <?php if ($invoice_no) { ?>
  58.                             <b><?php echo $text_invoice_no; ?></b> <?php echo $invoice_no; ?><br />
  59.                             <?php } ?>
  60.  
  61.                             <b><?php echo $text_order_id; ?></b> #<?php echo $order_id; ?><br />
  62.  
  63.                             <b><?php echo $text_date_added; ?></b> <?php echo $date_added; ?><br />
  64.  
  65.                             <!--<b><?php echo $text_post_date; ?>:</b> <?php echo $post_date; ?>-->
  66.                         </td>
  67.                         <td>
  68.                             <b><?php echo $text_payment_method; ?></b> <?php echo $payment_method; ?>
  69.                             <?php if ($shipping_method) { ?>
  70.                             <br /><b><?php echo $text_shipping_method; ?></b> <?php echo $shipping_method; ?>
  71.                             <?php } ?>
  72.  
  73.                             <?php if ($ttn) { ?>
  74.                             <br /><b>ТТН:</b> <?php echo $ttn; ?>
  75.                             <?php } ?>
  76.  
  77.                         </td>
  78.                     </tr>
  79.                     </tbody>
  80.  
  81.                 </table>
  82.  
  83.                 <table class="table table-bordered">
  84.                     <thead>
  85.                     <tr>
  86.                         <td colspan="4">
  87.                             <?php echo $text_shipping_address; ?>
  88.                         </td>
  89.                     </tr>
  90.                     </thead>
  91.                     <tbody>
  92.                     <?php if ($error_region) { ?>
  93.                     <tr>
  94.                         <td><span class="error"><?php echo $error_region; ?></span></td>
  95.                     </tr>
  96.                     <?php } ?>
  97.                     <tr>
  98.                         <td style="width: 100%;">
  99.                             <span style="color: red;">*</span> <input type="text" name="shipping_firstname" value="<?php echo $shipping_firstname; ?>"/>
  100.                         </td>
  101.                     </tr>
  102.                     <tr>
  103.                         <td>
  104.                             <select name="shipping_zone" id="shipping_zone">
  105.                                 <option value="0">- выберите область -</option>
  106.                                 <?php foreach ($zones as $zone) { ?>
  107.                                 <?php if(!empty($zone['id_area'])){ ?>
  108.                                 <option value="<?php echo $zone['id_area'] ?>" ><?php echo $zone['name']; ?></option>
  109.                                 <?php } ?>
  110.                                 <?php } ?>
  111.                             </select>
  112.  
  113.                             <div id="divregion">
  114.                                 <select name="shipping_city" id="shipping_city">
  115.                                     <option  value="0">- выберите город -</option>
  116.                                     <?php foreach ($regions as $region) { ?>
  117.                                     <?php if($region['Area'] == $zona){ ?>
  118.                                     <option  value="<?php echo $region['id']?>"><?php echo $region['DescriptionRu']?></option>
  119.                                     <?php } ?>
  120.                                     <?php } ?>
  121.                                 </select>
  122.  
  123.                             </div>
  124.                             <div id="divcity">
  125.                                 <select name="payment_address_1" id="payment_address_1">
  126.                                     <option  value="0">- выберите отдиления -</option>
  127.                                 </select>
  128.                             </div>
  129.                         </td>
  130.                     </tr>
  131.  
  132.  
  133.                     <tr>
  134.                         <td style="width: 100%">
  135.                             <span style="color: red;">*</span> <input type="text" name="telephone" value="<?php echo $telephone; ?>"></td>
  136.                     </tr>
  137.                     </tbody>
  138.                 </table>
  139.                 <?php if($sum_ > 0){ ?>
  140.                 <div style="text-align: right;font-size: 16px;"><b>Сумма наложки:</b> <?php echo (float)$sum_; ?></div>
  141.                 <?php } ?>
  142.                 <table class="table table-bordered table-adjust">
  143.  
  144.                     <thead>
  145.                     <tr>
  146.                         <td><?php echo "Фото"?></td>
  147.                         <td><?php echo $column_name; ?></td>
  148.                         <td><?php echo $column_model; ?></td>
  149.                         <td><?php echo $column_quantity; ?></td>
  150.                         <td><?php echo $column_price; ?></td>
  151.                         <td><?php echo $column_total; ?></td>
  152.                     </tr>
  153.                     </thead>
  154.  
  155.                     <tbody>
  156.  
  157.                     <?php foreach ($products as $product) { ?>
  158.  
  159.                     <tr>
  160.                     <tr>
  161.                         <?php if (!empty($product['image'])) { ?>
  162.                         <td style="text-align: center"><img src="<?php echo "/image/". $product['image'] ;?>" width="100" height="100"></td>
  163.                         <?php } else { ?>
  164.                         <td></td>
  165.                         <?php } ?>
  166.  
  167.                         <td>
  168.                             <b><?php echo $product['name']; ?></b>
  169.  
  170.                             <?php foreach ($product['option'] as $option) { ?>
  171.                             <br />&nbsp;
  172.                             <small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
  173.                             <?php } ?>
  174.                             <!--br />
  175.                             <small>
  176.                                 <a href="<?php echo $product['return']; ?>" class="" title="<?php echo $button_return; ?>" ><?php echo $button_return; ?>  &rarr;</a>
  177.                             </small-->
  178.                         </td>
  179.                         <td><?php echo $product['model']; ?></td>
  180.                         <td class="right"><?php echo $product['quantity']; ?></td>
  181.                         <td class="right"><?php echo $product['price']; ?></td>
  182.                         <td class="right"><?php echo $product['total']; ?></td>
  183.                     </tr>
  184.  
  185.                     <?php } ?>
  186.  
  187.                     <?php foreach ($vouchers as $voucher) { ?>
  188.  
  189.                     <tr>
  190.                         <td><?php echo $voucher['description']; ?></td>
  191.                         <td></td>
  192.                         <td class="right">1</td>
  193.                         <td class="right"><?php echo $voucher['amount']; ?></td>
  194.                         <td class="right"><?php echo $voucher['amount']; ?></td>
  195.                     </tr>
  196.                     <?php } ?>
  197.  
  198.                     </tbody>
  199.  
  200.                     <tfoot>
  201.                     <?php foreach ($totals as $total) { ?>
  202.  
  203.                     <tr>
  204.                         <td></td>
  205.                         <td colspan="4" class="right"><b><?php echo $total['title']; ?>:</b></td>
  206.                         <td class="right"><?php echo $total['text']; ?></td>
  207.                     </tr>
  208.                     <?php } ?>
  209.                     </tfoot>
  210.  
  211.                 </table>
  212.  
  213.  
  214.                 <div class="form-actions" style="text-align: center">
  215.                     <a href="<?php echo $back; ?>" class="button button-default"><?php echo $button_back; ?></a>
  216.                     <input type="hidden" name="order_id" value="<?php echo $order_id?>"/>
  217.                     <input type="submit" value="<?php echo $button_continue; ?>" class="button button-default button-inverse" />
  218.                 </div>
  219. </form>
  220. </section> <!-- #maincontent -->
  221.  
  222. <?php echo $column_right; ?>
  223.  
  224. </div> <!-- .row -->
  225.  
  226. <?php echo $content_bottom; ?>
  227. <style>
  228.     #divregion, #divcity {
  229.         display: none;
  230.         margin-top: 15px;
  231.     }
  232. </style>
  233. <?php echo $footer; ?>
  234. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  235. <script>
  236.     $(document).ready(function () {
  237.         $("#shipping_zone").change(function () {
  238.             var zone = ($("#shipping_zone").val());
  239.             getCodeNovaposhtaCities(zone);
  240.         });
  241.     });
  242.     function getCodeNovaposhtaCities(zone){
  243.         var city = $("#shipping_city");
  244.             $("#divregion").fadeIn("fast");
  245.             city.attr("disabled", false);
  246.             if(zone > 0){
  247.         }
  248.  
  249.         $.ajax({
  250.             url: 'catalog/controller/account/order.php',
  251.             type: 'GET',
  252.             data: {zone: zone},
  253.             success: function(data) {
  254.                 alert(data);
  255.             },
  256.             error: function() {
  257.                 console.log('AJAX-запрос выполнен с ошибкой');
  258.             }
  259.         });
  260.     }
  261. </script>
  262.  
  263.  
  264.  
  265. $.get(
  266. "index.php?route=order_change.tpl",
  267. {
  268. zone: zone,
  269.  
  270. },
  271. onAjaxSuccess
  272. );
  273.  
  274. function onAjaxSuccess(data)
  275. {
  276. // Здесь мы получаем данные, отправленные сервером и выводим их на экран.
  277. alert(data);
  278. }
  279.  
  280.  
  281. $.ajax({
  282. url: 'catalog/controller/account/order.php',
  283. type: 'GET',
  284. data: {zone: zone},
  285. success: function() {
  286. console.log('AJAX-запрос выполнен успешно');
  287. },
  288. error: function() {
  289. console.log('AJAX-запрос выполнен с ошибкой');
  290. }
  291. });
Advertisement
Add Comment
Please, Sign In to add comment