Initial import
This commit is contained in:
@@ -0,0 +1,453 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $this \yii\web\View
|
||||
* @var $user \app\models\UserPublic
|
||||
*/
|
||||
$points = $user->getExplorerObjectsSumPoints();
|
||||
$lg = Yii::$app->language;
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<style>
|
||||
.switch-button {
|
||||
width: 300px;
|
||||
margin: 20px auto 0;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
background: #e9e9e9;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e9e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switch-button .la {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.switch-enable {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.switch-disable {
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
.club-card-status {
|
||||
display: block;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: calc(50% - 10px);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
<?php if($user->club_card == 1): ?>
|
||||
.switch-disable {
|
||||
display: block
|
||||
}
|
||||
|
||||
.switch-enable {
|
||||
display: none
|
||||
}
|
||||
|
||||
.club-card-status {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
<?php else:?>
|
||||
|
||||
.switch-disable {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.switch-enable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.club-card *:not(.club-card-status) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
.profile-main-panel {
|
||||
display: flex;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.profile-main-panel .cwh {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.profile-main-panel .profile-row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.profile-row label {
|
||||
font-size: 18px !important;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.list-rows {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: calc(100% + 10px);
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.list-rows .list-row {
|
||||
display: flex;
|
||||
width: calc(100% / 3 - 26px);
|
||||
margin: 5px;
|
||||
padding: 8px;
|
||||
background: #f1f1f1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.list-rows .list-row img {
|
||||
height: 130px;
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.points {
|
||||
padding: 5px;
|
||||
border-radius: 100%;
|
||||
background: var(--color-main-super-dark);
|
||||
color: #fff;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
display: inline-block;
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
.page-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list-rows .list-row {
|
||||
width: calc(100% / 2 - 26px);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 991px) {
|
||||
.profile-main-panel {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.profile-main-panel .cwh {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.profile-main-panel {
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-profile-panel.open .body {
|
||||
margin-top: -25px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 780px) {
|
||||
|
||||
|
||||
.list-rows .list-row {
|
||||
width: calc(100% - 26px);
|
||||
}
|
||||
|
||||
.subscriptions {
|
||||
display: block
|
||||
}
|
||||
|
||||
.subscriptions .subscription {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.tabs-panel {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.tabs-panel .tab-button {
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tabs-panel .tab-button.active {
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
background: var(--color-main-dark) !important;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.tabs-panel .tab-button:not(.active) {
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
background: #f1f1f1 !important;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 510px) {
|
||||
|
||||
|
||||
.profile-main-panel .profile-row {
|
||||
display: block !important;
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.profile-main-panel .profile-row .input-row {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.club-card {
|
||||
width: 100% !important;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px) {
|
||||
.switch-button {
|
||||
width: calc(100% - 10px);
|
||||
height: auto;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-collection {
|
||||
background: var(--color-main-brigth-ultra-2) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--<script src='https://www.google.com/recaptcha/api.js'></script>-->
|
||||
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
use app\services\JWT;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="main-profile-panel top50 open">
|
||||
<div class="header-toggle-panel text-uppercase">
|
||||
<?= Ts::get(75) ?>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="profile-main-panel">
|
||||
<div class="cwh top25">
|
||||
<div class="ct text-uppercase title">
|
||||
<?= Ts::get(74) ?>
|
||||
</div>
|
||||
<div class="flex profile-row">
|
||||
<label><?= Ts::get(56) ?></label>
|
||||
<div class="input-row"><input name="full_name" value="<?= $user->full_name ?>"><i
|
||||
class="la la-pencil edit-profile"></i></div>
|
||||
|
||||
</div>
|
||||
<div class="flex flex-center">
|
||||
<div class="profile-submit profile-data-submit top25 inactive"><?= Ts::get(76) ?></div>
|
||||
</div>
|
||||
<div class="profile-row top25">
|
||||
<label>E-mail</label>
|
||||
<div class="input-row font-bold"
|
||||
style="padding-top: 7px; color: var(--color-main)"><?= $user->email ?></div>
|
||||
</div>
|
||||
<div class="profile-row top25">
|
||||
<label style="line-height: 20px"><?= Ts::get(198) ?></label>
|
||||
<div class="input-row" style="padding-top: 8px">
|
||||
<?php if ($user->has_double_auth): ?>
|
||||
<a style="color: #000000" href="?da=off"><?= Ts::get(205) ?></a>
|
||||
<?php else: ?>
|
||||
<div style="color: darkred"><?= Ts::get(217) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-row top25">
|
||||
<label style="line-height: 20px"><?= Ts::get(220) ?></label>
|
||||
<div class="input-row" style="padding-top: 8px">
|
||||
<?php if ($user->has_newsletter): ?>
|
||||
<a style="color: #000000" href="?na=off"><?= Ts::get(205) ?></a>
|
||||
<?php else: ?>
|
||||
<a style="color: #000000" href="?na=on"><?= Ts::get(206) ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-row top25">
|
||||
<label><?= Ts::get(57) ?></label>
|
||||
<div class="input-row" style="padding-top: 8px">
|
||||
<a style="color: #66882b; font-weight: bold; cursor: pointer"
|
||||
onclick="ui.openPasswordChangeForm()"><?= Ts::get(204) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="password-change-form">
|
||||
<div class="close" onclick="ui.closePasswordChangeForm()"></div>
|
||||
<div class="flex profile-row">
|
||||
<label><?= Ts::get(209) ?></label>
|
||||
<div class="input-row"><input type="password" name="old_password" value=""></div>
|
||||
</div>
|
||||
<div class="flex profile-row">
|
||||
<label><?= Ts::get(210) ?></label>
|
||||
<div class="input-row"><input type="password" name="password" value=""></div>
|
||||
</div>
|
||||
|
||||
<div class="flex profile-row">
|
||||
<label class="password-strength-label" style="line-height: 15px"><?= Ts::get(195) ?></label>
|
||||
<div class="password-strength">
|
||||
<div class="weak unused"></div>
|
||||
<div class="middle unused"></div>
|
||||
<div class="strong unused"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex profile-row">
|
||||
<label style="line-height: 15px"><?= Ts::get(58) ?></label>
|
||||
<div class="input-row"><input type="password" name="password_confirm" value=""></div>
|
||||
</div>
|
||||
<div class="flex flex-center">
|
||||
<div class="change-password-submit profile-submit top25 inactive"
|
||||
style="pointer-events: auto; cursor: pointer"><?= Ts::get(211) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cwh top25">
|
||||
<div class="ct text-uppercase title no-padding">
|
||||
<?= Ts::get(77) ?>
|
||||
</div>
|
||||
<div class="club-card">
|
||||
<div class="top">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="club-card-title"><?= Ts::get(82) ?></div>
|
||||
<div class="club-card-owner"><?= $user->full_name ?></div>
|
||||
<div class="bottom">
|
||||
<span class="font-bold"><?= $points ?></span>
|
||||
<?= $points == 1 ? Ts::get(239) : Ts::get(83) ?>
|
||||
</div>
|
||||
<div class="club-card-status"><?= Ts::get(243) ?></div>
|
||||
</div>
|
||||
<div class="club-card-button">
|
||||
<div class="switch-button switch-disable"><i class="la la-ban"></i><?= Ts::get(242) ?></div>
|
||||
<div class="switch-button switch-enable"><i class="la la-ban"></i><?= Ts::get(241) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs-panel top25">
|
||||
<div data-tab="subscriptions" class="tab-button"><?= Ts::get(78) ?></div>
|
||||
<div data-tab="shopping" class="tab-button"><?= Ts::get(79) ?></div>
|
||||
<div data-tab="favourites" class="tab-button"><?= Ts::get(80) ?></div>
|
||||
<div data-tab="points" class="tab-button ct"><?= Ts::get(81) ?></div>
|
||||
</div>
|
||||
<div class="tab-content-panel top25"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const ui = new UI();
|
||||
ui.actions('<?= Yii::$app->language ?>')
|
||||
|
||||
const eButton = document.querySelector('.switch-enable');
|
||||
const dButton = document.querySelector('.switch-disable');
|
||||
dButton.addEventListener('click', function () {
|
||||
fetch('/bg/remote/user-card-disable/').then(() => {
|
||||
window.location.reload();
|
||||
})
|
||||
})
|
||||
eButton.addEventListener('click', function () {
|
||||
fetch('/bg/remote/user-card-enable/').then(() => {
|
||||
window.location.reload();
|
||||
})
|
||||
})
|
||||
<?php if(!empty($_GET['orders'])): ?>
|
||||
const shopping = document.querySelector('[data-tab="shopping"]');
|
||||
shopping.click();
|
||||
<?php else: ?>
|
||||
ui.get('.tab-button:first-child').click()
|
||||
<?php endif ?>
|
||||
function openTicketDetails(e) {
|
||||
modal.modalFrame(`/<?= $lg ?>/user/ticket-details/?id=${e.dataset.ticket}`)
|
||||
}
|
||||
|
||||
|
||||
function changeInnerTab(e) {
|
||||
if (!e.classList.contains('active')) {
|
||||
document.querySelectorAll('.slide-tab').forEach(tab => {
|
||||
tab.classList.remove('active')
|
||||
})
|
||||
document.querySelectorAll('.order-items').forEach(orderItems => {
|
||||
orderItems.classList.remove('active')
|
||||
})
|
||||
e.classList.add('active')
|
||||
|
||||
if (e.classList.contains('tab-subscriptions'))
|
||||
document.querySelector('.order-subscriptions').classList.add('active')
|
||||
if (e.classList.contains('tab-publications'))
|
||||
document.querySelector('.order-publications').classList.add('active')
|
||||
if (e.classList.contains('tab-collections'))
|
||||
document.querySelector('.order-collections').classList.add('active')
|
||||
if (e.classList.contains('tab-bookings'))
|
||||
document.querySelector('.order-bookings').classList.add('active')
|
||||
}
|
||||
}
|
||||
|
||||
function downloadThis(e) {
|
||||
const link = e.dataset.href;
|
||||
e.classList.add('disabled');
|
||||
const loader = e.querySelector('.loader');
|
||||
loader.classList.add('loader-active');
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('get', link);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = function () {
|
||||
const response = xhr.response;
|
||||
if (response && response.success) {
|
||||
e.classList.remove('disabled');
|
||||
loader.classList.remove('loader-active');
|
||||
window.location.href = `/<?= $lg ?>/user/collection-download-zip?zipName=${response.zipName}&zipFile=${response.zipFile}&object_dir=${response.object_dir}`
|
||||
}
|
||||
}
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
<?php if(!empty($_GET['cid'])):
|
||||
$decode = JWT::decode($_GET['cid'], JWT::SECRET_KEY);
|
||||
if($decode):
|
||||
$collection_id = $decode->cid;?>
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
const shoppingTab = document.querySelector('[data-tab="shopping"]');
|
||||
shoppingTab.click();
|
||||
window.history.pushState("", "", '/<?= $lg ?>/user/');
|
||||
})
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
Ts::set([245, 246, 247]);
|
||||
Yii::$app->controller->pageTitle = Ts::get(246)
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header" style="height: 80px">
|
||||
<a href="/bg/" class="header-logo top-care">
|
||||
<img src="/_public/images/logo.png">
|
||||
</a>
|
||||
</div>
|
||||
<div class="main-profile-panel top50 open">
|
||||
<div class="header-toggle-panel text-uppercase ct">
|
||||
<?= Ts::get(246) ?>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="ct" style="padding: 30px 0 30px"><?= Ts::get(245) ?></div>
|
||||
<div class="ct">
|
||||
<a class="btn profile-submit" href="/<?= Yii::$app->language ?>/user/"><?= Ts::get(247)?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.header-toggle-panel:after {display: none; cursor: default }
|
||||
</style>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<title>Cross-Browser QRCode generator for Javascript</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
|
||||
<script type="text/javascript" src="jquery.min.js"></script>
|
||||
<script type="text/javascript" src="qrcode.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="text" type="text" value="http://jindo.dev.naver.com/collie" style="width:80%" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="qrcode"/>
|
||||
</svg>
|
||||
<script type="text/javascript">
|
||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
width : 100,
|
||||
height : 100,
|
||||
useSVG: true
|
||||
});
|
||||
|
||||
function makeCode () {
|
||||
var elText = document.getElementById("text");
|
||||
|
||||
if (!elText.value) {
|
||||
alert("Input a text");
|
||||
elText.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
qrcode.makeCode(elText.value);
|
||||
}
|
||||
|
||||
makeCode();
|
||||
|
||||
$("#text").
|
||||
on("blur", function () {
|
||||
makeCode();
|
||||
}).
|
||||
on("keydown", function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
makeCode();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
use app\models\Ts;
|
||||
?>
|
||||
<div class="cart-list">
|
||||
<div class="cart-title"><?= Ts::get(124)?></div>
|
||||
<div class="flex top25 general-invoice">
|
||||
<div class="cw6 form-fizichesko-lice">
|
||||
<label>
|
||||
<input data-content="id1" name="invoice_data_type" type="radio" value="1">
|
||||
<?= Ts::get('125') ?>
|
||||
</label>
|
||||
<div id="id1" class="invoice-data top20 disabled">
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(128) //ИМЕ ?></label>
|
||||
<input name="first_name">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(129) //Фамилия ?></label>
|
||||
<input name="last_name">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(130) ?></label>
|
||||
<input name="country">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><?= Ts::get(131) //Пощенски код ?></label>
|
||||
<input name="post_code" style="width: 80px">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(132) //Град/село ?></label>
|
||||
<input name="city">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(133) //Адрес ?></label>
|
||||
<input name="address">
|
||||
</div>
|
||||
<div data-record="<?= Ts::get(140)?>" data-form="form-fizichesko-lice" class="top25 profile-submit ct align-left"><i class="la la-plus-circle"></i> <?= Ts::get(127) ?></div>
|
||||
<div onclick="invoiceData.changeData()" class="top25 change-data ct align-left"><i class="la la-pencil-square-o"></i> <?= Ts::get(139) ?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="cw6 form-iuridichesko-lice">
|
||||
<label>
|
||||
<input data-content="id2" name="invoice_data_type" type="radio" value="2">
|
||||
<?= Ts::get('126') ?>
|
||||
</label>
|
||||
<div id="id2" class="top20 invoice-data disabled">
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(135) //Име на фирма ?></label>
|
||||
<input name="company_name">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(136) ?></label>
|
||||
<input name="eik">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(137) ?></label>
|
||||
<input name="mol">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label style="display: flex">
|
||||
<input name="is_by_vat" type="checkbox">
|
||||
<?= Ts::get(138)?>
|
||||
</label>
|
||||
</div>
|
||||
<div data-record="<?= Ts::get(140)?>" data-form="form-iuridichesko-lice" class="top25 profile-submit ct align-left">
|
||||
<i class="la la-plus-circle"></i> <?= Ts::get(127) ?>
|
||||
</div>
|
||||
<div onclick="invoiceData.changeData()" class="top25 change-data ct align-left"><i class="la la-pencil-square-o"></i> <?= Ts::get(139) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
?>
|
||||
<div class="cart-list payment-methods">
|
||||
<div class="cart-title"><?= Ts::get(141) ?></div>
|
||||
<div class="flex top25">
|
||||
<div class="cw6 padding5">
|
||||
<label class="flex">
|
||||
<input onclick="paymentMethod.setMethod(this)" name="payment_method" type="radio" value="epay">
|
||||
<img src="/_public/assets/images/ePay.jpeg" style="width: 80px; margin-left: 5px">
|
||||
<div class="padding10">
|
||||
<div class="font-bold"><?= Ts::get(144)?></div>
|
||||
<div class="sub-text top5"><?= Ts::get(145)?></div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="cw6 padding5">
|
||||
<label class="flex">
|
||||
<input onclick="paymentMethod.setMethod(this)" name="payment_method" type="radio" value="card">
|
||||
<img src="/_public/assets/images/logo_visa_master_card.jpeg" style="width: 80px; margin-left: 5px">
|
||||
<div class="padding10">
|
||||
<div class="font-bold"><?= Ts::get(143) ?></div>
|
||||
<div class="sub-text top5"><?= Ts::get(146) ?></div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var $invoice_data
|
||||
*/
|
||||
?>
|
||||
<div class="cart-list">
|
||||
<div class="cart-title"><?= Ts::get(99) ?></div>
|
||||
<div class="flex top25 general-invoice added">
|
||||
<div class="invoice-data">
|
||||
<?php if ($invoice_data->invoice_data_type == 1): ?>
|
||||
<div class="text-uppercase"><?= Ts::get('125') ?></div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(128) //ИМЕ ?></label>
|
||||
<input name="first_name" value="<?= $invoice_data->first_name ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(129) //Фамилия ?></label>
|
||||
<input name="last_name" value="<?= $invoice_data->last_name ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(130) ?></label>
|
||||
<input name="country" value="<?= $invoice_data->country ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><?= Ts::get(131) //Пощенски код ?></label>
|
||||
<input name="post_code" value="<?= $invoice_data->post_code ?>" style="width: 80px">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(132) //Град/село ?></label>
|
||||
<input name="city" value="<?= $invoice_data->city ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="required"><?= Ts::get(133) //Адрес ?></label>
|
||||
<input name="address" value="<?= $invoice_data->address ?>">
|
||||
</div>
|
||||
<?php elseif ($invoice_data->invoice_data_type == 2): ?>
|
||||
<div class="text-uppercase underline"><?= Ts::get('126') ?></div>
|
||||
<div class="row">
|
||||
<label><?= Ts::get(135) //Име на фирма ?></label>
|
||||
<input name="company_name" value="<?= $invoice_data->company_name ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><?= Ts::get(136) ?></label>
|
||||
<input name="eik" value="<?= $invoice_data->eik ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><?= Ts::get(137) ?></label>
|
||||
<input name="mol" value="<?= $invoice_data->mol ?>">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><?= Ts::get(138) ?></label>
|
||||
<div class="top15">
|
||||
<?= $invoice_data->is_by_vat == true ? Ts::get(148) : Ts::get(149) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row top25">
|
||||
<a id="purchase_info_continue" href="<?= Yii::$app->goToAction('user/cart') . (!empty($_GET['webview_mode']) ? '?webview_mode=true' : '') ?>"
|
||||
class="profile-submit"><?= Ts::get(150) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var $payment_method
|
||||
*/
|
||||
?>
|
||||
<div class="cart-list payment-methods">
|
||||
<div class="cart-title"><?= Ts::get(141) ?></div>
|
||||
<div class="flex top25">
|
||||
<?php if($payment_method == 'epay'): ?>
|
||||
<div class="cw5">
|
||||
<label class="flex">
|
||||
<img src="/_public/assets/images/ePay.jpeg" style="width: 80px; margin-left: 5px; border-radius: 5px">
|
||||
<div class="padding10">
|
||||
<div class="font-bold"><?= Ts::get(144)?></div>
|
||||
<div class="sub-text top5"><?= Ts::get(145)?></div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<?php elseif ($payment_method == 'card'): ?>
|
||||
<div class="cw5">
|
||||
<label class="flex">
|
||||
<img src="/_public/assets/images/logo_visa_master_card.jpeg" style="width: 80px; height: 80px; margin-right: 10px">
|
||||
<div class="">
|
||||
<div class="font-bold"><?= Ts::get(143) ?></div>
|
||||
<div class="sub-text top5"><?= Ts::get(146) ?></div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="row top25">
|
||||
<a id="purchase_info_continue" href="<?= Yii::$app->goToAction('user/order-data') . (!empty($_GET['webview_mode']) ? '?webview_mode=true' : '') ?>"
|
||||
class="profile-submit"><?= Ts::get(150) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var $cart_data
|
||||
*/
|
||||
?>
|
||||
<div class="cart-list">
|
||||
<div class="cart-title"><?= Ts::get(142) ?></div>
|
||||
<div class="flex">
|
||||
<div class="cw6 invoice-data">
|
||||
<div class="row">
|
||||
<label class="top20">
|
||||
<?= Ts::get(147) ?>
|
||||
</label>
|
||||
<div class="top10">
|
||||
<?php
|
||||
/** @var \app\models\parsed\CartModel $cartModel */
|
||||
foreach ($cart_data['models'] as $cartModel): ?>
|
||||
<div class="flex">
|
||||
<div class="right-10"><?= $cartModel->quantity ?>X</div>
|
||||
<div class="right-10"><?= $cartModel->title ?></div>
|
||||
<div class="right-10">-</div>
|
||||
<div class="right-10"><?= $cartModel->singlePrice ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row top25">
|
||||
<a id="purchase_info_continue" href="<?= Yii::$app->goToAction('user/cart') . (!empty($_GET['webview_mode']) ? '?webview_mode=true' : '') ?>"
|
||||
class="profile-submit"><?= Ts::get(150) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cart-list">
|
||||
<div class="ct">
|
||||
<div class="font-bold top15 price text-black flex flex-center"><div class="text-uppercase"><?= Ts::get(151) ?></div>: <?= $cart_data['total'] ?> лв.</div>
|
||||
<div class="top25 invoice-data">
|
||||
<div class="row">
|
||||
<label class="text-black" style="font-weight: normal"><input onclick="purchase.allowSendOrder(this)" type="checkbox"> <?= Ts::get(152) ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top50">
|
||||
<div id="send_order" onclick="<?= empty($_GET['webview_mode']) ? 'cart.finalize()' : 'cart.finalize(1)' ?>" class="profile-submit disabled"><?= Ts::get(153) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var $total
|
||||
*/
|
||||
?>
|
||||
<div class="cart-list">
|
||||
<div class="cart-title"><?= Ts::get(142) ?></div>
|
||||
<div class="flex">
|
||||
<div class="cw6">
|
||||
<div class="top20">
|
||||
<?= Ts::get(147) ?>
|
||||
</div>
|
||||
<div class="top15"><?= $total ?></div>
|
||||
</div>
|
||||
<div class="cw6">
|
||||
<div class="text-uppercase price top20 text-black"><?= Ts::get(100) ?></div>
|
||||
|
||||
<div class="font-bold top15 price text-black"><?= $total ?> лв.</div>
|
||||
<div class="top25">
|
||||
<a id="purchase_info_continue" href="<?= Yii::$app->goToAction('user/purchase-info').(!empty($_GET['webview_mode']) ? '?webview_mode=true' : '')?>" class="profile-submit disabled"><?= Ts::get(101) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $this \yii\web\View
|
||||
* @var $user \app\models\UserPublic
|
||||
*/
|
||||
echo $this->render('/_mobile_view_mode')
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
* @var \app\models\parsed\CartModel[] $cartData
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="top50">
|
||||
<?= $this->render('order-steps', ['active' => ['cart']]) ?>
|
||||
</div>
|
||||
|
||||
<div class="main-profile-panel top50 open">
|
||||
<div class="header-toggle-panel text-uppercase ct static-header">
|
||||
<?= Ts::get(96) ?>
|
||||
<div class="no-cart-data <?= sizeof($cartData['models']) == 0 ? 'show' : '' ?>"><?= Ts::get(103) ?></div>
|
||||
</div>
|
||||
<div class="body cart-data">
|
||||
<div class="flex">
|
||||
<div class="cw9 top25">
|
||||
<?php foreach ($cartData['models'] as $model): ?>
|
||||
<div class="cart-list">
|
||||
<div class="flex">
|
||||
<div class="cw8">
|
||||
<div class="cart-title"><?= $model->title ?></div>
|
||||
<?php if($model->datetime): ?>
|
||||
<div class="sub-title-time top10"><?= Ts::get(106) ?>: <?= $model->datetime ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="sub-title top10"><?= $model->subTitle ?></div>
|
||||
<div class="description top10"><?= $model->description ?></div>
|
||||
</div>
|
||||
<div class="cw4">
|
||||
<div class="flex flex-right">
|
||||
<div class="price"><?= $model->singlePrice ?><i class="la la-times" style="margin-left: 15px; font-size: 18px"></i></div>
|
||||
<div class="quantity">
|
||||
<select class="q-changer" data-price="<?= $model->price ?>"
|
||||
data-cart="<?= $model->cartKey ?>"
|
||||
onchange="cart.updateQuantity(this)">
|
||||
<?php for ($i = 1; $i < ($model->availableQuantity + 1); $i++): ?>
|
||||
<option <?= $i == $model->quantity ? 'selected' : '' ?>
|
||||
value="<?= $i ?>"><?= $i ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="no"><?= Ts::get(98) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="remove-from-cart top20" data-cart="<?= $model->cartKey ?>"
|
||||
onclick="cart.removeFromCart(this)">
|
||||
<i class="la la-times-circle"></i>
|
||||
<div><?= Ts::get(102) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="cw3 top25">
|
||||
<div class="order-info">
|
||||
<div class="total-title">
|
||||
<?= Ts::get(90) ?>
|
||||
</div>
|
||||
<div class="total-price top25"><?= Ts::get(100) ?>: <span
|
||||
id="total-price"><?= $cartData['total'] ?></span> лв.
|
||||
</div>
|
||||
<a data-href="<?= Yii::$app->goToAction('user/order-data').(!empty($_GET['webview_mode']) ? '?webview_mode=true' : '') ?>" class="profile-submit cart-continue <?= sizeof($cartData['models']) === 0 ? 'disabled' : '' ?>"><?= Ts::get(101) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @var $this \yii\web\View
|
||||
* @var $user \app\models\UserPublic
|
||||
* @var $data
|
||||
*/
|
||||
echo $this->render('/_mobile_view_mode')
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
* @var \app\models\parsed\CartModel[] $cartData
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="top50">
|
||||
<?= $this->render('order-steps', ['active' => ['cart', 'order-data']]) ?>
|
||||
</div>
|
||||
|
||||
<div class="main-profile-panel top50 open">
|
||||
<div class="header-toggle-panel text-uppercase ct static-header">
|
||||
<?= Ts::get(89) ?>
|
||||
</div>
|
||||
<div class="body cart-data">
|
||||
<?= $this->render('_invoice_data') ?>
|
||||
<?= $this->render('_payment_methods') ?>
|
||||
<?= $this->render('_purchase_information', ['total' => $data['total']]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const
|
||||
invoiceData = new InvoiceData(),
|
||||
paymentMethod = new PaymentMethods(),
|
||||
purchase = new Purchase()
|
||||
invoiceData.setInvoiceData('<?= Yii::$app->language ?>');
|
||||
paymentMethod.setContainer();
|
||||
purchase.checkActivity();
|
||||
</script>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @var array $active
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="order-steps flex">
|
||||
<div class="cw3">
|
||||
<div class="step <?= in_array('cart', $active) ? 'active' : '' ?>" data-content="cart"><?= Ts::get(88) ?></div>
|
||||
</div>
|
||||
<div class="cw3">
|
||||
<div class="step <?= in_array('order-data', $active) ? 'active' : '' ?>" data-content="order-data"><?= Ts::get(89) ?></div>
|
||||
</div>
|
||||
<div class="cw3">
|
||||
<div class="step <?= in_array('order-info', $active) ? 'active' : '' ?>" data-content="order-info"><?= Ts::get(90) ?></div>
|
||||
</div>
|
||||
<div class="cw3">
|
||||
<div class="step <?= in_array('order-complete', $active) ? 'active' : '' ?>" data-content="order-complete"><?= Ts::get(91) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @var $this \yii\web\View
|
||||
* @var $user \app\models\UserPublic
|
||||
* @var $data
|
||||
*/
|
||||
echo $this->render('/_mobile_view_mode')
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
* @var $cart_data
|
||||
* @var $invoice_data
|
||||
* @var $payment_method
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="top50">
|
||||
<?= $this->render('order-steps', ['active' => ['cart', 'order-data', 'order-info']]) ?>
|
||||
</div>
|
||||
|
||||
<div class="main-profile-panel top50 open">
|
||||
<div class="header-toggle-panel text-uppercase ct static-header">
|
||||
<?= Ts::get(90) ?>
|
||||
</div>
|
||||
<div class="body cart-data">
|
||||
<?= $this->render('_preview_invoice', ['invoice_data' => $invoice_data]) ?>
|
||||
<?= $this->render('_preview_payment_methods', ['payment_method' => $payment_method]) ?>
|
||||
<?= $this->render('_preview_purchase_information', ['cart_data' => $cart_data]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const purchase = new Purchase();
|
||||
</script>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
|
||||
use app\models\Ts;
|
||||
|
||||
echo $this->render('/_mobile_view_mode')
|
||||
?>
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="top50">
|
||||
<?= $this->render('order-steps', ['active' => ['cart', 'order-data', 'order-info']]) ?>
|
||||
</div>
|
||||
|
||||
<div class="main-profile-panel top50 open">
|
||||
<div class="header-toggle-panel text-uppercase ct static-header">
|
||||
<?= Ts::get(90) ?>
|
||||
</div>
|
||||
<div class="body cart-data">
|
||||
<p class="ct"><?= Ts::get(154) ?></p>
|
||||
<div class="flex row flex-center ct top10">
|
||||
<a class="profile-submit" style="margin: 5px !important;" href="<?= Yii::$app->goToAction('user/login') ?>"><i
|
||||
class="la la-sign-in"></i><?= Ts::get(53) ?></a>
|
||||
<a class="profile-submit" style="margin: 5px !important;" href="<?= Yii::$app->goToAction('user/sign-up') ?>"><i
|
||||
class="la la-user-plus"></i><?= Ts::get(54) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
<link rel="stylesheet" href="/_public/assets/css/collection-objects-greed.css">
|
||||
<?php
|
||||
|
||||
use app\models\parsed\FavoriteModel;
|
||||
use app\models\register\Collections;
|
||||
use app\models\RegisterObjects;
|
||||
use app\models\Ts;
|
||||
use app\models\UserFavorites;
|
||||
use app\services\Auth;
|
||||
|
||||
$user = Auth::getUser();
|
||||
|
||||
Ts::set([47, 104, 170]);
|
||||
|
||||
if ($user):
|
||||
|
||||
$fav = UserFavorites::find()->where(['user_id' => $user->id])->all();
|
||||
$buffer = [];
|
||||
foreach ($fav as $f) {
|
||||
$buffer[$f->table][] = $f->fid;
|
||||
}
|
||||
$favoriteModels = [];
|
||||
foreach ($buffer as $b => $ids) {
|
||||
switch ($b) {
|
||||
case 'collections':
|
||||
foreach (Collections::find()->where(['IN', 'id', $ids])->all() as $m) {
|
||||
$fm = new FavoriteModel();
|
||||
$fm->img = $m->getImg();
|
||||
$fm->url = $m->getUrl();
|
||||
$fm->name = $m->title();
|
||||
$favoriteModels[104][] = $fm;
|
||||
}
|
||||
break;
|
||||
case 'register_objects':
|
||||
foreach (RegisterObjects::find()->where(['IN', 'id', $ids])->andWhere(['lib_type' => 1])->all() as $m) {
|
||||
$fm = new FavoriteModel();
|
||||
$fm->img = $m->getImg();
|
||||
$fm->url = $m->getUrl();
|
||||
$fm->name = $m->getTitle();
|
||||
$favoriteModels[47][] = $fm;
|
||||
}
|
||||
foreach (RegisterObjects::find()->where(['IN', 'id', $ids])->andWhere(['lib_type' => 2])->all() as $m) {
|
||||
$fm = new FavoriteModel();
|
||||
$fm->img = $m->getImg();
|
||||
$fm->url = $m->getLibraryUrl();
|
||||
$fm->name = $m->getTitle();
|
||||
$favoriteModels[170][] = $fm;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php foreach ($favoriteModels as $type => $group): ?>
|
||||
<div class="top25">
|
||||
<div class="group-title"><?= Ts::get($type) ?></div>
|
||||
<div class="collection-greed top10">
|
||||
<div class="content-out gallery">
|
||||
<?php foreach ($group as $f): ?>
|
||||
<div class="gallery__item">
|
||||
<a href="<?= $f->url ?>">
|
||||
<img class="gallery__img" src="<?= $f->img ?>">
|
||||
<div class="gallery__item_title"><?= explode('.', $f->name)[0] ?>.</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $orders
|
||||
* @var array $message
|
||||
* @var string $lg
|
||||
*/
|
||||
\app\models\Ts::set([251])
|
||||
?>
|
||||
<div class="order-items order-bookings">
|
||||
<?php foreach ($orders['bookings'] as $order_id => $bookings):
|
||||
|
||||
?>
|
||||
<div class="order-item flex">
|
||||
<?php
|
||||
/** @var \app\models\OrderBooking $b */
|
||||
foreach ($bookings as $b):
|
||||
$order = $b->order;
|
||||
$bookHeader = '';
|
||||
$title = \app\models\Ts::get(251);
|
||||
|
||||
if($b->event) {
|
||||
$title = $b->event->title(Yii::$app->language);
|
||||
$bookHeader = '<div class="order-sub-item-title">'. $message['ticket_for'][$lg] . ': "'.$title.'"</div>';
|
||||
} else {
|
||||
$bookHeader = '<div class="order-sub-item-title" style="color: darkred">'.$title.'</div>';
|
||||
}
|
||||
?>
|
||||
<div class="order-sub-item">
|
||||
<?= $bookHeader ?>
|
||||
<div class="type"><b
|
||||
style="color: grey"><?= $message['ticket_type'][$lg] ?></b>: <?= $b->{'name_' . $lg} ?>
|
||||
- <?= $b->single_price ?> лв.
|
||||
</div>
|
||||
<div class="type"><b
|
||||
style="color: grey"><?= $message['ticket_count'][$lg] ?></b>: <?= $b->tickets_count ?>
|
||||
</div>
|
||||
<div class=""><b
|
||||
style="color: grey"><?= $message['event_date'][$lg] ?></b>: <?= $b->formatedHtmlDate() ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ticket" style="min-width: 300px">
|
||||
<div class="status <?= $order->payment && $order->payment->status == 'PAID' ? 'paid' : '' ?>"><?= $order->statusStr() ?></div>
|
||||
<?php if ($order->payment && $order->payment->status == 'PAID'): ?>
|
||||
<div onclick="openTicketDetails(this)" data-ticket="<?= $b->id ?>"
|
||||
class="item-button <?= $order->payment->status !== 'PAID' ? 'disabled' : '' ?>"><?= $message['ticket'][$lg] ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $orders
|
||||
* @var array $message
|
||||
* @var string $lg
|
||||
*/
|
||||
|
||||
use app\models\RegisterObjectFiles;
|
||||
use app\services\JWT;
|
||||
|
||||
?>
|
||||
<style>
|
||||
.download-link {
|
||||
border: 1px solid #999999;
|
||||
width: 47%;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.download-link:hover {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
.download-link .download-link-content {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.download-link-content .loader {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 15px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: none;
|
||||
}
|
||||
.download-link-content .loader.loader-active {
|
||||
display: block !important;
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.download-link {
|
||||
width: calc(100% - 20px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.download-link .download-link-content .img {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.lds-ring {
|
||||
position: relative;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
display: none;
|
||||
}
|
||||
.lds-ring div {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 5px;
|
||||
border: 5px solid #999999;
|
||||
border-radius: 50%;
|
||||
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
||||
border-color: #999999 transparent transparent transparent;
|
||||
}
|
||||
.lds-ring div:nth-child(1) {
|
||||
animation-delay: -0.45s;
|
||||
}
|
||||
.lds-ring div:nth-child(2) {
|
||||
animation-delay: -0.3s;
|
||||
}
|
||||
.lds-ring div:nth-child(3) {
|
||||
animation-delay: -0.15s;
|
||||
}
|
||||
@keyframes lds-ring {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.selected-collection {
|
||||
background: var(--color-main-brigth-ultra-3) !important;
|
||||
}
|
||||
</style>
|
||||
<div class="order-items order-collections active">
|
||||
<?php foreach ($orders['collections'] as $order_id => $collections): ?>
|
||||
<div class="order-item">
|
||||
<?php
|
||||
/** @var $collection \app\models\OrderProduct */
|
||||
foreach ($collections as $collection):
|
||||
$order = $collection->order;
|
||||
$collectionModel = $collection->model_class;
|
||||
|
||||
/** @var $collectionTo \app\models\register\Collections */
|
||||
$collectionTo = $collectionModel::findOne($collection->model_id);
|
||||
|
||||
$start = null;
|
||||
$last_time = null;
|
||||
|
||||
if ($order->payment->status == 'PAID') {
|
||||
$pay_on = $order->payment->response_time;
|
||||
}
|
||||
?>
|
||||
<div class="order-sub-item" id="collection-<?= $collectionTo->id ?>">
|
||||
<div class="order-sub-item-title"><?= $collection->{'name_' . $lg} ?></div>
|
||||
<div class="status <?= $order->payment && $order->payment->status == 'PAID' ? 'paid' : '' ?>"><?= $order->statusStr() ?></div>
|
||||
<?php if ($order->payment->status == 'PAID'): ?>
|
||||
<div class="order-sub-item-title"><?= date('d.m.Y', strtotime($collection->order->payment->response_time))?></div>
|
||||
<div class="flex flex-wrap">
|
||||
<?php foreach ($collectionTo->collectionsObjects as $collectionsObject):
|
||||
$object_id = $collectionsObject->object->id;
|
||||
$collection_id = $collectionTo->id;
|
||||
$token_id = JWT::encode(['object_id' => $object_id, 'collection_id' => $collection_id], JWT::SECRET_KEY)
|
||||
?>
|
||||
<?php if (sizeof($collectionsObject->object->getRegisterObjectImages()) > 0):
|
||||
/** @var $file RegisterObjectFiles */
|
||||
$file = $collectionsObject->object->getRegisterObjectImages()[0];
|
||||
$first_img = $file->getResizedImg()
|
||||
?>
|
||||
<div onclick="downloadThis(this)" class="download-link"
|
||||
data-href="/<?= $lg ?>/user/collection-zip/?id=<?= $token_id ?>">
|
||||
<div class="download-link-content">
|
||||
<div class="img" style="width: 60px; height: 60px; border-radius: 100%; background-size: cover; background-position: center; background: url('<?= $first_img ?>') no-repeat"></div>
|
||||
<i class="la la-download" style="margin: 23px 10px 0 10px; font-size: 20px"></i>
|
||||
<div style="margin-top: 15px"><?= $collectionsObject->object->getTitle() ?>
|
||||
<div><?= ($lg == 'en' ? 'Images: ' : 'Изображениея: ') . sizeof($collectionsObject->object->getRegisterObjectImages()) ?></div>
|
||||
</div>
|
||||
<div class="lds-ring loader"><div></div><div></div><div></div><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,71 @@
|
||||
<style>
|
||||
.publication {
|
||||
width: calc(50% - 10px);
|
||||
background: #FFFFFF;
|
||||
padding: 20px;
|
||||
margin: 5px;
|
||||
}
|
||||
.publication .order-sub-item-title {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.read-button {
|
||||
background: var(--color-main-dark);
|
||||
color: #FFFFFF;
|
||||
font-size: 20px;
|
||||
border: 0;
|
||||
padding: 10px 20px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.order-item-publication {
|
||||
background: transparent !important;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
/**
|
||||
* @var array $orders
|
||||
*/
|
||||
|
||||
use app\services\JWT;
|
||||
|
||||
$lg = Yii::$app->language;
|
||||
?>
|
||||
<div class="order-items order-publications">
|
||||
<?php foreach ($orders['publications'] as $order_id => $publications): ?>
|
||||
<div class="order-item order-item-publication flex flex-wrap">
|
||||
|
||||
<?php
|
||||
/** @var \app\models\OrderProduct $publication */
|
||||
foreach ($publications as $publication):
|
||||
/** @var \app\models\Order $order */
|
||||
$order = $publication->order;
|
||||
$publicationModel = $publication->model_class;
|
||||
/** @var $publicationTo \app\models\RegisterObjects */
|
||||
$publicationTo = $publicationModel::findOne($publication->model_id);
|
||||
if ($order->payment->status == 'PAID')
|
||||
$pay_on = $order->payment->response_time;
|
||||
?>
|
||||
|
||||
<div class="order-sub-item publication" id="publication-<?= $publicationTo->id ?>">
|
||||
<div class="flex">
|
||||
<img src="<?= $publicationTo->getMainImgFile() ?>" style="width: 200px">
|
||||
<div class="order-sub-item-title">
|
||||
<?= $publication->{'name_' . $lg} ?>
|
||||
<div class="top15">
|
||||
<button onclick="openPublication(this)" data-publication="/file-system/file-preview-delivery/<?= JWT::encode(['id' => $publicationTo->pdf->id], JWT::SECRET_KEY) ?>/"
|
||||
class="read-button"><?= $lg == 'en' ? 'Read' : 'Прочети' ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status <?= $order->payment && $order->payment->status == 'PAID' ? 'paid' : '' ?>"><?= $order->statusStr() ?></div>
|
||||
<?php if ($order->payment->status == 'PAID'): ?>
|
||||
<div class="order-sub-item-title"><?= date('d.m.Y', strtotime($order->payment->response_time)) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $orders
|
||||
* @var array $message
|
||||
* @var string $lg
|
||||
*/
|
||||
?>
|
||||
<div class="order-items order-subscriptions">
|
||||
<?php foreach ($orders['subscriptions'] as $order_id => $subscriptions): ?>
|
||||
<div class="order-item">
|
||||
<?php
|
||||
/** @var $subscription \app\models\OrderProduct */
|
||||
foreach ($subscriptions
|
||||
|
||||
as $subscription):
|
||||
|
||||
$order = $subscription->order;
|
||||
$subscriptionModel = $subscription->model_class;
|
||||
|
||||
/** @var \app\models\Subscriptions $subscriptionTo */
|
||||
$subscriptionTo = $subscriptionModel::findOne($subscription->model_id);
|
||||
|
||||
$start = null;
|
||||
$last_time = null;
|
||||
|
||||
if ($order->payment->status == 'PAID') {
|
||||
$start = $order->payment->response_time;
|
||||
$last_time = strtotime("$start +$subscriptionTo->months months");
|
||||
}
|
||||
?>
|
||||
<div class="order-sub-item">
|
||||
<div class="order-sub-item-title"><?= $subscription->{'name_' . $lg} ?></div>
|
||||
<?php if ($start && $last_time): ?>
|
||||
<?php if ($last_time > time()): ?>
|
||||
<div class="status status-active"><?= $message['active'][$lg] ?></div>
|
||||
<?php else: ?>
|
||||
<div class="status status-inactive"><?= $message['inactive'][$lg] ?></div>
|
||||
<?php endif ?>
|
||||
<div class="status <?= $order->payment && $order->payment->status == 'PAID' ? 'paid' : '' ?>"><?= $order->statusStr() ?></div>
|
||||
<div class="type">
|
||||
<b><?= $message['from_date'][$lg] ?></b>: <?= date('d.m.Y', strtotime($start)) ?></div>
|
||||
<?php if ($last_time > time()): ?>
|
||||
<b><?= $message['to_date'][$lg] ?></b>: <?= date('d.m.Y', $last_time) ?>
|
||||
<?php else: ?>
|
||||
<b><?= $message['to_dated'][$lg] ?></b>: <?= date('d.m.Y', $last_time) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<div class="status <?= $order->payment && $order->payment->status == 'PAID' ? 'paid' : '' ?>"><?= $order->statusStr() ?></div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
use app\models\UserExplorerObjects;
|
||||
use app\services\Auth;
|
||||
use app\models\Subscriptions;
|
||||
use app\services\Cart;
|
||||
|
||||
$user = Auth::getUser();
|
||||
$lang = Yii::$app->language;
|
||||
|
||||
$userExplorerObjects = UserExplorerObjects::find()->where(['user_id' => $user->id]);
|
||||
$count = $userExplorerObjects->count();
|
||||
|
||||
$userExplorerObjects = $userExplorerObjects->orderBy(['date_visit' => SORT_DESC])->all();
|
||||
|
||||
$data = [];
|
||||
$totalPoints = 0;
|
||||
function countMessage($count)
|
||||
{
|
||||
$en = $count == 1 ? 'visited place' : 'visited places';
|
||||
$bg = $count == 1 ? 'посетен обект' : 'посетени обекта';
|
||||
return ['en' => $en, 'bg' => $bg];
|
||||
|
||||
}
|
||||
|
||||
foreach ($userExplorerObjects as $ueo) {
|
||||
if ($ueo->explorerObject && $ueo->explorerObject->tourObject) {
|
||||
$tourObject = $ueo->explorerObject->tourObject;
|
||||
$totalPoints += $ueo->explorerObject->points;
|
||||
$data[] = (object)['name' => $lang == 'en' ? $tourObject->name_en : $tourObject->name,
|
||||
'points' => $ueo->explorerObject->points,
|
||||
'img' => $ueo->explorerObject->getSrcOfSingleImage('explorer_object_image', '1:1'),
|
||||
'date' => $ueo->date_visit ? date('d.m.Y', strtotime($ueo->date_visit)) : ''
|
||||
];
|
||||
}
|
||||
}
|
||||
$count = sizeof($data)
|
||||
?>
|
||||
|
||||
<div class="title"><?= $count . ' ' . countMessage($count)[$lang] ?> | <?= $lang == 'en' ? 'total points' : 'общ бр. точки' ?>: <?= $totalPoints ?></div>
|
||||
<div class="list-rows top10">
|
||||
<?php foreach ($data as $v): ?>
|
||||
<div class="list-row">
|
||||
<img src="<?= $v->img ?>">
|
||||
<div class="list-row-info padding10">
|
||||
<div class="padding5"><?= $v->name ?></div>
|
||||
<div class="padding5"><b><?= $lang == 'en' ? 'points' : 'точки' ?>: </b><span
|
||||
class="points"><?= $v->points ?></span></div>
|
||||
<div class="padding5"><?= $v->date ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
|
||||
use app\models\Subscriptions;
|
||||
|
||||
$user = \app\services\Auth::getUser();
|
||||
$lg = Yii::$app->language;
|
||||
$message = [
|
||||
'ticket_for' => [
|
||||
'bg' => 'Билет за',
|
||||
'en' => 'Ticket for',
|
||||
],
|
||||
'bookings' => [
|
||||
'bg' => 'Резервации',
|
||||
'en' => 'Bookings'
|
||||
],
|
||||
'subscriptions' => [
|
||||
'bg' => 'Абонаменти',
|
||||
'en' => 'Subscriptions'
|
||||
],
|
||||
'collections' => [
|
||||
'bg' => 'Колекции',
|
||||
'en' => 'Subscriptions'
|
||||
],
|
||||
'publications' => [
|
||||
'bg' => 'Публикации',
|
||||
'en' => 'Publications'
|
||||
],
|
||||
'ticket_type' => [
|
||||
'bg' => 'вид билет',
|
||||
'en' => 'ticket type',
|
||||
],
|
||||
'event_date' => [
|
||||
'bg' => 'дата на събитието',
|
||||
'en' => 'event date',
|
||||
],
|
||||
'ticket' => [
|
||||
'bg' => 'билет',
|
||||
'en' => 'ticket'
|
||||
],
|
||||
'ticket_count' => [
|
||||
'bg' => 'Брой билети',
|
||||
'en' => 'Tickets count'
|
||||
],
|
||||
'from_date' => [
|
||||
'bg' => 'От дата',
|
||||
'en' => 'From date',
|
||||
],
|
||||
'to_date' => [
|
||||
'bg' => 'Изтича на',
|
||||
'en' => 'Expire on',
|
||||
],
|
||||
'to_dated' => [
|
||||
'bg' => 'Изтекъл на',
|
||||
'en' => 'Expired on',
|
||||
],
|
||||
'active' => [
|
||||
'bg' => 'Активен',
|
||||
'en' => 'Active'
|
||||
],
|
||||
'inactive' => [
|
||||
'bg' => 'Не активен',
|
||||
'en' => 'Expired'
|
||||
],
|
||||
'status' => [
|
||||
'en' => 'Status',
|
||||
'bg' => 'Статус'
|
||||
]
|
||||
];
|
||||
|
||||
$orders = $user->groupOrderItems();
|
||||
?>
|
||||
|
||||
|
||||
<style>
|
||||
.status {
|
||||
color: darkorange;
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.paid {
|
||||
color: darkmagenta;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
width: calc(100% - 20px);
|
||||
margin-bottom: 5px;
|
||||
background: #FFFFFF;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.order-sub-item {
|
||||
margin-bottom: 7px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
|
||||
.order-sub-item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.order-sub-item-title {
|
||||
color: var(--color-main-super-dark);
|
||||
font-size: 18px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.inner-tab {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.inner-tab-title {
|
||||
width: calc(100% - 10px);
|
||||
padding: 5px;
|
||||
color: var(--color-main-super-dark);
|
||||
background: #FFFFFF;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ticket {
|
||||
width: 100px;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.ticket .item-button {
|
||||
margin-top: 10px;
|
||||
display: block;
|
||||
color: var(--color-main-super-dark);
|
||||
background: #FFFFFF;
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid var(--color-main-super-dark);
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ticket .item-button:hover {
|
||||
background: var(--color-main-super-dark);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.slide-tab {
|
||||
margin: 0 20px;
|
||||
padding: 10px 20px;
|
||||
transform: translateY(5px);
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.slide-tab.active {
|
||||
color: var(--color-main-super-dark);
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.slide-tab:not(.slide-tab.active) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.order-items {
|
||||
padding: 10px 20px;
|
||||
display: none;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.order-items.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.status {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.status-active {
|
||||
color: #188ebe
|
||||
}
|
||||
|
||||
.status-inactive {
|
||||
color: darkred
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="inner-tab ">
|
||||
<div class="inner-tab-title flex">
|
||||
<div onclick="changeInnerTab(this)" class="slide-tab tab-collections active"><?= $message['collections'][$lg] ?></div>
|
||||
<div onclick="changeInnerTab(this)" class="slide-tab tab-publications"><?= $message['publications'][$lg] ?></div>
|
||||
<div onclick="changeInnerTab(this)"
|
||||
class="slide-tab tab-subscriptions"><?= $message['subscriptions'][$lg] ?></div>
|
||||
<div onclick="changeInnerTab(this)" class="slide-tab tab-bookings"><?= $message['bookings'][$lg] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->render('/user/profile-tabs/partials/order-collections', ['lg' => $lg, 'message' => $message, 'orders' => $orders]) ?>
|
||||
<?= $this->render('/user/profile-tabs/partials/order-publications', ['lg' => $lg, 'message' => $message, 'orders' => $orders]) ?>
|
||||
<?= $this->render('/user/profile-tabs/partials/order-subscriptions', ['lg' => $lg, 'message' => $message, 'orders' => $orders]) ?>
|
||||
<?= $this->render('/user/profile-tabs/partials/order-bookings', ['lg' => $lg, 'message' => $message, 'orders' => $orders]) ?>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
use app\models\OrderProduct;
|
||||
use app\models\Ts;
|
||||
use app\services\Auth;
|
||||
use app\models\Subscriptions;
|
||||
|
||||
$user = Auth::getUser();
|
||||
$subscriptions = Subscriptions::find()->all();
|
||||
|
||||
$product = OrderProduct::find()->joinWith('order')->where(['model_class' => Subscriptions::class])->orderBy(['order_date' => SORT_DESC])->one();
|
||||
|
||||
$active_subscription_id = null;
|
||||
$last_time = null;
|
||||
if ($product) {
|
||||
if ($product->order) {
|
||||
$order = $product->order;
|
||||
/** @var Subscriptions $subscriptionModel */
|
||||
$subscriptionModel = $product->model_class;
|
||||
$subscription = $subscriptionModel::findOne($product->model_id);
|
||||
if ($subscription) {
|
||||
if ($order->payment->status == 'PAID') {
|
||||
$start = $order->payment->response_time;
|
||||
$period = $subscription->months;
|
||||
$last_time = strtotime("$start +$period months");
|
||||
if (time() < $last_time) {
|
||||
$active_subscription_id = $product->model_id;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ts::set([84, 85, 86, 92, 93, 94, 95, 248]);
|
||||
?>
|
||||
<div class="subscriptions">
|
||||
<?php foreach ($subscriptions as $subscription): ?>
|
||||
<div class="subscription cw3">
|
||||
<div class="ct header-subs"><?= $subscription->getTitle() ?></div>
|
||||
<div class="body-subs <?= $subscription->isInCart() || $active_subscription_id == $subscription->id ? 'selected' : '' ?>">
|
||||
<div class="price"><?= $subscription->getFormatedPrice() ?></div>
|
||||
<div class="months top20"><?= $subscription->months . ' ' . $subscription->getMonthLabel() ?></div>
|
||||
<div class="text top20"><?= $subscription->getDescription() ?></div>
|
||||
<div class="option">
|
||||
<?php if (!$active_subscription_id): ?>
|
||||
<div class="subscription-button <?= $subscription->isInCart() ? '' : 'visible-option ' . $subscription->isBtnDisabled() ?> profile-submit ct gradient"
|
||||
onclick="cart.add(this, e => {cart.updateSubscriptions(e, 'add')}, 'subscription')"
|
||||
data-cart="<?= $subscription->cartKey ?>">
|
||||
<?= Ts::get(84) ?>
|
||||
</div>
|
||||
<div class="subscribe-selected <?= $subscription->isInCart() ? 'visible-option' : '' ?>">
|
||||
<div class="title"><?= Ts::get(92) ?></div>
|
||||
<a class="subscribe-selected-option" href="<?= Yii::$app->goToAction('user/cart') ?>"><i
|
||||
class="la la-shopping-cart"></i> <?= Ts::get(93) ?></a>
|
||||
<div class="subscribe-selected-option" data-cart="<?= $subscription->cartKey ?>"
|
||||
onclick="cart.remove(this, e => {cart.updateSubscriptions(e, 'remove')})"><i
|
||||
class="la la-times-circle"></i> <?= Ts::get(94) ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($active_subscription_id == $subscription->id): ?>
|
||||
<?php if ($last_time): ?>
|
||||
<div class="ct">
|
||||
<?= Ts::get(248) ?>: <?= date('d.m.Y', $last_time) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="subscribe-active visible-option"><?= Ts::get(95) ?></div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,59 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<!--<script src='https://www.google.com/recaptcha/api.js'></script>-->
|
||||
|
||||
|
||||
<script src='/_public/assets/js/default.js'></script>
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<?php
|
||||
use app\models\Ts;
|
||||
use app\services\ViewReg;
|
||||
|
||||
echo $this->render('/_mobile_view_mode');
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="panel-title top15" style="font-size: 20px"><?= Ts::get(55)?></div>
|
||||
<div class="panel-box top15 sign-up-box" style="padding-top: 0">
|
||||
<input name="full_name" placeholder="<?= Ts::get('56') //Name, surname ?>">
|
||||
<input name="email" placeholder="E-mail">
|
||||
<input type="password" name="password" placeholder="<?= Ts::get('57') //Password ?>">
|
||||
<div class="row flex">
|
||||
<div class="password-strength-label"><?= Ts::get(195)?></div>
|
||||
<div class="password-strength">
|
||||
<div class="weak unused"></div>
|
||||
<div class="middle unused"></div>
|
||||
<div class="strong unused"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="password" name="cPassword" placeholder="<?= Ts::get('58') //Password conf. ?>">
|
||||
<div class="confirm-checkboxes top25">
|
||||
<label class="checkbox"><input name="has_terms" type="checkbox"><a href="<?= ViewReg::goToPage(14) ?>"><?= Ts::get(59)?></a></label>
|
||||
<label class="checkbox"><input name="has_privacy" type="checkbox"><a href="<?= ViewReg::goToPage(15)?>"><?= Ts::get(196)?></a></label>
|
||||
<!--<label class="checkbox"><input name="has_cookies" type="checkbox"><span><?= Ts::get(60)?></span></label>-->
|
||||
<label class="checkbox"><input name="has_club_card" type="checkbox"><span><?= Ts::get(61)?></span></label>
|
||||
</div>
|
||||
<!--<div class="g-recaptcha top50" data-sitekey="6LcD2C4hAAAAACNk3wPGoxjVeS5mX2-u5Fqwge3G"></div>-->
|
||||
<div class="submit-panel top25"><?= Ts::get(62)?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const loginScreen = `
|
||||
<p class="msg-success"><?= Ts::get(72) ?></p>
|
||||
<a href="<?= Yii::$app->goToAction('mobile-api/browser-register-close')?>" class="submit-panel top25"><?= Ts::get(53)?></a>`;
|
||||
(new UserSignUp(true)).set()
|
||||
</script>
|
||||
@@ -0,0 +1,61 @@
|
||||
<link rel="stylesheet" href="/_public/assets/css/page.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/article-module.css">
|
||||
<link rel="stylesheet" href="/_public/assets/css/user.css">
|
||||
<!--<script src='https://www.google.com/recaptcha/api.js'></script>-->
|
||||
<script src='/_public/assets/js/user.js'></script>
|
||||
<?php
|
||||
|
||||
use app\models\Ts;
|
||||
use app\services\ViewReg;
|
||||
|
||||
/**
|
||||
* @var \yii\web\View $this
|
||||
*/
|
||||
Yii::$app->controller->pageTitle = Ts::get(55);
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header mobile-hide" style="height: 80px">
|
||||
<a href="<?= Yii::$app->goHome() ?>" class="header-logo top-care">
|
||||
<?php if (Yii::$app->language == 'en'): ?>
|
||||
<img src="/_public/images/logo_en/N-logo-03.png">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo.png">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="panel-title top50"><?= Ts::get(55)?></div>
|
||||
<div class="panel-box top25 sign-up-box">
|
||||
<input name="full_name" placeholder="<?= Ts::get('56') //Name, surname ?>">
|
||||
<input name="email" placeholder="E-mail">
|
||||
<input type="password" name="password" placeholder="<?= Ts::get('57') //Password ?>">
|
||||
<div class="row flex">
|
||||
<div class="password-strength-label"><?= Ts::get(195) ?></div>
|
||||
<div class="password-strength">
|
||||
<div class="weak unused"></div>
|
||||
<div class="middle unused"></div>
|
||||
<div class="strong unused"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="password" name="cPassword" placeholder="<?= Ts::get('58') //Password conf. ?>">
|
||||
<input type="text" name="minecraft_user" placeholder="<?= Ts::get('201') ?>">
|
||||
|
||||
<div class="confirm-checkboxes top25">
|
||||
<label class="checkbox"><input name="has_terms" type="checkbox"><a href="<?= ViewReg::goToPage(14) ?>"><?= Ts::get(59)?></a></label>
|
||||
<label class="checkbox"><input name="has_privacy" type="checkbox"><a href="<?= ViewReg::goToPage(15)?>"><?= Ts::get(196)?></a></label>
|
||||
<!--<label class="checkbox"><input name="has_cookies" type="checkbox"><span><?= Ts::get(60)?></span></label>-->
|
||||
<label class="checkbox"><input name="has_club_card" type="checkbox"><span><?= Ts::get(61)?></span></label>
|
||||
<label class="checkbox"><input name="has_double_auth" type="checkbox"><span><?= Ts::get(198)?></span></label>
|
||||
<label class="checkbox"><input name="has_newsletter" type="checkbox"><span><?= Ts::get(199)?></span></label>
|
||||
</div>
|
||||
<!--<div class="g-recaptcha top50" data-sitekey="6LcD2C4hAAAAACNk3wPGoxjVeS5mX2-u5Fqwge3G"></div>-->
|
||||
<div class="submit-panel top25"><?= Ts::get(62)?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const loginScreen = `
|
||||
<p class="msg-success"><?= Ts::get(72) ?></p>
|
||||
<a href="<?= Yii::$app->goToAction('user/login')?>" class="submit-panel top25"><?= Ts::get(53)?></a>`;
|
||||
(new UserSignUp().set())
|
||||
</script>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
use app\models\OrderBooking;
|
||||
use app\services\JWT;
|
||||
|
||||
$id = $_GET['id'] ?? null;
|
||||
|
||||
$user = \app\services\Auth::getUser();
|
||||
$lg = Yii::$app->language;
|
||||
$message = [
|
||||
'ticket_for' => [
|
||||
'bg' => 'Билет за',
|
||||
'en' => 'Ticket for',
|
||||
],
|
||||
'bookings' => [
|
||||
'bg' => 'Резервации',
|
||||
'en' => 'Bookings'
|
||||
],
|
||||
'ticket_type' => [
|
||||
'bg' => 'вид билет',
|
||||
'en' => 'ticket type',
|
||||
],
|
||||
'event_date' => [
|
||||
'bg' => 'дата на събитието',
|
||||
'en' => 'event date',
|
||||
],
|
||||
'ticket' => [
|
||||
'bg' => 'билет',
|
||||
'en' => 'ticket'
|
||||
],
|
||||
'ticket_count' => [
|
||||
'bg' => 'Брой лица, които могат да посетят събитието с този билет',
|
||||
'en' => 'Number of people who can attend the event with this ticket'
|
||||
],
|
||||
'print_ticket' => [
|
||||
'bg' => 'Разпечатай билета',
|
||||
'en' => 'Print ticket'
|
||||
],
|
||||
'event_venue' => [
|
||||
'bg' => 'Място на събитието',
|
||||
'en' => 'Event venue'
|
||||
],
|
||||
'order_id' => [
|
||||
'en' =>'Order ID',
|
||||
'bg' => 'Номер на поръчката'
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
if ($id):
|
||||
$b = OrderBooking::findOne($id);
|
||||
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background: #FFFFFF;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#qrcode {
|
||||
margin: 0 auto;
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.order-sub-item {
|
||||
text-align: center;
|
||||
width: calc(100% - 20px);
|
||||
max-width: 350px;
|
||||
margin: 50px auto 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.order-sub-item-title {
|
||||
margin-bottom: 20px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.order-sub-item .type {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.ticket-header img {
|
||||
width: 350px;
|
||||
margin: 50px auto 0;
|
||||
display: block;
|
||||
transform: translateX(-20px);
|
||||
}
|
||||
|
||||
.print-ticket-button {
|
||||
color: #FFFFFF;
|
||||
background: #6F602E;
|
||||
padding: 20px;
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
left: calc(50% - 100px);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.print-ticket-button img {
|
||||
width: 18px;
|
||||
margin-right: 10px;
|
||||
transform: translateY(5px);
|
||||
}
|
||||
</style>
|
||||
<input id="data" value="<?= $b->getHashedId() ?>" type="hidden">
|
||||
<div class="print-ticket-button" onclick="printTicket()"><img
|
||||
src="/_public/images/printing.png"><?= $message['print_ticket'][$lg] ?></div>
|
||||
|
||||
<div id="ticket" style="max-width: 350px; width: 100%; margin: 0 auto; font-family: 'Arial',sans-serif">
|
||||
<div class="ticket-header">
|
||||
<?php if ($lg == 'bg'): ?>
|
||||
<img src="/_public/images/logo-b.png"
|
||||
style="display: block; width: 350px; margin: 50px auto 0; transform: translateX(-10px)">
|
||||
<?php else: ?>
|
||||
<img src="/_public/images/logo_en/N-logo-02.png"
|
||||
style="display: block; width: 350px; margin: 50px auto 0; transform: translateX(-10px)">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="qrcode" style="width: 200px; height: 200px; margin: 50px auto 0"></div>
|
||||
<div class="order-sub-item" style="text-align: center; margin-top: 50px">
|
||||
<div class="order-sub-item-title" style="margin-bottom: 10px; font-size: 22px"><?= $message['order_id'][$lg] ?>: <?= $b->order_id ?></div>
|
||||
<div class="order-sub-item-title"
|
||||
style="margin-bottom: 20px; font-size: 22px"><?= $message['ticket_for'][$lg] . ': "' . $b->event->title(Yii::$app->language) . '"' ?></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="type" style="margin-bottom: 10px"><b style="color: grey"><?= $message['ticket_type'][$lg] ?></b>: <?= $b->{'name_' . $lg} ?>
|
||||
- <?= $b->single_price ?> лв.
|
||||
</div>
|
||||
<div class="type" style="margin-bottom: 10px"><b
|
||||
style="color: grey"><?= $message['ticket_count'][$lg] ?></b>: <?= $b->tickets_count ?>
|
||||
</div>
|
||||
<div class="type" style="margin-bottom: 10px"><b
|
||||
style="color: grey"><?= $message['event_date'][$lg] ?></b>: <?= $b->formatedHtmlDate() ?>
|
||||
</div>
|
||||
<div class="type"><b
|
||||
style="color: grey"><?= $message['event_venue'][$lg] ?></b>:
|
||||
<div><?= $lg == 'bg' ? $b->event->location : $b->event->ts_en_location ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/_public/plugins/qrcode/qrcode.min.js"></script>
|
||||
<script>
|
||||
function generateQRCode() {
|
||||
const data = document.getElementById("data").value;
|
||||
const qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
text: data,
|
||||
width: 200,
|
||||
height: 200,
|
||||
colorDark: "#000000",
|
||||
colorLight: "#ffffff",
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
});
|
||||
}
|
||||
|
||||
generateQRCode()
|
||||
|
||||
|
||||
function printTicket() {
|
||||
// Get the target div element by its ID
|
||||
const targetDiv = document.getElementById('ticket');
|
||||
|
||||
// Clone the target div element and all of its children
|
||||
const clonedDiv = targetDiv.cloneNode(true);
|
||||
|
||||
// Get all of the style sheets that are applied to the current document
|
||||
const styleSheets = document.styleSheets;
|
||||
|
||||
// Iterate through each style sheet and add its rules to the cloned div
|
||||
for (let i = 0; i < styleSheets.length; i++) {
|
||||
const rules = styleSheets[i].cssRules;
|
||||
for (let j = 0; j < rules.length; j++) {
|
||||
clonedDiv.style.cssText += rules[j].cssText;
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new hidden iframe
|
||||
const printFrame = document.createElement('iframe');
|
||||
printFrame.setAttribute('style', 'position:absolute;width:0;height:0;left:-500px;top:-500px;');
|
||||
document.body.appendChild(printFrame);
|
||||
|
||||
// Add the cloned div to the new iframe
|
||||
printFrame.contentDocument.body.appendChild(clonedDiv);
|
||||
|
||||
// Print the contents of the new iframe
|
||||
printFrame.contentWindow.print();
|
||||
|
||||
// Remove the iframe from the document
|
||||
document.body.removeChild(printFrame);
|
||||
}
|
||||
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user