Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $totalAmount = 0;
- $totalCount = 0;
- ?>
- <div style="font-weight: bold;margin-bottom: 25px; margin-left: 25%;">Управление заказом # <?= $this->order['id'] ?></div>
- <?=
- $this->tabs([
- ['title' => 'Информация о заказе', 'hash' => 'main'],
- ['title' => 'Информация о заказанных товарах', 'hash' => 'products'],
- ['title' => 'История покупателя', 'hash' => 'history'],
- ['title' => 'Корзина покупателя', 'hash' => 'cart'],
- ['title' => 'Лог действий', 'hash' => 'log'],
- ])
- ?>
- <div class="turnover" style=" border: 1px solid green;font-size: 20px;margin-top: 15px;padding: 11px 19px;text-align: center;width: 58%;">
- Оборот покупателя за последние <?= $this->months ?> месяца: <?= $this->turnover ?> грн
- <a href="javascript://" id="closeTurnoverBtn" title="Закрыть">[x]</a>
- </div>
- <?= $this->tabs()->open() ?>
- <?= $this->tabs()->start('main') ?>
- <form action="<?= $this->adminLink(['action' => 'orders', 'params' => ['act' => 'update-info'], 'checkAcl' => false])->url() ?>" method="post">
- <p><b>Информация о заказчике: </b></p>
- <p>Имя: <input type="text" name="order_info[name]" value="<?= $this->order['order_info']['name'] ?>"></p>
- <p>E-Mail: <input type="text" name="order_info[email]" value="<?= $this->order['order_info']['email'] ?>"></p>
- <p>Телефон: <input type="text" name="order_info[phone]" value="<?= $this->order['order_info']['phone'] ?>"></p>
- <?php foreach (array_reverse($this->fields) as $field => $info): ?>
- <p><?= $info['title'] ?>: <input type="text" name="order_info[<?= $field ?>]" value="<?= $this->order['order_info'][$field] ?>"></p>
- <?php endforeach ?><br>
- <div><b>Информация о заказе</b></div>
- <p> Статус заказа:
- <select name="status_id">
- <?php foreach ($this->statuses as $v): ?>
- <option <?php if ($v['id'] == $this->order['status_id']): ?>selected<?php endif ?> value="<?= $v['id'] ?>"><?= $v['title'] ?></option>
- <?php endforeach ?>
- </select></p>
- <br>
- <div><b>Адрес доставки</b></div>
- <p>
- <div>Регион: <select name="region_id">
- <?php foreach ($this->regions as $v): ?>
- <option <?php if ($v['id'] == $this->order['region_id']): ?>selected<?php endif ?> value="<?= $v['id'] ?>"><?= $v['title'] ?></option>
- <?php endforeach ?>
- </select>
- </div>
- <div>Улица: <input type="text" name="delivery_info[address][street]" value="<?= $this->order['delivery_info']['address']['street'] ?>"> </div>
- <div>Дом: <input type="text" name="delivery_info[address][house]" value="<?= $this->order['delivery_info']['address']['house'] ?>"></div>
- <div>Подъезд: <input type="text" name="delivery_info[address][housing]" value="<?= $this->order['delivery_info']['address']['housing'] ?>"></div>
- <div>Этаж: <input type="text" name="delivery_info[address][floor]" value="<?= $this->order['delivery_info']['address']['floor'] ?>"></div>
- <div>Квартира: <input type="text" name="delivery_info[address][flat]" value="<?= $this->order['delivery_info']['address']['flat'] ?>"></div>
- <div>Код: <input type="text" name="delivery_info[address][code]" value="<?= $this->order['delivery_info']['address']['code'] ?>"></div>
- <br>
- <div><b>Способ и стоимость доставки</b></div>
- <p>Способ доставки:
- <select name="delivery_type">
- <option value="courier" <?php if ($this->order['delivery_type'] == DELIVERY_COURIER): ?>selected<?php endif ?>>Курьер</option>
- <option value=plan <?php if ($this->order['delivery_type'] == DELIVERY_PLAN): ?>selected<?php endif ?>>Плановая доставка</option>
- <option value="transport" <?php if ($this->order['delivery_type'] == DELIVERY_TRANSPORT): ?>selected<?php endif ?>>Транспортная компания</option>
- </select></p>
- <?php if ($this->order['delivery_type'] == DELIVERY_TRANSPORT): ?>
- <p>Транспортная компания: <select name="delivery_id">
- <option value="">Выберите</option>
- <?php foreach ($this->deliveries as $v): ?>
- <option <?php if ($v['id'] == $this->order['delivery_id']): ?>selected<?php endif ?> value="<?= $v['id'] ?>"><?= $v['title'] ?></option>
- <?php endforeach ?>
- </select>
- </p>
- <?php endif ?>
- <p>Время доставки: <input type="text" name="delivery_time" value="<?= $this->order['delivery_time'] ?>"></p>
- <p>Стоимость доставки: <input type="text" name="delivery_price" value="<?= $this->order['delivery_price'] ?>"></p>
- <br><br>
- <!-- <div>Способ оплаты: <b><?= $this->methods[$this->order['order_info']['ps_id']]['title'] ?></b></div>-->
- <div><b>Комментарий менеджера</b></div>
- <div><textarea cols="40" rows="7" name="manager_comment"><?= $this->order['manager_comment'] ?></textarea></div><br>
- <input type="hidden" name="order_id" value="<?= $this->order['id'] ?>">
- <input type="submit" value="Изменить информацию">
- </form>
- <hr>
- <p><b>Тип цены:</b> </p>
- <form action="<?= $this->adminUrl('shop', 'orders', ['act' => 'change-price-type']) ?>" method="post">
- <select name="price_type">
- <?php foreach ($this->types as $v): ?>
- <option <?php if ($v['id'] == $this->order['price_type']): ?>selected<?php endif ?> value="<?= $v['id'] ?>"><?= $v['title'] ?></option>
- <?php endforeach ?>
- </select>
- <input type="hidden" name="order_id" value="<?= $this->order['id'] ?>">
- <input type="submit" value="Изменить тип цены">
- <p style="color: red;">* - Внимание! Это приведет к пересчету цен в текущем заказе!</p>
- </form>
- <?= $this->tabs()->end('main') ?>
- <?= $this->tabs()->start('products') ?>
- <p><b>Информация о заказанных товарах</b></p>
- <div style="margin-bottom: 50px;">Добавить позицию в заказ:
- <input type="text" id="addPosition" placeholder="Начните вводить название">
- <input type="hidden" name="order_id" value="<?= $this->order['id'] ?>">
- <ul id="autocomplete-order">
- </ul>
- </div>
- <form action="" method="post">
- <table id="sample-table-2" class="table table-striped table-bordered">
- <thead>
- <tr>
- <th>Название</th>
- <th>Комментарий</th>
- <th>Единица измерения</th>
- <th>Количество</th>
- <th>Цена за единицу</th>
- <th>Всего</th>
- <th>Удалить</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($this->order['products'] as $v): ?>
- <?php
- $count = 0;
- $amount = 0;
- ?>
- <tr>
- <td><?= $v['properties']['title']['value'] ?></td>
- <td><?= $v['product_options']['comment'] ?></td>
- <td><?= $v['product_options']['step'] ?><?= $v['properties']['unit_of_measure']['value'] ?></td>
- <td><input type="text" name="qty[<?= $v['id'] ?>]" value="<?= $v['qty'] ?>"> <?= $v['properties']['unit_of_measure']['value'] ?></td>
- <td><input type="text" name="single_price[<?= $v['id'] ?>]" value="<?= $v['single_price'] ?>"></td>
- <td><?= round($v['single_price'] * $v['qty'] / $v['product_options']['step'], 2) ?> грн</td>
- <td><?= $this->adminLink(['action' => 'orders', 'params' => ['id' => $v['id'], 'act' => 'del-pos', 'order' => $this->order['id']], 'checkAcl' => false], ['class' => 'icon-trash']) ?></td></td>
- <?php $totalAmount+=($v['single_price'] * $v['qty']) ?>
- <?php $totalCount+=$v['qty'] ?>
- </tr>
- <?php endforeach ?>
- <tr><td colspan="3"></td>
- <td><input type="submit" value="Внести изменения в заказ и пересчитать"></td>
- <td>Итого: <?= round(($totalAmount * (1 + $this->order['fee'] / 100)), 2) ?> грн </td>
- </tr>
- </tbody>
- </table>
- </form>
- <?= $this->tabs()->end('products') ?>
- <?= $this->tabs()->start('log') ?>
- <table id="sample-table-2" class="table table-striped table-bordered">
- <thead>
- <tr>
- <th>Дата/время</th>
- <th>IP адрес</th>
- <th>Пользователь</th>
- <th>Уровень доступа</th>
- <th>Описание</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($this->log as $v): ?>
- <tr>
- <td><?= date('d.m.Y H:i:s', $v['created']) ?></td>
- <td><?= $v['ip_addr'] ?></td>
- <td><?= $v['name'] ?></td>
- <td><?= $v['role_title'] ?></td>
- <td><?= $v['description'] ?></td>
- </tr>
- <?php endforeach ?>
- </tbody>
- </table>
- <?= $this->tabs()->end('log') ?>
- <?= $this->tabs()->start('history') ?>
- <table id="sample-table-3" class="table table-striped table-bordered">
- <thead>
- <tr>
- <th>#</th>
- <th>Дата/время</th>
- <th>Тип цены</th>
- <th>Статус</th>
- </tr>
- </thead>
- <tbody id="userOrdersList">
- </tbody>
- </table>
- <?= $this->tabs()->end('history') ?>
- <?= $this->tabs()->start('cart') ?>
- <table id="sample-table-3" class="table table-striped table-bordered">
- <thead>
- <tr>
- <th>Название товара</th>
- <th>Количество</th>
- <th>Дата/время добавления</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($this->cart as $v): ?>
- <tr>
- <td><a href="<?= $this->uri(['id' => $v['id']], 'catalog_product') ?>" target="_blank"><?= $v['properties']['title']['value'] ?></a></td>
- <td><?= $v['count'] ?> <?= $v['properties']['unit_of_measure']['value'] ?></td>
- <td><?= date('d.m.Y H:i:s', $v['created']) ?></td>
- </tr>
- <?php endforeach ?>
- </tbody>
- </table>
- <?= $this->tabs()->end('cart') ?>
- <?=
- $this->tabs()->close()?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement