first commit

This commit is contained in:
Konstantin
2026-05-30 09:27:58 +03:00
commit de0344d218
2371 changed files with 661486 additions and 0 deletions
@@ -0,0 +1,47 @@
.banners{
}
.banners.banner-reverse{
}
.banners .background-block{
background: var(--color-gray);
}
.banners.banner-reverse .background-block{
background: var(--color-secondary);
}
.banners .banner-text{
width: 100%;
padding: 120px;
}
.banners .banner-text p:last-child{
margin-bottom: 0;
}
@media (min-width: 768px){
.banners:not(.banner-reverse) .banner-item:nth-child(2n) .row {
flex-direction: row-reverse;
}
.banners.banner-reverse .banner-item:nth-child(2n - 1) .row {
flex-direction: row-reverse;
}
}
@media (max-width: 767px){
.banners .banner-text{
text-align: center;
padding: 40px;
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,839 @@
:root{
--color-secondary: #D8CECB;
--color-gray: #EEEEEE;
--color-dark-gray: #5c5950;
}
body{
font-family: "Tenor Sans", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}
a{
text-decoration: none;
color: inherit;
}
img{
max-width: 100%;
}
.container-fluid {
max-width: 1400px;
}
p {
margin-bottom: 0.5rem;
}
a:hover{
color: var(--color-secondary);
}
a:hover svg,
a:hover path{
fill: var(--color-secondary);
}
.heading {
font-size: 27px;
line-height: 120%;
}
.subheading{
font-size: 19px;
line-height: 120%;
}
.logo {
font-size: 30px;
}
header .menu {
margin: 0;
padding: 0;
list-style: none;
display: flex;
}
header .menu ul {
position: absolute;
opacity: 0;
visibility: hidden;
transition-duration: 0.2s;
top: 100%;
background-color: white;
width: 260px;
box-shadow: 0px -1px 20px 3px #4b4b4b3d;
padding: 10px 0;
}
header .menu ul li {
padding: 0px 15px;
}
header .menu ul li a {
display: flex;
width: 100%;
}
header .menu li:hover ul{
opacity: 1;
visibility: visible;
}
header .menu li {
padding: 13px 15px;
display: flex;
align-items: center;
}
header .menu li a {
flex-wrap: nowrap;
display: flex;
align-items: center;
}
header .menu svg{
}
header .menu>li:first-child {
padding-left: 0;
}
header .menu>li:last-child {
padding-right: 0;
}
@media (max-width: 767px){
header .menu li {
padding: 13px 8px;
}
.logo {
font-size: 20px;
}
}
.btn {
text-transform: uppercase;
padding: 10px 30px;
border-radius: 0;
box-shadow: none !important;
}
.btn-close{
box-shadow: none !important;
outline: none;
}
.btn-white{
background-color: white;
color: black;
}
.btn-white:hover{
background-color: var(--color-secondary);
}
.product-card .images{
position: relative;
}
.product-card .images .hidden-image{
position: absolute;
left: 0;
top: 0;
opacity: 0;
visibility: hidden;
transition-duration: 0.4s;
}
.product-card .images:hover .hidden-image{
opacity: 1;
visibility: visible;
}
.swiper-pagination-bullet{
transition-duration: 0.45s;
}
.swiper-pagination-bullet-active {
width: 30px !important;
border-radius: 10px !important;
}
.bg-dominik{
background-color: var(--color-secondary);
}
.bg-dominik-dark{
background-color: var(--color-dark-gray);
}
.bg-center {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.position-relative{
z-index: 0;
}
.bg-absolute-background {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.bg-absolute-background img {
z-index: 0;
position: relative;
width: 100%;
height: 100%;
object-fit: cover;
}
section{
overflow-x: hidden;
}
.text-shadow{
text-shadow: -3px 5px 11px #000
}
@media (max-width: 767px){
.section-prems .banner-text {
background-color: var(--color-gray);
color: black !important;
text-shadow: none;
margin-bottom: 1rem;
text-align: center;
}
.section-prems .banner-text p{
margin: 0 auto;
}
.section-prems .bg-dominik-dark{
background-color: transparent;
}
.w-mob-100{
width: 100%;
}
}
.nav-tabs{
border: none;
}
.nav-link {
border: none !important;
text-transform: uppercase;
outline: none;
padding: 0 0 4px 0;
border-bottom: 2px solid #000 !important;
border-radius: 0;
color: black;
opacity: 0.4;
text-wrap: nowrap;
}
.nav-link:hover,.nav-link.active{
opacity: 1;
color: black;
}
.nav-item{
margin-right: 18px;
margin-bottom: 10px;
}
.sw-thumb{
}
.sw-thumb:not(.swiper-slide-thumb-active){
opacity: 0.5;
cursor: pointer;
}
.offcanvas-wrap {
position: fixed;
z-index: 1100;
}
.toast-container{
z-index: 1200;
}
.modal-backdrop {
background-color: var(--color-secondary);
}
.modal-backdrop.show {
opacity: .7;
}
.modal-header {
border-bottom: 0;
}
.form-wrap {
position: relative;
}
.form-wrap label {
background-color: #ffffff;
position: relative;
display: inline-block;
top: 1px;
left: 15px;
}
.form-control {
box-shadow: none !important;
border-radius: 0;
padding: 10px 13px;
}
.form-control:focus{
border-color: #000
}
.fav-btn {
position: absolute;
top: 20px;
right: 20px;
opacity: 0;
visibility: hidden;
}
.product-card:hover .fav-btn{
opacity: 1;
visibility: visible;
}
.fav-btn svg path{
fill: #fff !important;
transition-duration: 0.2s;
}
.fav-btn:hover svg path{
fill: var(--color-secondary) !important;
}
@media (max-width: 767px){
.fav-btn {
opacity: 1;
visibility: visible;
}
}
.abs-loading.abs-loading-fixed {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff61;
display: flex;
align-items: center;
justify-content: center;
}
.abs-loading{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
background-color: #ffffff61;
display: flex;
align-items: center;
justify-content: center;
}
.no-anim .abs-loading{
display: none;
}
.offcanvas .left-menu {
padding: 0 0 10px 0;
list-style: none;
margin: 0 0 10px 0;
border-bottom: 1px solid #dbdbdb;
}
.offcanvas .left-menu ul{
padding: 0;
list-style: none;
margin: 0;
}
.offcanvas .left-menu>li>a {
font-weight: bold;
font-size: 20px;
}
.offcanvas .left-menu li {
text-align: right;
}
.product-page .fav-btn {
opacity: 1;
visibility: visible;
top: auto;
bottom: 4px;
}
.product-page .fav-btn path {
fill: #000 !important;
}
.not-found-page {
min-height: 60vh;
display: flex;
align-items: center;
}
.not-found-wrap {
position: relative;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 40px;
align-items: center;
padding: 70px 0;
border-top: 1px solid var(--color-secondary);
border-bottom: 1px solid var(--color-secondary);
}
.not-found-copy {
max-width: 620px;
}
.not-found-eyebrow {
margin-bottom: 18px;
color: var(--color-dark-gray);
text-transform: uppercase;
font-size: 13px;
letter-spacing: 0;
}
.not-found-copy .heading {
margin-bottom: 20px;
font-size: 46px;
}
.not-found-copy p {
max-width: 540px;
}
.not-found-actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 32px;
}
.not-found-actions .btn-white {
border: 1px solid var(--color-secondary);
}
.not-found-mark {
width: min(38vw, 430px);
aspect-ratio: 1 / 1;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--color-secondary);
color: #fff;
}
.not-found-mark span {
font-size: 170px;
line-height: 1;
}
@media (max-width: 1199px){
.not-found-mark span {
font-size: 130px;
}
}
@media (max-width: 767px){
.not-found-page {
min-height: auto;
}
.not-found-wrap {
grid-template-columns: 1fr;
gap: 28px;
padding: 44px 0;
}
.not-found-copy .heading {
font-size: 34px;
}
.not-found-actions {
flex-direction: column;
}
.not-found-actions .btn {
width: 100%;
}
.not-found-mark {
width: 100%;
max-height: 220px;
}
.not-found-mark span {
font-size: 96px;
}
}
.contact-page {
background: linear-gradient(180deg, #f8f6f5 0, #fff 420px);
color: #14142b;
}
.contact-hero {
padding: 34px 0 44px;
}
.contact-breadcrumb {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 0;
margin: 0 0 34px;
list-style: none;
color: rgba(20, 20, 43, 0.62);
font-size: 14px;
}
.contact-breadcrumb a:hover {
color: #14142b;
}
.contact-hero__grid {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
gap: 32px;
align-items: end;
}
.contact-hero__content h1,
.contact-store__body h2,
.contact-form__head h2,
.contact-locations h2 {
margin: 0;
color: #14142b;
line-height: 1.12;
}
.contact-hero__content h1 {
max-width: 720px;
font-size: clamp(38px, 5.2vw, 78px);
}
.contact-hero__content p {
max-width: 560px;
margin: 18px 0 0;
color: rgba(20, 20, 43, 0.72);
font-size: 18px;
line-height: 1.55;
}
.contact-eyebrow {
display: inline-flex;
margin-bottom: 12px;
color: var(--color-dark-gray);
font-size: 13px;
line-height: 1.2;
text-transform: uppercase;
}
.contact-quick {
display: grid;
gap: 12px;
}
.contact-quick__item {
display: flex;
gap: 14px;
align-items: center;
padding: 18px;
background: #fff;
border: 1px solid rgba(20, 20, 43, 0.1);
border-radius: 8px;
box-shadow: 0 16px 42px rgba(20, 20, 43, 0.06);
transition: border-color 0.2s, transform 0.2s;
}
.contact-quick__item:hover {
color: #14142b;
border-color: rgba(20, 20, 43, 0.28);
transform: translateY(-2px);
}
.contact-quick__icon {
display: inline-flex;
flex: 0 0 46px;
align-items: center;
justify-content: center;
width: 46px;
height: 46px;
background: var(--color-secondary);
border-radius: 50%;
color: #14142b;
}
.contact-quick small,
.contact-detail__label {
display: block;
margin-bottom: 5px;
color: rgba(20, 20, 43, 0.54);
font-size: 12px;
line-height: 1.25;
text-transform: uppercase;
}
.contact-quick strong,
.contact-detail__value {
display: block;
color: #14142b;
font-size: 18px;
font-weight: 400;
line-height: 1.35;
}
.contact-section {
padding: 0 0 72px;
}
.contact-layout {
display: grid;
grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
gap: 28px;
align-items: start;
}
.contact-info,
.contact-form {
min-width: 0;
}
.contact-card,
.contact-detail,
.contact-form,
.contact-location {
background: #fff;
border: 1px solid rgba(20, 20, 43, 0.1);
border-radius: 8px;
box-shadow: 0 18px 48px rgba(20, 20, 43, 0.055);
}
.contact-card--store {
display: grid;
grid-template-columns: 180px minmax(0, 1fr);
overflow: hidden;
}
.contact-card--no-image {
grid-template-columns: 1fr;
}
.contact-store__image {
min-height: 210px;
background: var(--color-gray);
}
.contact-store__image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.contact-store__body {
padding: 26px;
}
.contact-store__body h2,
.contact-form__head h2,
.contact-locations h2 {
font-size: 30px;
}
.contact-muted {
margin: 10px 0 0;
color: rgba(20, 20, 43, 0.68);
line-height: 1.55;
}
.contact-details {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
margin-top: 14px;
}
.contact-detail {
padding: 22px;
}
.contact-detail:first-child {
grid-column: 1 / -1;
}
.contact-detail address {
margin: 0;
color: #14142b;
font-size: 18px;
line-height: 1.5;
}
.contact-detail__label--spaced {
margin-top: 18px;
}
.contact-link {
display: inline-flex;
margin-top: 14px;
color: #14142b;
border-bottom: 1px solid currentColor;
}
.contact-link:hover {
color: var(--color-dark-gray);
}
.contact-locations {
margin-top: 28px;
}
.contact-locations h2 {
margin-bottom: 16px;
}
.contact-location {
overflow: hidden;
}
.contact-location + .contact-location {
margin-top: 10px;
}
.contact-location .accordion-button {
padding: 18px 20px;
background: #fff;
color: #14142b;
border: 0;
border-radius: 0;
box-shadow: none;
font-size: 18px;
}
.contact-location .accordion-button:not(.collapsed) {
background: #f8f6f5;
color: #14142b;
}
.contact-location .accordion-body {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
padding: 18px;
border-top: 1px solid rgba(20, 20, 43, 0.1);
}
.contact-location .contact-detail {
padding: 0;
border: 0;
border-radius: 0;
box-shadow: none;
}
.contact-location__image {
width: 100%;
height: 180px;
object-fit: cover;
border-radius: 8px;
}
.contact-form {
position: sticky;
top: 92px;
padding: 30px;
}
.contact-form__head {
margin-bottom: 24px;
}
.contact-form__head p {
margin: 10px 0 0;
color: rgba(20, 20, 43, 0.68);
line-height: 1.55;
}
.contact-form .form-wrap {
margin-bottom: 18px;
}
.contact-form .form-wrap label {
margin-bottom: 0;
color: rgba(20, 20, 43, 0.74);
}
.contact-form .form-control {
min-height: 48px;
border-color: rgba(20, 20, 43, 0.18);
background-color: #fff;
color: #14142b;
}
.contact-form textarea.form-control {
min-height: 156px;
resize: vertical;
}
.contact-form .form-control:focus {
border-color: #14142b;
}
.contact-form .text-danger {
margin-top: 7px;
font-size: 14px;
}
.contact-captcha {
margin-bottom: 18px;
}
.contact-submit {
width: 100%;
min-height: 52px;
background: #14142b;
border-color: #14142b;
color: #fff;
}
.contact-submit:hover,
.contact-submit:focus {
background: var(--color-dark-gray);
border-color: var(--color-dark-gray);
color: #fff;
}
@media (max-width: 991px) {
.contact-hero__grid,
.contact-layout {
grid-template-columns: 1fr;
}
.contact-form {
position: static;
}
}
@media (max-width: 767px) {
.contact-hero {
padding: 24px 0 32px;
}
.contact-breadcrumb {
margin-bottom: 24px;
}
.contact-hero__content h1 {
font-size: 38px;
}
.contact-hero__content p {
font-size: 16px;
}
.contact-section {
padding-bottom: 44px;
}
.contact-card--store,
.contact-details,
.contact-location .accordion-body {
grid-template-columns: 1fr;
}
.contact-store__image {
min-height: 190px;
}
.contact-store__body,
.contact-detail,
.contact-form {
padding: 20px;
}
.contact-store__body h2,
.contact-form__head h2,
.contact-locations h2 {
font-size: 25px;
}
.contact-quick__item {
padding: 15px;
}
}
@@ -0,0 +1,49 @@
.slideshow{
--swiper-pagination-color: var(--color-secondary);
--swiper-theme-color: var(--color-secondary);
}
.slideshow .banner-content {
position: relative;
z-index: 0;
}
.slideshow .banner-text {
position: absolute;
z-index: 1;
top: 0;
left: 0;
max-width: 50%;
padding: 120px 0 0 130px;
color: white;
}
.slideshow .banner-text .subheading {
max-width: 312px;
}
.slideshow .banner-text .subheading p:last-child {
margin-bottom: 0;
}
@media (max-width: 1199px){
.slideshow .banner-text {
padding: 50px 0 0 60px;
}
}
@media (max-width: 767px){
.slideshow .banner-text {
position: relative;
background-color: var(--color-gray);
padding: 60px 15px;
width: 100%;
max-width: 100%;
text-align: center;
color: black;
}
.slideshow .banner-text .subheading {
margin: 0 auto;
}
.slideshow .banner-text .btn{
background-color: black;
color: white;
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
/*!
* ZooMove v1.0.0
* http://thompsonemerson.github.io/zoomove
*
* Copyright (c) 2016, Emerson Thompson
* Licensed http://thompsonemerson.mit-license.org
*/
.zoo-item{position:absolute;width:100%;height:100%;overflow:hidden;transition:all 150ms linear;display:flex;align-items:center;justify-content:center}.zoo-item .zoo-img{position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-position:center;background-size:cover;transition:transform 0.5s ease-out}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,576 @@
function NextPage(page, elem, btn){
console.log(page);
/*if(elem){
if($.isArray(elem)){
$(elem).each(function(a,e){
$(e).addClass('position-relative').append('<div class="abs-loading"><div class="spinner-border text-primary avatar-xs" role="status"><span class="visually-hidden">Loading...</span></div></div>');
})
} else {
$(elem).addClass('position-relative').append('<div class="abs-loading"><div class="spinner-border text-primary avatar-xs" role="status"><span class="visually-hidden">Loading...</span></div></div>');
}
}*/
var currentUrl = window.location.href;
var hasPageParam = currentUrl.indexOf('page=') !== -1;
if (hasPageParam) {
// изменяем значение параметра page на 2
currentUrl = currentUrl.replace(/page=\d+/, 'page=' + page);
} else {
// добавляем параметр page со значением 1
currentUrl += (currentUrl.indexOf('?') === -1 ? '?' : '&') + 'page=' + page;
}
$.ajax({
url: currentUrl,
type: 'get',
dataType: 'html',
success: function(html) {
history.pushState(null, null, currentUrl);
if(elem){
if($.isArray(elem)){
$(elem).each(function(a,e){
$(e).append($(html).find(e).html());
})
} else {
$(elem).append($(html).find(elem).html());
}
}
//$(btn).remove();
$(".pagination").html($(html).find('.pagination').html())
$(elem).find('.abs-loading').remove();
if(!parseInt($('.pagination').find('.active').next().text())){
$(btn).remove();
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
var modal = {
'load': function(url, data = {}){
send.post(url, data, function(json){
modal.create(json);
}, function(json){
ShowToast('Не могу продолжить - не получил контент окна', 'warning', 'Предупреждение');
})
},
'create': function(json){
if(!json['modal']){
ShowToast('Контент не задан','danger', 'Ошибка');
} else {
if(!json['random']){
json['random'] = token(32);
}
var html = $("<div>").addClass('modal fade').attr({
'id': 'modal-' + json['random'],
'tabindex': '-1',
'data-bs-backdrop': 'false',
});
var dialog = $("<div>").addClass('modal-dialog modal-dialog-centered');
if(json['align']){
if(json['align'] == 'top'){
dialog.removeClass('modal-dialog-centered');
}
}
if(json['width']){
dialog.css('width', json['width']);
dialog.css('max-width', '100%');
}
var content = $('<div>').addClass('modal-content');
if(json['title']){
content.append('<div class="modal-header"><h5 class="modal-title heading text-center w-100 pt-4" id="'+json['random']+'ModalLabel">' + json['title'] + '</h5><button type="button" class="btn-close position-absolute end-0 top-0 pe-5 pt-5" data-bs-dismiss="modal" aria-label="Close"></button></div>');
} else {
content.addClass('position-relative');
content.append('<button type="button" style="z-index: 1" class="btn-close end-0 position-absolute top-0 p-3" data-bs-dismiss="modal" aria-label="Close"></button>');
}
var body = $('<div>').addClass('modal-body');
if(json['class']){
if(json['class']['modal-body']){
body.addClass(json['class']['modal-body']);
}
if(json['class']['modal-title']){
content.find('.modal-title').addClass(json['class']['modal-title']);
}
}
body.html(json['modal']);
content.append(body);
dialog.append(content);
html.append(dialog);
var wrap = $("<div class='offcanvas-wrap'>");
var backdrop = $("<div class='modal-backdrop fade'>");
wrap.append(html);
wrap.append(backdrop);
$("body").append(wrap);
html.click(function(e){
if($(e.target).hasClass('modal')){
html.addClass('modal-static');
setTimeout(function(){
html.removeClass('modal-static');
}, 250);
}
})
$(html).on('show.bs.modal', function (event) {
if(json['callback'] && json['callback']['show']){
json.callback.show()
}
setTimeout(function(){
backdrop.addClass('show');
}, 1);
})
$(html).on('shown.bs.modal', function (event) {
})
$(html).on('hide.bs.modal', function (event) {
backdrop.removeClass('show');
})
$(html).on('hidden.bs.modal', function (event) {
$(wrap).remove();
})
$(html).modal('show');
return html;
}
}
}
function mobilemenu(){
var params = {};
params['title'] = $('header .logo')[0].outerHTML;
var content = $("<div>");
content.append($($("header .left-menu")[0].outerHTML));
content.append($("<div>").addClass('text-end').html($("footer .container-fluid").html()).find('.text-center').removeClass('text-center').addClass('text-end'))
params['offcanvas'] = content;
params['width'] = 320;
offcanvas.create(params);
}
var offcanvas = {
'load': function(url, data = {}){
send.post(url, data, function(json){
offcanvas.create(json);
}, function(json){
ShowToast('Не могу продолжить - не получил контент окна', 'warning', 'Предупреждение');
})
},
'create': function(json){
$("body>.abs-loading").remove();
if(!json['random']){
json['random'] = token(32);
}
if(!json['offcanvas']){
ShowToast('Контент не задан','danger', 'Ошибка');
} else {
if(json['js']){
$(json['js']).each(function(i,e){
if(!$("head script[src='"+e+"']").length && !$("body script[src='"+e+"']").length){
$('head').append('<script src="'+e+'"></script>');
}
})
}
var html = $("<div>").addClass('offcanvas offcanvas-end');
if(json['class'] && json['class']['offcanvas']){
html.addClass(json['class']['offcanvas'])
}
if(json['width']){
html.css('width', json['width'])
}
html.attr({
'tabindex': '-1',
'id': 'offcanvas-' + json['random'],
'data-bs-backdrop': 'true',
'data-bs-keyboard': 'false',
})
var header = $("<div>").addClass('offcanvas-header');
if(json['title']){
header.append('<h5 class="offcanvas-title">' + json['title'] + '</h5>');
}
var btn_close = $('<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Закрыть"></button>');
header.append(btn_close);
html.append(header);
var body = $("<div>").addClass('offcanvas-body');
if(json['class'] && json['class']['offcanvas-body']){
body.addClass(json['class']['offcanvas-body']);
}
if(json['offcanvas']){
body.html(json['offcanvas']);
}
html.append(body);
var wrap = $("<div>").addClass('offcanvas-wrap');
wrap.attr({
'id': 'offcanvas-wrap-'+json['random'],
'data-random': json['random'],
})
wrap.append(html);
$("body").append(wrap);
html.offcanvas('show');
if(html.find('.offcanvas-buttons').length){
html.find('.offcanvas-buttons').addClass('position-absolute border-1 border-top bottom-0 start-0 w-100 p-3');
}
html.on('shown.bs.offcanvas', function (event) {
if(html.find('.offcanvas-buttons').length){
body.css({
'margin-bottom': $('#offcanvas-' + json['random']).find('.offcanvas-buttons').outerHeight() - 1,
})
}
})
html.on('hide.bs.offcanvas', function (event) {
if(json['confirm_close'] && !html.hasClass('allow-hide')){
event.preventDefault();
ShowConfirm('Действительно закрыть это окно? Все несохранённые данные будут потеряны', function(){
json['confirm_close'] = null;
html.offcanvas('hide');
});
}
})
html.on('hidden.bs.offcanvas', function (event) {
wrap.remove();
})
}
}
}
function token(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
function ShowConfirm(confirmation, func, defunc = false){
var params = {};
params['title'] = 'Подтверждение';
params['width'] = 360;
var body = $("<div>");
var text = $("<div>").html(confirmation).addClass('mb-3');
body.append(text);
var btn_confirm = $("<button type='button'>").text('Продолжить').addClass('btn btn-success');
var btn_cancel = $("<button type='button'>").text('Отмена').addClass('btn btn-text');
var flex = $("<div>").addClass('hstack gap-2');
flex.append(btn_confirm)
flex.append(btn_cancel)
body.append(flex);
params['class'] = {};
params['class']['modal-title'] = 'w-100 pe-4 text-start';
params['modal'] = body;
var mm = modal.create(params);
//
btn_confirm.click(function(){
mm.modal('hide');
func % func();
})
btn_cancel.click(function(){
mm.modal('hide');
if(defunc){
defunc % defunc();
}
})
}
var send = {
'post': function(url, data, callback = false, error_callback = false){
$.ajax({
url: url,
type: 'post',
data: data,
dataType: 'json',
success: function(json) {
if(json['error'] && json['error'].length){
$(json['error']).each(function(i,e){
ShowToast(e,'danger','Ошибка');
})
if(error_callback){
error_callback(json);
}
}
if(json['success']){
if(json['redirect']){
window.location.href = json['redirect'];
return;
}
if(json['redirect_blank']){
window.open(json['redirect_blank'], '_blank');
}
if(callback){
callback(json);
}
}
},
error: function(xhr, ajaxOptions, thrownError) {
$(".abs-loading").remove();
ShowToast(xhr.statusText +'<br>Отправьте эту информацию разработчику<br>' + JSON.stringify(data), 'danger', 'Ошибка ' + xhr.status, 30000)
}
});
}
}
function ShowToast(html, background = 'primary', title = 'Уведомление', timeout = 3000){
if(!$(".toast-container").length){
$("body").append($("<div>").addClass('toast-container top-0 end-0 position-fixed p-3'));
}
var t = $("<div>").addClass('toast').attr({
'role': 'alert',
'aria-live': 'assertive',
'aria-atomic': 'true',
})
var t_header = $("<div>").addClass('toast-header')
t_header.append('<svg class="bd-placeholder-img rounded me-2" width="20" height="20" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" preserveAspectRatio="xMidYMid slice" focusable="false"><rect width="100%" height="100%" fill="var(--bs-'+background+')"></rect></svg>');
t_header.append('<strong class="me-auto">'+title+'</strong>');
t_header.append('<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Закрыть"></button>');
t.append(t_header)
t.append($('<div>').addClass('toast-body').html(html));
$(".toast-container").append(t);
t.toast('show');
t.on('hidden.bs.toast', function (event) {
t.remove();
if($(".toast-container").children('.toast').length == 0){
$(".toast-container").remove();
}
});
}
$(document).on("keydown", function (e){
switch(e.key){
case "Escape":
var last_elem = $(".offcanvas-wrap:last-child");
if(last_elem.length){
if(last_elem.children('.offcanvas').length){
last_elem.children('.offcanvas').offcanvas('hide');
} else if(last_elem.children('.modal').length){
last_elem.children('.modal').modal('hide');
}
}
return;
break;
}
});
function addLoading(elem){
$(".loading").remove();
$elem = $(elem);
$elem.addClass('position-relative');
//$elem.attr('data-old-class', $elem.attr('class'));
$elem.append($('<div class="loading">').append('<div class="spinner-border text-success" role="status"><span class="visually-hidden">Загрузка...</span></div>'));
}
function SendRequest(product_id = 0){
var params = {};
params['title'] = product_id ? 'Оставьте заявку' : 'Отправить сообщение';
params['width'] = 420;
var form = $("<form>");
form.append($(product_id ? '<p>И мы свяжемся с вами, чтобы назначить время примерки платья</p>' : '<p>Оставьте своё сообщение и мы свяжемся с Вами для консультации</p>').addClass('text-center'));
if(product_id){
form.append($("<div>").text($(".product-title").text()).addClass('text-center heading mb-4'))
form.append('<input type="hidden" name="product_id" value="'+product_id+'">');
}
form.append('<div class="form-wrap mb-3"><label>Ваше имя</label><input type="text" class="form-control" name="name"></div>');
form.append('<div class="form-wrap mb-3"><label>Номер телефона</label><input type="tel" class="form-control" name="telephone" required ></div>');
form.append('<div class="form-wrap mb-3"><label>Комментарий</label><textarea rows="2" class="form-control" name="comment"></textarea></div>');
form.append('<button type="submit" class="btn btn-dark w-100 d-block">ЗАПИСАТЬСЯ на ПРИМЕРКУ</button>')
params['modal'] = form;
var mm = modal.create(params);
form.submit(function(e){
e.preventDefault();
send.post('index.php?route=tool/callback', $(this).serialize(), function(json){
form.html('<h3>Заявка отправлена</h3><p>Мы уже получили Вашу заявку и в скором времени свяжемся с Вами!</p>').addClass('text-center');
form.append($('<button type="button" class="btn btn-dark w-100 d-block mt-3">Продолжить выбор</button>').click(function(){
mm.modal('hide');
}));
setTimeout(function(){
mm.modal('hide');
}, 5000);
})
})
}
var wishlist = {
'add': function(product_id){
send.post('index.php?route=account/wishlist/add', {product_id: product_id}, function(json){
ShowToast(json['success'], 'bg-success');
$(".text-wishlist").text(json['total']);
if($(".section-wishlist").length){
UpdatePage(['#section-wishlist']);
} else {
UpdatePage(['[data-product-id="'+product_id+'"]']);
}
})
}
}
function UpdatePage(elem, data = false, callback = false, url = '', anim = true){
if(elem && anim){
if($.isArray(elem)){
$(elem).each(function(a,e){
$(e).attr('data-old-class', $(e).attr('class'));
$(e).addClass('position-relative').append('<div class="abs-loading"><div class="spinner-border text-primary avatar-xs" role="status"><span class="visually-hidden">Loading...</span></div></div>');
})
} else {
$(elem).addClass('position-relative').append('<div class="abs-loading"><div class="spinner-border text-primary avatar-xs" role="status"><span class="visually-hidden">Loading...</span></div></div>');
$(elem).attr('data-old-class', $(elem).attr('class'));
}
}
$.ajax({
url: url ? url : $(location).attr('href'),
type: data ? 'post' : 'get',
data: data,
dataType: 'html',
success: function(html) {
html = $.trim(html);
if(elem){
if($.isArray(elem)){
$(elem).each(function(a,e){
$(e).html($(html).find(e).html());
if(anim){
$(e).attr('class', $(e).attr('data-old-class'));
}
})
} else {
$(elem).html($(html).find(elem).html());
if(anim){
$(elem).attr('class', $(elem).attr('data-old-class'));
}
}
}
if(callback){
callback & callback();
}
if(url){
history.pushState(null, null, url);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
/*!
* ZooMove v1.1.0
* http://thompsonemerson.github.io/zoomove
*
* Copyright (c) 2016, Emerson Thompson
* Licensed http://thompsonemerson.mit-license.org
*/
!function(a){a.fn.ZooMove=function(b){var c=a.extend({image:"https://placeholdit.imgix.net/~text?txtsize=30&txt=image+default&w=350&h=350&txttrack=0",cursor:"false",scale:"1.5",move:"true",over:"false"},b);c.cursor="true"===c.cursor?"pointer":"default",this.each(function(){c.overD=a(this).attr("zoo-over")?a(this).attr("zoo-over"):c.over,"true"===c.overD&&a(this).css({overflow:"visible","z-index":"100"}),c.imageD=a(this).attr("zoo-image")?a(this).attr("zoo-image"):c.image,a(this).append('<div class="zoo-img"></div>').children(".zoo-img").css({"background-image":"url("+c.imageD+")",cursor:c.cursor})}).on("mouseover",function(b){b.preventDefault(),c.scaleD=a(this).attr("zoo-scale")?a(this).attr("zoo-scale"):c.scale,c.moveD=a(this).attr("zoo-move")?a(this).attr("zoo-move"):c.move,a(this).children(".zoo-img").css({transform:"scale("+c.scaleD+")"})}).on("mousemove",function(b){b.preventDefault(),"true"===c.moveD&&a(this).children(".zoo-img").css({"transform-origin":(b.pageX-a(this).offset().left)/a(this).width()*100+"% "+(b.pageY-a(this).offset().top)/a(this).height()*100+"%"})}).on("mouseout",function(b){b.preventDefault(),a(this).children(".zoo-img").css({transform:"scale(1)"})})}}(jQuery);
Binary file not shown.

After

Width:  |  Height:  |  Size: 693 KiB

@@ -0,0 +1,62 @@
{{ header }}
<div id="account-account" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ text_my_account }}</h2>
<ul class="list-unstyled">
<li><a href="{{ edit }}">{{ text_edit }}</a></li>
<li><a href="{{ password }}">{{ text_password }}</a></li>
<li><a href="{{ address }}">{{ text_address }}</a></li>
<li><a href="{{ wishlist }}">{{ text_wishlist }}</a></li>
</ul>
{% if credit_cards %}
<h2>{{ text_credit_card }}</h2>
<ul class="list-unstyled">
{% for credit_card in credit_cards %}
<li><a href="{{ credit_card.href }}">{{ credit_card.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
<h2>{{ text_my_orders }}</h2>
<ul class="list-unstyled">
<li><a href="{{ order }}">{{ text_order }}</a></li>
<li><a href="{{ download }}">{{ text_download }}</a></li>
{% if reward %}
<li><a href="{{ reward }}">{{ text_reward }}</a></li>
{% endif %}
<li><a href="{{ return }}">{{ text_return }}</a></li>
<li><a href="{{ transaction }}">{{ text_transaction }}</a></li>
<li><a href="{{ recurring }}">{{ text_recurring }}</a></li>
</ul>
<h2>{{ text_my_affiliate }}</h2>
<ul class="list-unstyled">
{% if not tracking %}
<li><a href="{{ affiliate }}">{{ text_affiliate_add }}</a></li>
{% else %}
<li><a href="{{ affiliate }}">{{ text_affiliate_edit }}</a></li>
<li><a href="{{ tracking }}">{{ text_tracking }}</a></li>
{% endif %}
</ul>
<h2>{{ text_my_newsletter }}</h2>
<ul class="list-unstyled">
<li><a href="{{ newsletter }}">{{ text_newsletter }}</a></li>
</ul>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,417 @@
{{ header }}
<div id="account-address" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ text_address }}</h2>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
{% if error_firstname %}
<div class="text-danger">{{ error_firstname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
{% if error_lastname %}
<div class="text-danger">{{ error_lastname }}</div>
{% endif %} </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-company">{{ entry_company }}</label>
<div class="col-sm-10">
<input type="text" name="company" value="{{ company }}" placeholder="{{ entry_company }}" id="input-company" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-address-1">{{ entry_address_1 }}</label>
<div class="col-sm-10">
<input type="text" name="address_1" value="{{ address_1 }}" placeholder="{{ entry_address_1 }}" id="input-address-1" class="form-control" />
{% if error_address_1 %}
<div class="text-danger">{{ error_address_1 }}</div>
{% endif %} </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-address-2">{{ entry_address_2 }}</label>
<div class="col-sm-10">
<input type="text" name="address_2" value="{{ address_2 }}" placeholder="{{ entry_address_2 }}" id="input-address-2" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-city">{{ entry_city }}</label>
<div class="col-sm-10">
<input type="text" name="city" value="{{ city }}" placeholder="{{ entry_city }}" id="input-city" class="form-control" />
{% if error_city %}
<div class="text-danger">{{ error_city }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-postcode" class="form-control" />
{% if error_postcode %}
<div class="text-danger">{{ error_postcode }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-country">{{ entry_country }}</label>
<div class="col-sm-10">
<select name="country_id" id="input-country" class="form-control">
<option value="">{{ text_select }}</option>
{% for country in countries %}
{% if country.country_id == country_id %}
<option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
{% else %}
<option value="{{ country.country_id }}">{{ country.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_country %}
<div class="text-danger">{{ error_country }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-zone">{{ entry_zone }}</label>
<div class="col-sm-10">
<select name="zone_id" id="input-zone" class="form-control">
</select>
{% if error_zone %}
<div class="text-danger">{{ error_zone }}</div>
{% endif %} </div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.type == 'select' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if address_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == address_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if address_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == address_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox"> {% if address_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in address_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %} {{ address_custom_field[custom_field.custom_field_id] }} {% endif %}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% endfor %}
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_default }}</label>
<div class="col-sm-10"> {% if default %}
<label class="radio-inline">
<input type="radio" name="default" value="1" checked="checked" />
{{ text_yes }}</label>
<label class="radio-inline">
<input type="radio" name="default" value="0" />
{{ text_no }}</label>
{% else %}
<label class="radio-inline">
<input type="radio" name="default" value="1" />
{{ text_yes }}</label>
<label class="radio-inline">
<input type="radio" name="default" value="0" checked="checked" />
{{ text_no }}</label>
{% endif %} </div>
</div>
</fieldset>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
// Sort the custom fields
$('.form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('.form-group').length-2) {
$('.form-group').eq(parseInt($(this).attr('data-sort'))+2).before(this);
}
if ($(this).attr('data-sort') > $('.form-group').length-2) {
$('.form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('.form-group').length-2) {
$('.form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('.form-group').length-2) {
$('.form-group:first').before(this);
}
});
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
var element = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(element).button('loading');
},
complete: function() {
$(element).button('reset');
},
success: function(json) {
$(element).parent().find('.text-danger').remove();
if (json['error']) {
$(element).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(element).parent().find('input').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
//--></script>
<script type="text/javascript"><!--
$('select[name=\'country_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=account/account/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').prop('disabled', true);
},
complete: function() {
$('select[name=\'country_id\']').prop('disabled', false);
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('input[name=\'postcode\']').parent().parent().addClass('required');
} else {
$('input[name=\'postcode\']').parent().parent().removeClass('required');
}
html = '<option value="">{{ text_select }}</option>';
if (json['zone'] && json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone'][i]['zone_id'] + '"';
if (json['zone'][i]['zone_id'] == '{{ zone_id }}') {
html += ' selected="selected"';
}
html += '>' + json['zone'][i]['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected">{{ text_none }}</option>';
}
$('select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('select[name=\'country_id\']').trigger('change');
//--></script>
{{ footer }}
@@ -0,0 +1,49 @@
{{ header }}
<div id="account-address" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
{% endif %}
{% if error_warning %}
<div class="alert alert-warning"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ text_address_book }}</h2>
{% if addresses %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
{% for result in addresses %}
<form action="{{ result.delete }}" method="post" enctype="multipart/form-data" id="form-address-{{ result.address_id }}">
<tr>
<td class="text-left">{{ result.address }}</td>
<td class="text-right"><a href="{{ result.update }}" class="btn btn-info">{{ button_edit }}</a> &nbsp;
<a href = "{{ result.delete }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="return confirm('{{ text_confirm }}')">{{ button_delete }}</a></td>
</tr>
</form>
{% endfor %}
</table>
</div>
{% else %}
<p>{{ text_empty }}</p>
{% endif %}
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right"><a href="{{ add }}" class="btn btn-primary">{{ button_new_address }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,410 @@
{{ header }}
<div id="account-affiliate" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend>{{ text_my_affiliate }}</legend>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-company">{{ entry_company }}</label>
<div class="col-sm-10">
<input type="text" name="company" value="{{ company }}" placeholder="{{ entry_company }}" id="input-company" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-website">{{ entry_website }}</label>
<div class="col-sm-10">
<input type="text" name="website" value="{{ website }}" placeholder="{{ entry_website }}" id="input-website" class="form-control" />
</div>
</div>
</fieldset>
<fieldset>
<legend>{{ text_payment }}</legend>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-tax">{{ entry_tax }}</label>
<div class="col-sm-10">
<input type="text" name="tax" value="{{ tax }}" placeholder="{{ entry_tax }}" id="input-tax" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_payment }}</label>
<div class="col-sm-10">
<div class="radio">
<label>{% if payment == 'cheque' %}
<input type="radio" name="payment" value="cheque" checked="checked" />
{% else %}
<input type="radio" name="payment" value="cheque" />
{% endif %}
{{ text_cheque }}</label>
</div>
<div class="radio">
<label>{% if payment == 'paypal' %}
<input type="radio" name="payment" value="paypal" checked="checked" />
{% else %}
<input type="radio" name="payment" value="paypal" />
{% endif %}
{{ text_paypal }}</label>
</div>
<div class="radio">
<label>{% if payment == 'bank' %}
<input type="radio" name="payment" value="bank" checked="checked" />
{% else %}
<input type="radio" name="payment" value="bank" />
{% endif %}
{{ text_bank }}</label>
</div>
</div>
</div>
<div id="payment-cheque" class="payment">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-cheque">{{ entry_cheque }}</label>
<div class="col-sm-10">
<input type="text" name="cheque" value="{{ cheque }}" placeholder="{{ entry_cheque }}" id="input-cheque" class="form-control" />
{% if error_cheque %}
<div class="text-danger">{{ error_cheque }}</div>
{% endif %}
</div>
</div>
</div>
<div id="payment-paypal" class="payment">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-paypal">{{ entry_paypal }}</label>
<div class="col-sm-10">
<input type="text" name="paypal" value="{{ paypal }}" placeholder="{{ entry_paypal }}" id="input-paypal" class="form-control" />
{% if error_paypal %}
<div class="text-danger">{{ error_paypal }}</div>
{% endif %}
</div>
</div>
</div>
<div class="payment" id="payment-bank">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-bank-name">{{ entry_bank_name }}</label>
<div class="col-sm-10">
<input type="text" name="bank_name" value="{{ bank_name }}" placeholder="{{ entry_bank_name }}" id="input-bank-name" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-bank-branch-number">{{ entry_bank_branch_number }}</label>
<div class="col-sm-10">
<input type="text" name="bank_branch_number" value="{{ bank_branch_number }}" placeholder="{{ entry_bank_branch_number }}" id="input-bank-branch-number" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-bank-swift-code">{{ entry_bank_swift_code }}</label>
<div class="col-sm-10">
<input type="text" name="bank_swift_code" value="{{ bank_swift_code }}" placeholder="{{ entry_bank_swift_code }}" id="input-bank-swift-code" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-bank-account-name">{{ entry_bank_account_name }}</label>
<div class="col-sm-10">
<input type="text" name="bank_account_name" value="{{ bank_account_name }}" placeholder="{{ entry_bank_account_name }}" id="input-bank-account-name" class="form-control" />
{% if error_bank_account_name %}
<div class="text-danger">{{ error_bank_account_name }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-bank-account-number">{{ entry_bank_account_number }}</label>
<div class="col-sm-10">
<input type="text" name="bank_account_number" value="{{ bank_account_number }}" placeholder="{{ entry_bank_account_number }}" id="input-bank-account-number" class="form-control" />
{% if error_bank_account_number %}
<div class="text-danger">{{ error_bank_account_number }}</div>
{% endif %}
</div>
</div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'affiliate' %}
{% if custom_field.type == 'select' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if affiliate_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == affiliate_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div>
{% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">
{% if affiliate_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == affiliate_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %}
</div>
{% endfor %}
</div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div>
{% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">
{% if affiliate_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in affiliate_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %}
</div>
{% endfor %}
</div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if affiliate_custom_field[custom_field.custom_field_id] %}{{ affiliate_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if affiliate_custom_field[custom_field.custom_field_id] %}{{ affiliate_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if affiliate_custom_field[custom_field.custom_field_id] %}{{ affiliate_custom_field[custom_field.custom_field_id] }} {% endif %}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if affiliate_custom_field[custom_field.custom_field_id] %}{{ affiliate_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if affiliate_custom_field[custom_field.custom_field_id] %}{{ affiliate_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if affiliate_custom_field[custom_field.custom_field_id] %}{{ affiliate_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
{% if text_agree %}
<div class="buttons clearfix">
<div class="pull-right">{{ text_agree }}
{% if agree %}
<input type="checkbox" name="agree" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="agree" value="1" />
{% endif %}
&nbsp;
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
{% else %}
<div class="buttons clearfix">
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
{% endif %}
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
$('input[name=\'payment\']').on('change', function() {
$('.payment').hide();
$('#payment-' + this.value).show();
});
$('input[name=\'payment\']:checked').trigger('change');
//--></script>
<script type="text/javascript"><!--
// Sort the custom fields
$('.form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('.form-group').length) {
$('.form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('.form-group').length) {
$('.form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('.form-group').length) {
$('.form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('.form-group').length) {
$('.form-group:first').before(this);
}
});
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$(node).parent().find('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
//--></script>
{{ footer }}
@@ -0,0 +1,58 @@
{{ header }}
<div id="account-download" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ heading_title }}</h2>
{% if downloads %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-right">{{ column_order_id }}</td>
<td class="text-left">{{ column_name }}</td>
<td class="text-left">{{ column_size }}</td>
<td class="text-left">{{ column_date_added }}</td>
<td></td>
</tr>
</thead>
<tbody>
{% for download in downloads %}
<tr>
<td class="text-right">{{ download.order_id }}</td>
<td class="text-left">{{ download.name }}</td>
<td class="text-left">{{ download.size }}</td>
<td class="text-left">{{ download.date_added }}</td>
<td><a href="{{ download.href }}" data-toggle="tooltip" title="{{ button_download }}" class="btn btn-primary"><i class="fa fa-cloud-download"></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
{% else %}
<p>{{ text_empty }}</p>
{% endif %}
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,312 @@
{{ header }}
<div id="account-edit" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend>{{ text_your_details }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }} </label>
<div class="col-sm-10">
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
{% if error_firstname %}
<div class="text-danger">{{ error_firstname }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
{% if error_lastname %}
<div class="text-danger">{{ error_lastname }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
<div class="col-sm-10">
<input type="email" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
{% if error_email %}
<div class="text-danger">{{ error_email }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
<div class="col-sm-10">
<input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
{% if error_telephone %}
<div class="text-danger">{{ error_telephone }}</div>
{% endif %}
</div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.type == 'select' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == account_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div>
{% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">
{% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == account_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %}
</div>
{% endfor %}
</div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div>
{% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">
{% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in account_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %}
</div>
{% endfor %}
</div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }} {% endif %}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</fieldset>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
// Sort the custom fields
$('.form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('.form-group').length) {
$('.form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('.form-group').length) {
$('.form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('.form-group').length) {
$('.form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('.form-group').length) {
$('.form-group:first').before(this);
}
});
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
var element = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(element).button('loading');
},
complete: function() {
$(element).button('reset');
},
success: function(json) {
$(element).parent().find('.text-danger').remove();
if (json['error']) {
$(element).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(element).parent().find('input').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
//--></script>
{{ footer }}
@@ -0,0 +1,42 @@
{{ header }}
<div id="account-forgotten" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_email }}</p>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend>{{ text_your_email }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
<div class="col-sm-10">
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
</div>
</div>
</fieldset>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,55 @@
{{ header }}
<div id="account-login" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
{% endif %}
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<div class="row">
<div class="col-sm-6">
<div class="well">
<h2>{{ text_new_customer }}</h2>
<p><strong>{{ text_register }}</strong></p>
<p>{{ text_register_account }}</p>
<a href="{{ register }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
<div class="col-sm-6">
<div class="well">
<h2>{{ text_returning_customer }}</h2>
<p><strong>{{ text_i_am_returning_customer }}</strong></p>
<form action="{{ action }}" method="post" enctype="multipart/form-data">
<div class="form-group">
<label class="control-label" for="input-email">{{ entry_email }}</label>
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-password">{{ entry_password }}</label>
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
<a href="{{ forgotten }}">{{ text_forgotten }}</a></div>
<input type="submit" value="{{ button_login }}" class="btn btn-primary" />
{% if redirect %}
<input type="hidden" name="redirect" value="{{ redirect }}" />
{% endif %}
</form>
</div>
</div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,51 @@
{{ header }}
<div id="account-newsletter" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_newsletter }}</label>
<div class="col-sm-10">
{% if newsletter %}
<label class="radio-inline">
<input type="radio" name="newsletter" value="1" checked="checked" />
{{ text_yes }} </label>
<label class="radio-inline">
<input type="radio" name="newsletter" value="0" />
{{ text_no }}</label>
{% else %}
<label class="radio-inline">
<input type="radio" name="newsletter" value="1" />
{{ text_yes }} </label>
<label class="radio-inline">
<input type="radio" name="newsletter" value="0" checked="checked" />
{{ text_no }}</label>
{% endif %}
</div>
</div>
</fieldset>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,165 @@
{{ header }}
<div id="account-order" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ heading_title }}</h2>
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" colspan="2">{{ text_order_detail }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" style="width: 50%;">{% if invoice_no %} <b>{{ text_invoice_no }}</b> {{ invoice_no }}<br />
{% endif %} <b>{{ text_order_id }}</b> #{{ order_id }}<br />
<b>{{ text_date_added }}</b> {{ date_added }}</td>
<td class="text-left" style="width: 50%;">{% if payment_method %} <b>{{ text_payment_method }}</b> {{ payment_method }}<br />
{% endif %}
{% if shipping_method %} <b>{{ text_shipping_method }}</b> {{ shipping_method }} {% endif %}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" style="width: 50%; vertical-align: top;">{{ text_payment_address }}</td>
{% if shipping_address %}
<td class="text-left" style="width: 50%; vertical-align: top;">{{ text_shipping_address }}</td>
{% endif %} </tr>
</thead>
<tbody>
<tr>
<td class="text-left">{{ payment_address }}</td>
{% if shipping_address %}
<td class="text-left">{{ shipping_address }}</td>
{% endif %} </tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ column_name }}</td>
<td class="text-left">{{ column_model }}</td>
<td class="text-right">{{ column_quantity }}</td>
<td class="text-right">{{ column_price }}</td>
<td class="text-right">{{ column_total }}</td>
{% if products %}
<td style="width: 20px;"></td>
{% endif %} </tr>
</thead>
<tbody>
{% for product in products %}
<tr>
<td class="text-left">{{ product.name }}
{% for option in product.option %} <br />
&nbsp;<small> - {{ option.name }}: {{ option.value }}</small> {% endfor %}</td>
<td class="text-left">{{ product.model }}</td>
<td class="text-right">{{ product.quantity }}</td>
<td class="text-right">{{ product.price }}</td>
<td class="text-right">{{ product.total }}</td>
<td class="text-right" style="white-space: nowrap;">{% if product.reorder %} <a href="{{ product.reorder }}" data-toggle="tooltip" title="{{ button_reorder }}" class="btn btn-primary"><i class="fa fa-shopping-cart"></i></a> {% endif %} <a href="{{ product.return }}" data-toggle="tooltip" title="{{ button_return }}" class="btn btn-danger"><i class="fa fa-reply"></i></a></td>
</tr>
{% endfor %}
{% for voucher in vouchers %}
<tr>
<td class="text-left">{{ voucher.description }}</td>
<td class="text-left"></td>
<td class="text-right">1</td>
<td class="text-right">{{ voucher.amount }}</td>
<td class="text-right">{{ voucher.amount }}</td>
{% if products %}
<td></td>
{% endif %} </tr>
{% endfor %}
</tbody>
<tfoot>
{% for total in totals %}
<tr>
<td colspan="3"></td>
<td class="text-right"><b>{{ total.title }}</b></td>
<td class="text-right">{{ total.text }}</td>
{% if products %}
<td></td>
{% endif %} </tr>
{% endfor %}
</tfoot>
</table>
</div>
{% if comment %}
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ text_comment }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">{{ comment }}</td>
</tr>
</tbody>
</table>
{% endif %}
{% if histories %}
<h3>{{ text_history }}</h3>
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ column_date_added }}</td>
<td class="text-left">{{ column_status }}</td>
<td class="text-left">{{ column_comment }}</td>
</tr>
</thead>
<tbody>
{% if histories %}
{% for history in histories %}
<tr>
<td class="text-left">{{ history.date_added }}</td>
<td class="text-left">{{ history.status }}</td>
<td class="text-left">{{ history.comment }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="3" class="text-center">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
{% endif %}
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,60 @@
{{ header }}
<div id="account-order" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
{% if orders %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-right">{{ column_order_id }}</td>
<td class="text-left">{{ column_customer }}</td>
<td class="text-right">{{ column_product }}</td>
<td class="text-left">{{ column_status }}</td>
<td class="text-right">{{ column_total }}</td>
<td class="text-left">{{ column_date_added }}</td>
<td></td>
</tr>
</thead>
<tbody>
{% for order in orders %}
<tr>
<td class="text-right">#{{ order.order_id }}</td>
<td class="text-left">{{ order.name }}</td>
<td class="text-right">{{ order.products }}</td>
<td class="text-left">{{ order.status }}</td>
<td class="text-right">{{ order.total }}</td>
<td class="text-left">{{ order.date_added }}</td>
<td class="text-right"><a href="{{ order.view }}" data-toggle="tooltip" title="{{ button_view }}" class="btn btn-info"><i class="fa fa-eye"></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
{% else %}
<p>{{ text_empty }}</p>
{% endif %}
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,50 @@
{{ header }}
<div id="account-password" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend>{{ text_password }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-password">{{ entry_password }}</label>
<div class="col-sm-10">
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
{% if error_password %}
<div class="text-danger">{{ error_password }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-confirm">{{ entry_confirm }}</label>
<div class="col-sm-10">
<input type="password" name="confirm" value="{{ confirm }}" placeholder="{{ entry_confirm }}" id="input-confirm" class="form-control" />
{% if error_confirm %}
<div class="text-danger">{{ error_confirm }}</div>
{% endif %}
</div>
</div>
</fieldset>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,84 @@
{{ header }}
<div id="account-recurring" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ heading_title }}</h2>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" colspan="2">{{ text_recurring_detail }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" style="width: 50%;"><b>{{ text_order_recurring_id }}</b> #{{ order_recurring_id }}<br />
<b>{{ text_date_added }}</b> {{ date_added }}<br />
<b>{{ text_status }}</b> {{ status }}<br />
<b>{{ text_payment_method }}</b> {{ payment_method }}</td>
<td class="text-left" style="width: 50%;"><b>{{ text_order_id }}</b> <a href="{{ order }}">#{{ order_id }}</a><br />
<b>{{ text_product }}</b> <a href="{{ product }}">{{ product_name }}</a><br />
<b>{{ text_quantity }}</b> {{ product_quantity }}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ text_description }}</td>
<td class="text-left">{{ text_reference }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" style="width: 50%;">{{ recurring_description }}</td>
<td class="text-left" style="width: 50%;">{{ reference }}</td>
</tr>
</tbody>
</table>
</div>
<h3>{{ text_transaction }}</h3>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ column_date_added }}</td>
<td class="text-left">{{ column_type }}</td>
<td class="text-right">{{ column_amount }}</td>
</tr>
</thead>
<tbody>
{% if transactions %}
{% for transaction in transactions %}
<tr>
<td class="text-left">{{ transaction.date_added }}</td>
<td class="text-left">{{ transaction.type }}</td>
<td class="text-right">{{ transaction.amount }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="3" class="text-center">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{{ recurring }}{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,55 @@
{{ header }}
<div id="account-recurring" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
{% if recurrings %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-right">{{ column_order_recurring_id }}</td>
<td class="text-left">{{ column_product }}</td>
<td class="text-left">{{ column_status }}</td>
<td class="text-left">{{ column_date_added }}</td>
<td class="text-right"></td>
</tr>
</thead>
<tbody>
{% for recurring in recurrings %}
<tr>
<td class="text-right">#{{ recurring.order_recurring_id }}</td>
<td class="text-left">{{ recurring.product }}</td>
<td class="text-left">{{ recurring.status }}</td>
<td class="text-left">{{ recurring.date_added }}</td>
<td class="text-right"><a href="{{ recurring.view }}" data-toggle="tooltip" title="{{ button_view }}" class="btn btn-info"><i class="fa fa-eye"></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="text-right">{{ pagination }}</div>
{% else %}
<p>{{ text_empty }}</p>
{% endif %}
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,419 @@
{{ header }}
<div id="account-register" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_account_already }}</p>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset id="account">
<legend>{{ text_your_details }}</legend>
<div class="form-group required" style="display: {% if customer_groups|length > 1 %} block {% else %} none {% endif %};">
<label class="col-sm-2 control-label">{{ entry_customer_group }}</label>
<div class="col-sm-10">{% for customer_group in customer_groups %}
{% if customer_group.customer_group_id == customer_group_id %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" checked="checked" />
{{ customer_group.name }}</label>
</div>
{% else %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" />
{{ customer_group.name }}</label>
</div>
{% endif %}
{% endfor %}</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
{% if error_firstname %}
<div class="text-danger">{{ error_firstname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
{% if error_lastname %}
<div class="text-danger">{{ error_lastname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
<div class="col-sm-10">
<input type="email" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
{% if error_email %}
<div class="text-danger">{{ error_email }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
<div class="col-sm-10">
<input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
{% if error_telephone %}
<div class="text-danger">{{ error_telephone }}</div>
{% endif %} </div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.type == 'select' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if register_custom_field[custom_field.location][custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">{% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %}</div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">{% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in register_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %} {{ register_custom_field[custom_field.custom_field_id] }} {% endif %}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% endfor %}
</fieldset>
<fieldset>
<legend>{{ text_your_password }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-password">{{ entry_password }}</label>
<div class="col-sm-10">
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
{% if error_password %}
<div class="text-danger">{{ error_password }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-confirm">{{ entry_confirm }}</label>
<div class="col-sm-10">
<input type="password" name="confirm" value="{{ confirm }}" placeholder="{{ entry_confirm }}" id="input-confirm" class="form-control" />
{% if error_confirm %}
<div class="text-danger">{{ error_confirm }}</div>
{% endif %} </div>
</div>
</fieldset>
<fieldset>
<legend>{{ text_newsletter }}</legend>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_newsletter }}</label>
<div class="col-sm-10"> {% if newsletter %}
<label class="radio-inline">
<input type="radio" name="newsletter" value="1" checked="checked" />
{{ text_yes }}</label>
<label class="radio-inline">
<input type="radio" name="newsletter" value="0" />
{{ text_no }}</label>
{% else %}
<label class="radio-inline">
<input type="radio" name="newsletter" value="1" />
{{ text_yes }}</label>
<label class="radio-inline">
<input type="radio" name="newsletter" value="0" checked="checked" />
{{ text_no }}</label>
{% endif %} </div>
</div>
</fieldset>
{{ captcha }}
{% if text_agree %}
<div class="buttons">
<div class="pull-right">{{ text_agree }}
{% if agree %}
<input type="checkbox" name="agree" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="agree" value="1" />
{% endif %}
&nbsp;
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
{% else %}
<div class="buttons">
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
{% endif %}
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
// Sort the custom fields
$('#account .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#account .form-group').length) {
$('#account .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#account .form-group').length) {
$('#account .form-group:first').before(this);
}
});
$('input[name=\'customer_group_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=account/register/customfield&customer_group_id=' + this.value,
dataType: 'json',
success: function(json) {
$('.custom-field').hide();
$('.custom-field').removeClass('required');
for (i = 0; i < json.length; i++) {
custom_field = json[i];
$('#custom-field' + custom_field['custom_field_id']).show();
if (custom_field['required']) {
$('#custom-field' + custom_field['custom_field_id']).addClass('required');
}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('input[name=\'customer_group_id\']:checked').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
var element = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(element).button('loading');
},
complete: function() {
$(element).button('reset');
},
success: function(json) {
$(element).parent().find('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(element).parent().find('input').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
{{ footer }}
@@ -0,0 +1,48 @@
{{ header }}
<div id="account-reset" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend>{{ text_password }}</legend>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-password">{{ entry_password }}</label>
<div class="col-sm-10">
<input type="password" name="password" value="{{ password }}" id="input-password" class="form-control" />
{% if error_password %}
<div class="text-danger">{{ error_password }}</div>
{% endif %} </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-confirm">{{ entry_confirm }}</label>
<div class="col-sm-10">
<input type="password" name="confirm" value="{{ confirm }}" id="input-confirm" class="form-control" />
{% if error_confirm %}
<div class="text-danger">{{ error_confirm }}</div>
{% endif %}</div>
</div>
</fieldset>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<button type="submit" class="btn btn-primary">{{ button_continue }}</button>
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,177 @@
{{ header }}
<div id="account-return" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}"> {{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row"> {{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}"> {{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_description }}</p>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend>{{ text_order }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
{% if error_firstname %}
<div class="text-danger">{{ error_firstname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
{% if error_lastname %}
<div class="text-danger">{{ error_lastname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
<div class="col-sm-10">
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
{% if error_email %}
<div class="text-danger">{{ error_email }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
<div class="col-sm-10">
<input type="text" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
{% if error_telephone %}
<div class="text-danger">{{ error_telephone }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-order-id">{{ entry_order_id }}</label>
<div class="col-sm-10">
<input type="text" name="order_id" value="{{ order_id }}" placeholder="{{ entry_order_id }}" id="input-order-id" class="form-control" />
{% if error_order_id %}
<div class="text-danger">{{ error_order_id }}</div>
{% endif %} </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-date-ordered">{{ entry_date_ordered }}</label>
<div class="col-sm-3">
<div class="input-group date">
<input type="text" name="date_ordered" value="{{ date_ordered }}" placeholder="{{ entry_date_ordered }}" data-date-format="YYYY-MM-DD" id="input-date-ordered" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
</fieldset>
<fieldset>
<legend>{{ text_product }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-product">{{ entry_product }}</label>
<div class="col-sm-10">
<input type="text" name="product" value="{{ product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
<input type="hidden" name="product_id" value="{{ product_id }}" />
{% if error_product %}
<div class="text-danger">{{ error_product }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-model">{{ entry_model }}</label>
<div class="col-sm-10">
<input type="text" name="model" value="{{ model }}" placeholder="{{ entry_model }}" id="input-model" class="form-control" />
{% if error_model %}
<div class="text-danger">{{ error_model }}</div>
{% endif %} </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-quantity">{{ entry_quantity }}</label>
<div class="col-sm-10">
<input type="text" name="quantity" value="{{ quantity }}" placeholder="{{ entry_quantity }}" id="input-quantity" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label">{{ entry_reason }}</label>
<div class="col-sm-10"> {% for return_reason in return_reasons %}
{% if return_reason.return_reason_id == return_reason_id %}
<div class="radio">
<label>
<input type="radio" name="return_reason_id" value="{{ return_reason.return_reason_id }}" checked="checked" />
{{ return_reason.name }}</label>
</div>
{% else %}
<div class="radio">
<label>
<input type="radio" name="return_reason_id" value="{{ return_reason.return_reason_id }}" />
{{ return_reason.name }}</label>
</div>
{% endif %}
{% endfor %}
{% if error_reason %}
<div class="text-danger">{{ error_reason }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label">{{ entry_opened }}</label>
<div class="col-sm-10">
<label class="radio-inline"> {% if opened %}
<input type="radio" name="opened" value="1" checked="checked" />
{% else %}
<input type="radio" name="opened" value="1" />
{% endif %}
{{ text_yes }}</label>
<label class="radio-inline"> {% if not opened %}
<input type="radio" name="opened" value="0" checked="checked" />
{% else %}
<input type="radio" name="opened" value="0" />
{% endif %}
{{ text_no }}</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-comment">{{ entry_fault_detail }}</label>
<div class="col-sm-10">
<textarea name="comment" rows="10" placeholder="{{ entry_fault_detail }}" id="input-comment" class="form-control">{{ comment }}</textarea>
</div>
</div>
{{ captcha }}
</fieldset>
{% if text_agree %}
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-danger">{{ button_back }}</a></div>
<div class="pull-right">{{ text_agree }}
{% if agree %}
<input type="checkbox" name="agree" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="agree" value="1" />
{% endif %}
<input type="submit" value="{{ button_submit }}" class="btn btn-primary" />
</div>
</div>
{% else %}
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
<div class="pull-right">
<input type="submit" value="{{ button_submit }}" class="btn btn-primary" />
</div>
</div>
{% endif %}
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
//--></script>
{{ footer }}
@@ -0,0 +1,122 @@
{{ header }}
<div id="account-return" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" colspan="2">{{ text_return_detail }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" style="width: 50%;"><b>{{ text_return_id }}</b> #{{ return_id }}<br />
<b>{{ text_date_added }}</b> {{ date_added }}</td>
<td class="text-left" style="width: 50%;"><b>{{ text_order_id }}</b> #{{ order_id }}<br />
<b>{{ text_date_ordered }}</b> {{ date_ordered }}</td>
</tr>
</tbody>
</table>
<h3>{{ text_product }}</h3>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" style="width: 33.3%;">{{ column_product }}</td>
<td class="text-left" style="width: 33.3%;">{{ column_model }}</td>
<td class="text-right" style="width: 33.3%;">{{ column_quantity }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">{{ product }}</td>
<td class="text-left">{{ model }}</td>
<td class="text-right">{{ quantity }}</td>
</tr>
</tbody>
</table>
</div>
<h3>{{ text_reason }}</h3>
<div class="table-responsive">
<table class="list table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" style="width: 33.3%;">{{ column_reason }}</td>
<td class="text-left" style="width: 33.3%;">{{ column_opened }}</td>
<td class="text-left" style="width: 33.3%;">{{ column_action }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">{{ reason }}</td>
<td class="text-left">{{ opened }}</td>
<td class="text-left">{{ action }}</td>
</tr>
</tbody>
</table>
</div>
{% if comment %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ text_comment }}</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">{{ comment }}</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
<h3>{{ text_history }}</h3>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left" style="width: 33.3%;">{{ column_date_added }}</td>
<td class="text-left" style="width: 33.3%;">{{ column_status }}</td>
<td class="text-left" style="width: 33.3%;">{{ column_comment }}</td>
</tr>
</thead>
<tbody>
{% if histories %}
{% for history in histories %}
<tr>
<td class="text-left">{{ history.date_added }}</td>
<td class="text-left">{{ history.status }}</td>
<td class="text-left">{{ history.comment }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="3" class="text-center">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,60 @@
{{ header }}
<div id="account-return" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
{% if returns %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-right">{{ column_return_id }}</td>
<td class="text-left">{{ column_status }}</td>
<td class="text-left">{{ column_date_added }}</td>
<td class="text-right">{{ column_order_id }}</td>
<td class="text-left">{{ column_customer }}</td>
<td></td>
</tr>
</thead>
<tbody>
{% for return in returns %}
<tr>
<td class="text-right">#{{ return.return_id }}</td>
<td class="text-left">{{ return.status }}</td>
<td class="text-left">{{ return.date_added }}</td>
<td class="text-right">{{ return.order_id }}</td>
<td class="text-left">{{ return.name }}</td>
<td class="text-right"><a href="{{ return.href }}" data-toggle="tooltip" title="{{ button_view }}" class="btn btn-info"><i class="fa fa-eye"></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
{% else %}
<p>{{ text_empty }}</p>
{% endif %}
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,59 @@
{{ header }}
<div id="account-reward" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_total }} <b>{{ total }}</b>.</p>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ column_date_added }}</td>
<td class="text-left">{{ column_description }}</td>
<td class="text-right">{{ column_points }}</td>
</tr>
</thead>
<tbody>
{% if rewards %}
{% for reward in rewards %}
<tr>
<td class="text-left">{{ reward.date_added }}</td>
<td class="text-left">{% if reward.order_id %} <a href="{{ reward.href }}">{{ reward.description }}</a> {% else %}
{{ reward.description }}
{% endif %}</td>
<td class="text-right">{{ reward.points }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="3">{{ text_empty }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,67 @@
{{ header }}
<div id="account-tracking" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_description }}</p>
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-code">{{ entry_code }}</label>
<div class="col-sm-10">
<textarea cols="40" rows="5" placeholder="{{ entry_code }}" id="input-code" class="form-control">{{ code }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-generator"><span data-toggle="tooltip" title="{{ help_generator }}">{{ entry_generator }}</span></label>
<div class="col-sm-10">
<input type="text" name="product" value="" placeholder="{{ entry_generator }}" id="input-generator" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-link">{{ entry_link }}</label>
<div class="col-sm-10">
<textarea name="link" cols="40" rows="5" placeholder="{{ entry_link }}" id="input-link" class="form-control"></textarea>
</div>
</div>
</form>
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
$('input[name=\'product\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=account/tracking/autocomplete&filter_name=' + encodeURIComponent(request) + '&tracking=' + encodeURIComponent($('#input-code').val()),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['link']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'product\']').val(item['label']);
$('textarea[name=\'link\']').val(item['value']);
}
});
//--></script>
{{ footer }}
@@ -0,0 +1,57 @@
{{ header }}
<div id="account-transaction" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_total }} <b>{{ total }}</b>.</p>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ column_date_added }}</td>
<td class="text-left">{{ column_description }}</td>
<td class="text-right">{{ column_amount }}</td>
</tr>
</thead>
<tbody>
{% if transactions %}
{% for transaction in transactions %}
<tr>
<td class="text-left">{{ transaction.date_added }}</td>
<td class="text-left">{{ transaction.description }}</td>
<td class="text-right">{{ transaction.amount }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="5">{{ text_empty }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
<div class="buttons clearfix">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,112 @@
{{ header }}
<div id="account-voucher" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_description }}</p>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-to-name">{{ entry_to_name }}</label>
<div class="col-sm-10">
<input type="text" name="to_name" value="{{ to_name }}" id="input-to-name" class="form-control" />
{% if error_to_name %}
<div class="text-danger">{{ error_to_name }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-to-email">{{ entry_to_email }}</label>
<div class="col-sm-10">
<input type="text" name="to_email" value="{{ to_email }}" id="input-to-email" class="form-control" />
{% if error_to_email %}
<div class="text-danger">{{ error_to_email }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-from-name">{{ entry_from_name }}</label>
<div class="col-sm-10">
<input type="text" name="from_name" value="{{ from_name }}" id="input-from-name" class="form-control" />
{% if error_from_name %}
<div class="text-danger">{{ error_from_name }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-from-email">{{ entry_from_email }}</label>
<div class="col-sm-10">
<input type="text" name="from_email" value="{{ from_email }}" id="input-from-email" class="form-control" />
{% if error_from_email %}
<div class="text-danger">{{ error_from_email }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label">{{ entry_theme }}</label>
<div class="col-sm-10">
{% for voucher_theme in voucher_themes %}
{% if voucher_theme.voucher_theme_id == voucher_theme_id %}
<div class="radio">
<label>
<input type="radio" name="voucher_theme_id" value="{{ voucher_theme.voucher_theme_id }}" checked="checked" />
{{ voucher_theme.name }}</label>
</div>
{% else %}
<div class="radio">
<label>
<input type="radio" name="voucher_theme_id" value="{{ voucher_theme.voucher_theme_id }}" />
{{ voucher_theme.name }}</label>
</div>
{% endif %}
{% endfor %}
{% if error_theme %}
<div class="text-danger">{{ error_theme }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-message"><span data-toggle="tooltip" title="{{ help_message }}">{{ entry_message }}</span></label>
<div class="col-sm-10">
<textarea name="message" cols="40" rows="5" id="input-message" class="form-control">{{ message }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-amount"><span data-toggle="tooltip" title="{{ help_amount }}">{{ entry_amount }}</span></label>
<div class="col-sm-10">
<input type="text" name="amount" value="{{ amount }}" id="input-amount" class="form-control" size="5" />
{% if error_amount %}
<div class="text-danger">{{ error_amount }}</div>
{% endif %}
</div>
</div>
<div class="buttons clearfix">
<div class="pull-right"> {{ text_agree }}
{% if agree %}
<input type="checkbox" name="agree" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="agree" value="1" />
{% endif %}
&nbsp;
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,32 @@
{{ header }}
{{ content_top }}
<section class="section-wishlist py-5">
<div class="container-fluid" id="section-wishlist">
<ul class="breadcrumb">
{% for key,breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a>{% if key + 1 < breadcrumbs|length %}<span class="mx-2">•</span>{% endif %}</li>
{% endfor %}
</ul>
<h1 class="mb-5">{{ heading_title }}</h1>
{% if products %}
<div class="row g-3 product-items">
{% for product in products %}
<div class="col-6 col-lg-4">
{% include 'dominik/template/common/product.twig' %}
</div>
{% endfor %}
</div>
{% else %}
<p>{{ text_empty }}</p>
<a href="/" class="btn btn-dark">{{ button_continue }}</a>
{% endif %}
</div>
</section>
{{ content_bottom }}
{{ footer }}
@@ -0,0 +1,56 @@
{{ header }}
<div id="affiliate-login" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
{% endif %}
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
{{ text_description }}
<div class="row">
<div class="col-sm-6">
<div class="well">
<h2>{{ text_new_affiliate }}</h2>
<p>{{ text_register_account }}</p>
<a class="btn btn-primary" href="{{ register }}">{{ button_continue }}</a></div>
</div>
<div class="col-sm-6">
<div class="well">
<h2>{{ text_returning_affiliate }}</h2>
<p><strong>{{ text_i_am_returning_affiliate }}</strong></p>
<form action="{{ action }}" method="post" enctype="multipart/form-data">
<div class="form-group">
<label class="control-label" for="input-email">{{ entry_email }}</label>
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-password">{{ entry_password }}</label>
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
<a href="{{ forgotten }}">{{ text_forgotten }}</a> </div>
<input type="submit" value="{{ button_login }}" class="btn btn-primary" />
{% if redirect %}
<input type="hidden" name="redirect" value="{{ redirect }}" />
{% endif %}
</form>
</div>
</div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,712 @@
{{ header }}
<div id="affiliate-register" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<p>{{ text_account_already }}</p>
<p>{{ text_signup }}</p>
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset id="account">
<legend>{{ text_your_details }}</legend>
<div class="form-group required" style="display: {% if customer_groups|length > 1 %} block {% else %} none {% endif %};">
<label class="col-sm-2 control-label">{{ entry_customer_group }}</label>
<div class="col-sm-10">{% for customer_group in customer_groups %}
{% if customer_group.customer_group_id == customer_group_id %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" checked="checked" />
{{ customer_group.name }}</label>
</div>
{% else %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" />
{{ customer_group.name }}</label>
</div>
{% endif %}
{% endfor %}</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
{% if error_firstname %}
<div class="text-danger">{{ error_firstname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
{% if error_lastname %}
<div class="text-danger">{{ error_lastname }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
<div class="col-sm-10">
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
{% if error_email %}
<div class="text-danger">{{ error_email }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
<div class="col-sm-10">
<input type="text" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
{% if error_telephone %}
<div class="text-danger">{{ error_telephone }}</div>
{% endif %} </div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'account' %}
{% if custom_field.type == 'select' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">{% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in register_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %} {{ register_custom_field[custom_field.custom_field_id] }} {% endif %}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
<fieldset id="affiliate">
<legend>{{ text_your_affiliate }}</legend>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-company">{{ entry_company }}</label>
<div class="col-sm-10">
<input type="text" name="company" value="{{ company }}" placeholder="{{ entry_company }}" id="input-company" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-website">{{ entry_website }}</label>
<div class="col-sm-10">
<input type="text" name="website" value="{{ website }}" placeholder="{{ entry_website }}" id="input-website" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-tax">{{ entry_tax }}</label>
<div class="col-sm-10">
<input type="text" name="tax" value="{{ tax }}" placeholder="{{ entry_tax }}" id="input-tax" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_payment }}</label>
<div class="col-sm-10">
<div class="radio">
<label> {% if payment == 'cheque' %}
<input type="radio" name="payment" value="cheque" checked="checked" />
{% else %}
<input type="radio" name="payment" value="cheque" />
{% endif %}
{{ text_cheque }}</label>
</div>
<div class="radio">
<label> {% if payment == 'paypal' %}
<input type="radio" name="payment" value="paypal" checked="checked" />
{% else %}
<input type="radio" name="payment" value="paypal" />
{% endif %}
{{ text_paypal }}</label>
</div>
<div class="radio">
<label> {% if payment == 'bank' %}
<input type="radio" name="payment" value="bank" checked="checked" />
{% else %}
<input type="radio" name="payment" value="bank" />
{% endif %}
{{ text_bank }}</label>
</div>
</div>
</div>
<div class="form-group payment required" id="payment-cheque">
<label class="col-sm-2 control-label" for="input-cheque">{{ entry_cheque }}</label>
<div class="col-sm-10">
<input type="text" name="cheque" value="{{ cheque }}" placeholder="{{ entry_cheque }}" id="input-cheque" class="form-control" />
{% if error_cheque %}
<div class="text-danger">{{ error_cheque }}</div>
{% endif %} </div>
</div>
<div class="form-group payment required" id="payment-paypal">
<label class="col-sm-2 control-label" for="input-paypal">{{ entry_paypal }}</label>
<div class="col-sm-10">
<input type="text" name="paypal" value="{{ paypal }}" placeholder="{{ entry_paypal }}" id="input-paypal" class="form-control" />
{% if error_paypal %}
<div class="text-danger">{{ error_paypal }}</div>
{% endif %} </div>
</div>
<div class="payment" id="payment-bank">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-bank-name">{{ entry_bank_name }}</label>
<div class="col-sm-10">
<input type="text" name="bank_name" value="{{ bank_name }}" placeholder="{{ entry_bank_name }}" id="input-bank-name" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-bank-branch-number">{{ entry_bank_branch_number }}</label>
<div class="col-sm-10">
<input type="text" name="bank_branch_number" value="{{ bank_branch_number }}" placeholder="{{ entry_bank_branch_number }}" id="input-bank-branch-number" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-bank-swift-code">{{ entry_bank_swift_code }}</label>
<div class="col-sm-10">
<input type="text" name="bank_swift_code" value="{{ bank_swift_code }}" placeholder="{{ entry_bank_swift_code }}" id="input-bank-swift-code" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-bank-account-name">{{ entry_bank_account_name }}</label>
<div class="col-sm-10">
<input type="text" name="bank_account_name" value="{{ bank_account_name }}" placeholder="{{ entry_bank_account_name }}" id="input-bank-account-name" class="form-control" />
{% if error_bank_account_name %}
<div class="text-danger">{{ error_bank_account_name }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-bank-account-number">{{ entry_bank_account_number }}</label>
<div class="col-sm-10">
<input type="text" name="bank_account_number" value="{{ bank_account_number }}" placeholder="{{ entry_bank_account_number }}" id="input-bank-account-number" class="form-control" />
{% if error_bank_account_number %}
<div class="text-danger">{{ error_bank_account_number }}</div>
{% endif %} </div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'affiliate' %}
{% if custom_field.type == 'select' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox"> {% if register_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == register_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %} {{ register_custom_field[custom_field.custom_field_id] }} {% endif %}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if register_custom_field[custom_field.custom_field_id] %}{{ register_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %} </div>
</div>
{% endif %}
{% endif %}
{% endfor %} </div>
</fieldset>
<fieldset>
<legend>{{ text_your_password }}</legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-password">{{ entry_password }}</label>
<div class="col-sm-10">
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
{% if error_password %}
<div class="text-danger">{{ error_password }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-confirm">{{ entry_confirm }}</label>
<div class="col-sm-10">
<input type="password" name="confirm" value="{{ confirm }}" placeholder="{{ entry_confirm }}" id="input-confirm" class="form-control" />
{% if error_confirm %}
<div class="text-danger">{{ error_confirm }}</div>
{% endif %} </div>
</div>
</fieldset>
{{ captcha }}
{% if text_agree %}
<div class="buttons clearfix">
<div class="pull-right">{{ text_agree }}
{% if agree %}
<input type="checkbox" name="agree" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="agree" value="1" />
{% endif %}
&nbsp;
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
{% else %}
<div class="buttons clearfix">
<div class="pull-right">
<input type="submit" value="{{ button_continue }}" class="btn btn-primary" />
</div>
</div>
{% endif %}
</form>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
// Sort the custom fields
$('#account .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#account .form-group').length) {
$('#account .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#account .form-group').length) {
$('#account .form-group:first').before(this);
}
});
$('#affiliate .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#affiliate .form-group').length) {
$('#affiliate .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#affiliate .form-group').length) {
$('#affiliate .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#affiliate .form-group').length) {
$('#affiliate .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#affiliate .form-group').length) {
$('#affiliate .form-group:first').before(this);
}
});
$('input[name=\'customer_group_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=account/register/customfield&customer_group_id=' + this.value,
dataType: 'json',
success: function(json) {
$('.custom-field').hide();
$('.custom-field').removeClass('required');
for (i = 0; i < json.length; i++) {
custom_field = json[i];
$('#custom-field' + custom_field['custom_field_id']).show();
if (custom_field['required']) {
$('#custom-field' + custom_field['custom_field_id']).addClass('required');
}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('input[name=\'customer_group_id\']:checked').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$(node).parent().find('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('input[name=\'payment\']').on('change', function() {
$('.payment').hide();
$('#payment-' + this.value).show();
});
$('input[name=\'payment\']:checked').trigger('change');
//--></script>
{{ footer }}
@@ -0,0 +1,436 @@
{{ header }}
{{ content_top }}
<section class="section py-5">
<div class="container-fluid">
<ul class="breadcrumb">
{% for key,breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a>{% if key + 1 < breadcrumbs|length %}<span class="mx-2">•</span>{% endif %}</li>
{% endfor %}
</ul>
<h1>{{ heading_title }}</h1>
<div class="content">{{ description }}</div>
{% if products %}
<hr>
<h3 class="mb-4">{{ text_related_product }}</h3>
<div class="row g-3 product-items">
{% for product in products %}
<div class="col-6 col-lg-4">
{% include 'dominik/template/common/product.twig' %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</section>
{{ content_bottom }}
{{ footer }}
{#
<div id="product-product" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<div class="row"> {% if column_left or column_right %}
{% set class = 'col-sm-12' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div class="{{ class }}"> {% if thumb or images %}
<ul class="thumbnails">
{% if thumb %}
<li><a class="thumbnail" href="{{ popup }}" title="{{ heading_title }}"><img src="{{ thumb }}" title="{{ heading_title }}" alt="{{ heading_title }}" /></a></li>
{% endif %}
{% if images %}
{% for image in images %}
<li class="image-additional"><a class="thumbnail" href="{{ image.popup }}" title="{{ heading_title }}"> <img src="{{ image.thumb }}" title="{{ heading_title }}" alt="{{ heading_title }}" /></a></li>
{% endfor %}
{% endif %}
</ul>
{% endif %}
<div class="content">
<h1>{{ heading_title }}</h1>
<div class="tab-pane active" id="tab-description">{{ description }}</div>
{% if review_status %}
<div class="rating">
<p>{% for i in 1..5 %}
{% if rating < i %}<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span>{% else %}<span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span>{% endif %}
{% endfor %}
<a href="" onclick="gotoReview(); return false;">{{ reviews }}</a> / <a href="" onclick="gotoReviewWrite(); return false;">{{ text_write }}</a></p>
<hr>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style" data-url="{{ share }}"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_button_pinterest_pinit"></a> <a class="addthis_counter addthis_pill_style"></a></div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-515eeaf54693130e"></script>
<!-- AddThis Button END -->
</div>
{% endif %}
{% if download_status %}
<div class="blog-info">
{% if downloads %}
<br />
{% for download in downloads %}
<a href="{{ download.href }}" title=""><i class="fa fa-floppy-o"></i> {{ download.name }} {{ download.size }}</a><br>
{% endfor %}
<br />
{% endif %}
</div>
{% endif %}
{% if products %}
<h3>{{ text_related_product }}</h3>
<div class="row"> {% set i = 0 %}
{% for product in products %}
{% if column_left and column_right %}
{% set class = 'col-xs-8 col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-xs-6 col-md-4' %}
{% else %}
{% set class = 'col-xs-6 col-sm-3' %}
{% endif %}
<div class="{{ class }}">
<div class="product-thumb transition">
<div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
<p>{{ product.description }}</p>
{% if product.rating %}
<div class="rating"> {% for j in 1..5 %}
{% if product.rating < j %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> {% endif %}
{% endfor %} </div>
{% endif %}
{% if product.price %}
<p class="price"> {% if not product.special %}
{{ product.price }}
{% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
{% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
{% endif %} </div>
<div class="button-group">
<button type="button" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span> <i class="fa fa-shopping-cart"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.article_id }}');"><i class="fa fa-heart"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.article_id }}');"><i class="fa fa-exchange"></i></button>
</div>
</div>
</div>
{% if column_left and column_right and (i + 1) % 2 == 0 %}
<div class="clearfix visible-md visible-sm"></div>
{% elseif column_left or column_right and (i + 1) % 3 == 0 %}
<div class="clearfix visible-md"></div>
{% elseif (i + 1) % 4 == 0 %}
<div class="clearfix visible-md"></div>
{% endif %}
{% set i = i + 1 %}
{% endfor %} </div>
{% endif %}
{% if articles %}
<h3>{{ text_related }}</h3>
<div class="row"> {% set i = 0 %}
{% for article in articles %}
{% if column_left and column_right %}
{% set class = 'col-xs-8 col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-xs-6 col-md-4' %}
{% else %}
{% set class = 'col-xs-6 col-sm-3' %}
{% endif %}
<div class="{{ class }}">
<div class="product-thumb transition">
<div class="image"><a href="{{ article.href }}"><img src="{{ article.thumb }}" alt="{{ article.name }}" title="{{ article.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ article.href }}">{{ article.name }}</a></h4>
<p>{{ article.description }}</p>
{% if article.rating %}
<div class="rating"> {% for j in 1..5 %}
{% if article.rating < j %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> {% endif %}
{% endfor %} </div>
{% endif %}
</div>
<div class="button-group">
<button type="button" onclick="location.href = ('{{ article.href }}');"><span class="hidden-xs hidden-sm hidden-md">{{ button_more }}</span> <i class="fa fa-share"></i></button>
<button type="button" data-toggle="tooltip" title="{{ article.date_added }}" "><i class="fa fa-clock-o"></i></button>
<button type="button" data-toggle="tooltip" title="{{ text_views }} {{ article.viewed }}" "><i class="fa fa-eye"></i></button>
</div>
</div>
</div>
{% if column_left and column_right and (i + 1) % 2 == 0 %}
<div class="clearfix visible-md visible-sm"></div>
{% elseif column_left or column_right and (i + 1) % 3 == 0 %}
<div class="clearfix visible-md"></div>
{% elseif (i + 1) % 4 == 0 %}
<div class="clearfix visible-md"></div>
{% endif %}
{% set i = i + 1 %}
{% endfor %} </div>
{% endif %}
{% if review_status %}
<div class="tab-pane" id="tab-review">
<form class="form-horizontal" id="form-review">
<div id="review"></div>
<h2>{{ text_write }}</h2>
{% if review_guest %}
<div class="form-group required">
<div class="col-sm-12">
<label class="control-label" for="input-name">{{ entry_name }}</label>
<input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
</div>
</div>
<div class="form-group required">
<div class="col-sm-12">
<label class="control-label" for="input-review">{{ entry_review }}</label>
<textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
<div class="help-block">{{ text_note }}</div>
</div>
</div>
<div class="form-group required">
<div class="col-sm-12">
<label class="control-label">{{ entry_rating }}</label>
&nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
<input type="radio" name="rating" value="1" />
&nbsp;
<input type="radio" name="rating" value="2" />
&nbsp;
<input type="radio" name="rating" value="3" />
&nbsp;
<input type="radio" name="rating" value="4" />
&nbsp;
<input type="radio" name="rating" value="5" />
&nbsp;{{ entry_good }}</div>
</div>
{{ captcha }}
<div class="buttons clearfix">
<div class="pull-right">
<button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
</div>
</div>
{% else %}
{{ text_login }}
{% endif %}
</form>
</div>
{% endif %}</div>
</div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
$('#button-cart').on('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'),
dataType: 'json',
beforeSend: function() {
$('#button-cart').button('loading');
},
complete: function() {
$('#button-cart').button('reset');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['error']) {
if (json['error']['option']) {
for (i in json['error']['option']) {
var element = $('#input-option' + i.replace('_', '-'));
if (element.parent().hasClass('input-group')) {
element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
} else {
element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
}
}
}
if (json['error']['recurring']) {
$('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
}
if (json['success']) {
$('.breadcrumb').after('<div class="alert alert-success alert-dismissible">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('button[id^=\'button-upload\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('#review').delegate('.pagination a', 'click', function(e) {
e.preventDefault();
$('#review').fadeOut('slow');
$('#review').load(this.href);
$('#review').fadeIn('slow');
});
$('#review').load('index.php?route=blog/article/review&article_id={{ article_id }}');
$('#button-review').on('click', function() {
$.ajax({
url: 'index.php?route=blog/article/write&article_id={{ article_id }}',
type: 'post',
dataType: 'json',
data: $("#form-review").serialize(),
beforeSend: function() {
$('#button-review').button('loading');
},
complete: function() {
$('#button-review').button('reset');
},
success: function(json) {
$('.alert-dismissible').remove();
if (json['error']) {
$('#review').after('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>');
}
if (json['success']) {
$('#review').after('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + '</div>');
$('input[name=\'name\']').val('');
$('textarea[name=\'text\']').val('');
$('input[name=\'rating\']:checked').prop('checked', false);
}
}
});
});
$(document).ready(function() {
$('.thumbnails').magnificPopup({
type:'image',
delegate: 'a',
gallery: {
enabled: true
}
});
});
//--></script>
<script type="text/javascript"><!--
$(document).ready(function() {
$('#description').find('a>img').each(function(){
$(this).parent().addClass('gallery');
});
$('#description').magnificPopup({
delegate: 'a.gallery',
type: 'image',
gallery: {
enabled: true
}
});
gotoReview = function() {
offset = $('#form-review').offset();
$('html, body').animate({ scrollTop: offset.top-20 }, 'slow');
}
gotoReviewWrite = function() {
offset = $('#form-review h2').offset();
$('html, body').animate({ scrollTop: offset.top-20 }, 'slow');
}
});
--></script>
#}
@@ -0,0 +1,58 @@
{{ header }}
{{ content_top }}
<section class="section py-5">
<div class="container-fluid">
<ul class="breadcrumb">
{% for key,breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a>{% if key + 1 < breadcrumbs|length %}<span class="mx-2">•</span>{% endif %}</li>
{% endfor %}
</ul>
<h1>{{ heading_title }}</h1>
<div class="content">
{% if thumb or description %}
<div class="row">
{% if thumb %}
<div class="col-sm-2"><img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="img-thumbnail" /></div>
{% endif %}
{% if description %}
<div class="col-sm-10">{{ description }}</div>
{% endif %}
</div>
<hr>
{% endif %}
{% if articles %}
<div class="row g-3">
{% for article in articles %}
<div class="col-md-4 col-lg-3 col-sm-6">
<div class="product-thumb">
<div class="image"><a href="{{ article.href }}"><img src="{{ article.thumb }}" alt="{{ article.name }}" title="{{ article.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ article.href }}">{{ article.name }}</a></h4>
<p class="description">{{ article['description'] }}</p>
{% if configblog_review_status %}
{% if article.rating %}
<div class="rating"> {% for i in 1..5 %}
{% if article.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>{% endif %}
{% endfor %} </div>
{% endif %}
{% endif %}
</div>
<div>
<a href="{{ article.href }}" class="btn btn-dark">{{ button_more }}</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<p>{{ text_empty }}</p>
{% endif %}
</div>
</div>
</section>
{{ content_bottom }}
{{ footer }}
@@ -0,0 +1,93 @@
{{ header }}
<div class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }} showcase-list">{{ content_top }}
<h1>{{ heading_title }}</h1>
{% if articles %}
<div class="row">
<div class="col-sm-3">
<div class="btn-group">
<button type="button" id="list-view" class="btn btn-default" data-toggle="tooltip" title="{{ text_list }}"><i class="fa fa-th-list"></i></button>
<button type="button" id="grid-view" class="btn btn-default" data-toggle="tooltip" title="{{ text_grid }}"><i class="fa fa-th"></i></button>
</div>
</div>
<div class="col-sm-1 col-sm-offset-2 text-right">
<label class="control-label" for="input-sort">{{ text_sort }}</label>
</div>
<div class="col-sm-3 text-right">
<select id="input-sort" class="form-control" onchange="location = this.value;">
{% for sorts in sorts %}
{% if sorts.value == '%s-%s'|format(sort, order) %}
<option value="{{ sorts.href }}" selected="selected">{{ sorts.text }}</option>
{% else %}
<option value="{{ sorts.href }}">{{ sorts.text }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="col-sm-1 text-right">
<label class="control-label" for="input-limit">{{ text_limit }}</label>
</div>
<div class="col-sm-2 text-right">
<select id="input-limit" class="form-control" onchange="location = this.value;">
{% for limits in limits %}
{% if limits.value == limit %}
<option value="{{ limits.href }}" selected="selected">{{ limits.text }}</option>
{% else %}
<option value="{{ limits.href }}">{{ limits.text }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<br />
<div class="row">
{% for article in articles %}
<div class="product-layout product-list col-xs-12">
<div class="product-thumb">
<div class="image"><a href="{{ article['href'] }}"><img src="{{ article['thumb'] }}" alt="{{ article['name'] }}" title="{{ article['name'] }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ article['href'] }}">{{ article['name'] }}</a></h4>
<p class="description">{{ article['description'] }}</p>
{% if configblog_review_status %}
{% if article.rating %}
<div class="rating"> {% for i in 1..5 %}
{% if article.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>{% endif %}
{% endfor %} </div>
{% endif %}
{% endif %}
</div>
<div class="button-group">
<button type="button" onclick="location.href = ('{{ article.href }}');"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_more }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ article.date_added }}" "><i class="fa fa-clock-o"></i></button>
<button type="button" data-toggle="tooltip" title="{{ text_views }} {{ article.viewed }}" "><i class="fa fa-eye"></i></button>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
</div>
{% else %}
<p>{{ text_empty }}</p>
<div class="buttons">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{% endif %}
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,7 @@
{% for category in categories %}
<li><a href="{{ category.href }}">{{ category.name }}</a></li>
{% endfor %}
@@ -0,0 +1,19 @@
{% if reviews %}
{% for review in reviews %}
<table class="table table-striped table-bordered">
<tr>
<td style="width: 50%;"><strong>{{ review.author }}</strong></td>
<td class="text-right">{{ review.date_added }}</td>
</tr>
<tr>
<td colspan="2"><p>{{ review.text }}</p>
{% for i in 1..5 %}
{% if review.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span> {% endif %}
{% endfor %}</td>
</tr>
</table>
{% endfor %}
<div class="text-right">{{ pagination }}</div>
{% else %}
<p>{{ text_no_reviews }}</p>
{% endif %}
@@ -0,0 +1,119 @@
{{ header }}
<div id="checkout-cart" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if attention %}
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ attention }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}
{% if weight %}
&nbsp;({{ weight }})
{% endif %} </h1>
<form action="{{ action }}" method="post" enctype="multipart/form-data">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<td class="text-center">{{ column_image }}</td>
<td class="text-left">{{ column_name }}</td>
<td class="text-left">{{ column_model }}</td>
<td class="text-left">{{ column_quantity }}</td>
<td class="text-right">{{ column_price }}</td>
<td class="text-right">{{ column_total }}</td>
</tr>
</thead>
<tbody>
{% for product in products %}
<tr>
<td class="text-center">{% if product.thumb %} <a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-thumbnail" /></a> {% endif %}</td>
<td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a> {% if not product.stock %} <span class="text-danger">***</span> {% endif %}
{% if product.option %}
{% for option in product.option %} <br />
<small>{{ option.name }}: {{ option.value }}</small> {% endfor %}
{% endif %}
{% if product.reward %} <br />
<small>{{ product.reward }}</small> {% endif %}
{% if product.recurring %} <br />
<span class="label label-info">{{ text_recurring_item }}</span> <small>{{ product.recurring }}</small> {% endif %}</td>
<td class="text-left">{{ product.model }}</td>
<td class="text-left"><div class="input-group btn-block" style="max-width: 200px;">
<input type="text" name="quantity[{{ product.cart_id }}]" value="{{ product.quantity }}" size="1" class="form-control" />
<span class="input-group-btn">
<button type="submit" data-toggle="tooltip" title="{{ button_update }}" class="btn btn-primary"><i class="fa fa-refresh"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger" onclick="cart.remove('{{ product.cart_id }}');"><i class="fa fa-times-circle"></i></button>
</span></div></td>
<td class="text-right">{{ product.price }}</td>
<td class="text-right">{{ product.total }}</td>
</tr>
{% endfor %}
{% for voucher in vouchers %}
<tr>
<td></td>
<td class="text-left">{{ voucher.description }}</td>
<td class="text-left"></td>
<td class="text-left"><div class="input-group btn-block" style="max-width: 200px;">
<input type="text" name="" value="1" size="1" disabled="disabled" class="form-control" />
<span class="input-group-btn">
<button type="button" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger" onclick="voucher.remove('{{ voucher.key }}');"><i class="fa fa-times-circle"></i></button>
</span></div></td>
<td class="text-right">{{ voucher.amount }}</td>
<td class="text-right">{{ voucher.amount }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
{% if modules %}
<h2>{{ text_next }}</h2>
<p>{{ text_next_choice }}</p>
<div class="panel-group" id="accordion"> {% for module in modules %}
{{ module }}
{% endfor %} </div>
{% endif %} <br />
<div class="row">
<div class="col-sm-4 col-sm-offset-8">
<table class="table table-bordered">
{% for total in totals %}
<tr>
<td class="text-right"><strong>{{ total.title }}:</strong></td>
<td class="text-right">{{ total.text }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="buttons clearfix">
<div class="pull-left"><a href="{{ continue }}" class="btn btn-default">{{ button_shopping }}</a></div>
<div class="pull-right"><a href="{{ checkout }}" class="btn btn-primary">{{ button_checkout }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,814 @@
{{ header }}
<div id="checkout-checkout" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_option }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-checkout-option">
<div class="panel-body"></div>
</div>
</div>
{% if not logged and account != 'guest' %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_account }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-payment-address">
<div class="panel-body"></div>
</div>
</div>
{% else %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_payment_address }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-payment-address">
<div class="panel-body"></div>
</div>
</div>
{% endif %}
{% if shipping_required %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_shipping_address }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-shipping-address">
<div class="panel-body"></div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_shipping_method }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-shipping-method">
<div class="panel-body"></div>
</div>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_payment_method }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-payment-method">
<div class="panel-body"></div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_confirm }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-checkout-confirm">
<div class="panel-body"></div>
</div>
</div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
<script type="text/javascript"><!--
$(document).on('change', 'input[name=\'account\']', function() {
if ($('#collapse-payment-address').parent().find('.panel-heading .panel-title > *').is('a')) {
if (this.value == 'register') {
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_account }} <i class="fa fa-caret-down"></i></a>');
} else {
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_address }} <i class="fa fa-caret-down"></i></a>');
}
} else {
if (this.value == 'register') {
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('{{ text_checkout_account }}');
} else {
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_address }}');
}
}
});
{% if not logged %}
$(document).ready(function() {
$.ajax({
url: 'index.php?route=checkout/login',
dataType: 'html',
success: function(html) {
$('#collapse-checkout-option .panel-body').html(html);
$('#collapse-checkout-option').parent().find('.panel-heading .panel-title').html('<a href="#collapse-checkout-option" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_option }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-checkout-option\']').trigger('click');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
{% else %}
$(document).ready(function() {
$.ajax({
url: 'index.php?route=checkout/payment_address',
dataType: 'html',
success: function(html) {
$('#collapse-payment-address .panel-body').html(html);
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_address }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-payment-address\']').trigger('click');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
{% endif %}
// Checkout
$(document).delegate('#button-account', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/' + $('input[name=\'account\']:checked').val(),
dataType: 'html',
beforeSend: function() {
$('#button-account').button('loading');
},
complete: function() {
$('#button-account').button('reset');
},
success: function(html) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
$('#collapse-payment-address .panel-body').html(html);
if ($('input[name=\'account\']:checked').val() == 'register') {
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_account }} <i class="fa fa-caret-down"></i></a>');
} else {
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_address }} <i class="fa fa-caret-down"></i></a>');
}
$('a[href=\'#collapse-payment-address\']').trigger('click');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
// Login
$(document).delegate('#button-login', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/login/save',
type: 'post',
data: $('#collapse-checkout-option :input'),
dataType: 'json',
beforeSend: function() {
$('#button-login').button('loading');
},
complete: function() {
$('#button-login').button('reset');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#collapse-checkout-option .panel-body').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
// Highlight any found errors
$('input[name=\'email\']').parent().addClass('has-error');
$('input[name=\'password\']').parent().addClass('has-error');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
// Register
$(document).delegate('#button-register', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/register/save',
type: 'post',
data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'password\'], #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address textarea, #collapse-payment-address select'),
dataType: 'json',
beforeSend: function() {
$('#button-register').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#button-register').button('reset');
if (json['error']['warning']) {
$('#collapse-payment-address .panel-body').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
for (i in json['error']) {
var element = $('#input-payment-' + i.replace('_', '-'));
if ($(element).parent().hasClass('input-group')) {
$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
} else {
$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
}
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
} else {
{% if shipping_required %}
var shipping_address = $('#payment-address input[name=\'shipping_address\']:checked').prop('value');
if (shipping_address) {
$.ajax({
url: 'index.php?route=checkout/shipping_method',
dataType: 'html',
success: function(html) {
// Add the shipping address
$.ajax({
url: 'index.php?route=checkout/shipping_address',
dataType: 'html',
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);
$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_address }} <i class="fa fa-caret-down"></i></a>');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
$('#collapse-shipping-method .panel-body').html(html);
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-shipping-method\']').trigger('click');
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_shipping_method }}');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
} else {
$.ajax({
url: 'index.php?route=checkout/shipping_address',
dataType: 'html',
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);
$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_address }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-shipping-address\']').trigger('click');
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_shipping_method }}');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
{% else %}
$.ajax({
url: 'index.php?route=checkout/payment_method',
dataType: 'html',
success: function(html) {
$('#collapse-payment-method .panel-body').html(html);
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-payment-method\']').trigger('click');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
{% endif %}
$.ajax({
url: 'index.php?route=checkout/payment_address',
dataType: 'html',
complete: function() {
$('#button-register').button('reset');
},
success: function(html) {
$('#collapse-payment-address .panel-body').html(html);
$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_address }} <i class="fa fa-caret-down"></i></a>');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
// Payment Address
$(document).delegate('#button-payment-address', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/payment_address/save',
type: 'post',
data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'password\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address textarea, #collapse-payment-address select'),
dataType: 'json',
beforeSend: function() {
$('#button-payment-address').button('loading');
},
complete: function() {
$('#button-payment-address').button('reset');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
if (json['error']['warning']) {
$('#collapse-payment-address .panel-body').prepend('<div class="alert alert-warning alert-dismissible">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
for (i in json['error']) {
var element = $('#input-payment-' + i.replace('_', '-'));
if ($(element).parent().hasClass('input-group')) {
$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
} else {
$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
}
}
// Highlight any found errors
$('.text-danger').parent().parent().addClass('has-error');
} else {
{% if shipping_required %}
$.ajax({
url: 'index.php?route=checkout/shipping_address',
dataType: 'html',
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);
$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_address }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-shipping-address\']').trigger('click');
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_shipping_method }}');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
}).done(function() {
$.ajax({
url: 'index.php?route=checkout/payment_address',
dataType: 'html',
success: function(html) {
$('#collapse-payment-address .panel-body').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
{% else %}
$.ajax({
url: 'index.php?route=checkout/payment_method',
dataType: 'html',
success: function(html) {
$('#collapse-payment-method .panel-body').html(html);
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-payment-method\']').trigger('click');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
}).done(function() {
$.ajax({
url: 'index.php?route=checkout/payment_address',
dataType: 'html',
success: function(html) {
$('#collapse-payment-address .panel-body').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
{% endif %}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
// Shipping Address
$(document).delegate('#button-shipping-address', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/shipping_address/save',
type: 'post',
data: $('#collapse-shipping-address input[type=\'text\'], #collapse-shipping-address input[type=\'date\'], #collapse-shipping-address input[type=\'datetime-local\'], #collapse-shipping-address input[type=\'time\'], #collapse-shipping-address input[type=\'password\'], #collapse-shipping-address input[type=\'checkbox\']:checked, #collapse-shipping-address input[type=\'radio\']:checked, #collapse-shipping-address textarea, #collapse-shipping-address select'),
dataType: 'json',
beforeSend: function() {
$('#button-shipping-address').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#button-shipping-address').button('reset');
if (json['error']['warning']) {
$('#collapse-shipping-address .panel-body').prepend('<div class="alert alert-warning alert-dismissible">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
for (i in json['error']) {
var element = $('#input-shipping-' + i.replace('_', '-'));
if ($(element).parent().hasClass('input-group')) {
$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
} else {
$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
}
}
// Highlight any found errors
$('.text-danger').parent().parent().addClass('has-error');
} else {
$.ajax({
url: 'index.php?route=checkout/shipping_method',
dataType: 'html',
complete: function() {
$('#button-shipping-address').button('reset');
},
success: function(html) {
$('#collapse-shipping-method .panel-body').html(html);
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-shipping-method\']').trigger('click');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
$.ajax({
url: 'index.php?route=checkout/shipping_address',
dataType: 'html',
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
}).done(function() {
$.ajax({
url: 'index.php?route=checkout/payment_address',
dataType: 'html',
success: function(html) {
$('#collapse-payment-address .panel-body').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
// Guest
$(document).delegate('#button-guest', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/guest/save',
type: 'post',
data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address textarea, #collapse-payment-address select'),
dataType: 'json',
beforeSend: function() {
$('#button-guest').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#button-guest').button('reset');
if (json['error']['warning']) {
$('#collapse-payment-address .panel-body').prepend('<div class="alert alert-warning alert-dismissible">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
for (i in json['error']) {
var element = $('#input-payment-' + i.replace('_', '-'));
if ($(element).parent().hasClass('input-group')) {
$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
} else {
$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
}
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
} else {
{% if shipping_required %}
var shipping_address = $('#collapse-payment-address input[name=\'shipping_address\']:checked').prop('value');
if (shipping_address) {
$.ajax({
url: 'index.php?route=checkout/shipping_method',
dataType: 'html',
complete: function() {
$('#button-guest').button('reset');
},
success: function(html) {
// Add the shipping address
$.ajax({
url: 'index.php?route=checkout/guest_shipping',
dataType: 'html',
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);
$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_address }} <i class="fa fa-caret-down"></i></a>');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
$('#collapse-shipping-method .panel-body').html(html);
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-shipping-method\']').trigger('click');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
} else {
$.ajax({
url: 'index.php?route=checkout/guest_shipping',
dataType: 'html',
complete: function() {
$('#button-guest').button('reset');
},
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);
$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_address }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-shipping-address\']').trigger('click');
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_shipping_method }}');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
{% else %}
$.ajax({
url: 'index.php?route=checkout/payment_method',
dataType: 'html',
complete: function() {
$('#button-guest').button('reset');
},
success: function(html) {
$('#collapse-payment-method .panel-body').html(html);
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-payment-method\']').trigger('click');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
{% endif %}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
// Guest Shipping
$(document).delegate('#button-guest-shipping', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/guest_shipping/save',
type: 'post',
data: $('#collapse-shipping-address input[type=\'text\'], #collapse-shipping-address input[type=\'date\'], #collapse-shipping-address input[type=\'datetime-local\'], #collapse-shipping-address input[type=\'time\'], #collapse-shipping-address input[type=\'password\'], #collapse-shipping-address input[type=\'checkbox\']:checked, #collapse-shipping-address input[type=\'radio\']:checked, #collapse-shipping-address textarea, #collapse-shipping-address select'),
dataType: 'json',
beforeSend: function() {
$('#button-guest-shipping').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#button-guest-shipping').button('reset');
if (json['error']['warning']) {
$('#collapse-shipping-address .panel-body').prepend('<div class="alert alert-danger alert-dismissible">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
for (i in json['error']) {
var element = $('#input-shipping-' + i.replace('_', '-'));
if ($(element).parent().hasClass('input-group')) {
$(element).parent().after('<div class="text-danger">' + json['error'][i] + '</div>');
} else {
$(element).after('<div class="text-danger">' + json['error'][i] + '</div>');
}
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
} else {
$.ajax({
url: 'index.php?route=checkout/shipping_method',
dataType: 'html',
complete: function() {
$('#button-guest-shipping').button('reset');
},
success: function(html) {
$('#collapse-shipping-method .panel-body').html(html);
$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_shipping_method }} <i class="fa fa-caret-down"></i>');
$('a[href=\'#collapse-shipping-method\']').trigger('click');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('{{ text_checkout_payment_method }}');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$(document).delegate('#button-shipping-method', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/shipping_method/save',
type: 'post',
data: $('#collapse-shipping-method input[type=\'radio\']:checked, #collapse-shipping-method textarea'),
dataType: 'json',
beforeSend: function() {
$('#button-shipping-method').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#button-shipping-method').button('reset');
if (json['error']['warning']) {
$('#collapse-shipping-method .panel-body').prepend('<div class="alert alert-danger alert-dismissible">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
} else {
$.ajax({
url: 'index.php?route=checkout/payment_method',
dataType: 'html',
complete: function() {
$('#button-shipping-method').button('reset');
},
success: function(html) {
$('#collapse-payment-method .panel-body').html(html);
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_payment_method }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-payment-method\']').trigger('click');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('{{ text_checkout_confirm }}');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$(document).delegate('#button-payment-method', 'click', function() {
$.ajax({
url: 'index.php?route=checkout/payment_method/save',
type: 'post',
data: $('#collapse-payment-method input[type=\'radio\']:checked, #collapse-payment-method input[type=\'checkbox\']:checked, #collapse-payment-method textarea'),
dataType: 'json',
beforeSend: function() {
$('#button-payment-method').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
$('#button-payment-method').button('reset');
if (json['error']['warning']) {
$('#collapse-payment-method .panel-body').prepend('<div class="alert alert-danger alert-dismissible">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
} else {
$.ajax({
url: 'index.php?route=checkout/confirm',
dataType: 'html',
complete: function() {
$('#button-payment-method').button('reset');
},
success: function(html) {
$('#collapse-checkout-confirm .panel-body').html(html);
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<a href="#collapse-checkout-confirm" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle">{{ text_checkout_confirm }} <i class="fa fa-caret-down"></i></a>');
$('a[href=\'#collapse-checkout-confirm\']').trigger('click');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
//--></script>
{{ footer }}
@@ -0,0 +1,55 @@
{% if not redirect %}
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ column_name }}</td>
<td class="text-left">{{ column_model }}</td>
<td class="text-right">{{ column_quantity }}</td>
<td class="text-right">{{ column_price }}</td>
<td class="text-right">{{ column_total }}</td>
</tr>
</thead>
<tbody>
{% for product in products %}
<tr>
<td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a> {% for option in product.option %} <br />
&nbsp;<small> - {{ option.name }}: {{ option.value }}</small> {% endfor %}
{% if product.recurring %} <br />
<span class="label label-info">{{ text_recurring_item }}</span> <small>{{ product.recurring }}</small> {% endif %}</td>
<td class="text-left">{{ product.model }}</td>
<td class="text-right">{{ product.quantity }}</td>
<td class="text-right">{{ product.price }}</td>
<td class="text-right">{{ product.total }}</td>
</tr>
{% endfor %}
{% for voucher in vouchers %}
<tr>
<td class="text-left">{{ voucher.description }}</td>
<td class="text-left"></td>
<td class="text-right">1</td>
<td class="text-right">{{ voucher.amount }}</td>
<td class="text-right">{{ voucher.amount }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% for total in totals %}
<tr>
<td colspan="4" class="text-right"><strong>{{ total.title }}:</strong></td>
<td class="text-right">{{ total.text }}</td>
</tr>
{% endfor %}
</tfoot>
</table>
</div>
{{ payment }}
{% else %}
<script type="text/javascript"><!--
location = '{{ redirect }}';
//--></script>
{% endif %}
@@ -0,0 +1,512 @@
<div class="row">
<div class="col-sm-6">
<fieldset id="account">
<legend>{{ text_your_details }}</legend>
<div class="form-group" style="display: {% if customer_groups|length > 1 %} block {% else %} none {% endif %};">
<label class="control-label">{{ entry_customer_group }}</label>
{% for customer_group in customer_groups %}
{% if customer_group.customer_group_id == customer_group_id %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" checked="checked" />
{{ customer_group.name }}</label>
</div>
{% else %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" />
{{ customer_group.name }}</label>
</div>
{% endif %}
{% endfor %}</div>
<div class="form-group required">
<label class="control-label" for="input-payment-firstname">{{ entry_firstname }}</label>
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-payment-firstname" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-lastname">{{ entry_lastname }}</label>
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-payment-lastname" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-email">{{ entry_email }}</label>
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-payment-email" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-telephone">{{ entry_telephone }}</label>
<input type="text" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-payment-telephone" class="form-control" />
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'account' %}
{% if custom_field.type == 'select' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if guest_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == guest_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if guest_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == guest_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox"> {% if guest_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in guest_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}</textarea>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<br />
<button type="button" id="button-payment-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% endif %}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" />
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
</div>
<div class="col-sm-6">
<fieldset id="address">
<legend>{{ text_your_address }}</legend>
<div class="form-group">
<label class="control-label" for="input-payment-company">{{ entry_company }}</label>
<input type="text" name="company" value="{{ company }}" placeholder="{{ entry_company }}" id="input-payment-company" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-address-1">{{ entry_address_1 }}</label>
<input type="text" name="address_1" value="{{ address_1 }}" placeholder="{{ entry_address_1 }}" id="input-payment-address-1" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-payment-address-2">{{ entry_address_2 }}</label>
<input type="text" name="address_2" value="{{ address_2 }}" placeholder="{{ entry_address_2 }}" id="input-payment-address-2" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-city">{{ entry_city }}</label>
<input type="text" name="city" value="{{ city }}" placeholder="{{ entry_city }}" id="input-payment-city" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-postcode">{{ entry_postcode }}</label>
<input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-payment-postcode" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-country">{{ entry_country }}</label>
<select name="country_id" id="input-payment-country" class="form-control">
<option value="">{{ text_select }}</option>
{% for country in countries %}
{% if country.country_id == country_id %}
<option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
{% else %}
<option value="{{ country.country_id }}">{{ country.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-zone">{{ entry_zone }}</label>
<select name="zone_id" id="input-payment-zone" class="form-control">
</select>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'address' %}
{% if custom_field.type == 'select' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if guest_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == guest_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if guest_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == guest_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox"> {% if guest_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in guest_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}</textarea>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<br />
<button type="button" id="button-payment-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% endif %}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" />
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if guest_custom_field[custom_field.custom_field_id] %} {{ guest_custom_field[custom_field.custom_field_id] }} {% else %} {{ custom_field.value }} {% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
{{ captcha }} </div>
</div>
{% if shipping_required %}
<div class="checkbox">
<label> {% if shipping_address %}
<input type="checkbox" name="shipping_address" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="shipping_address" value="1" />
{% endif %}
{{ entry_shipping }}</label>
</div>
{% endif %}
<div class="buttons">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-guest" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
<script type="text/javascript"><!--
// Sort the custom fields
$('#account .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#account .form-group').length) {
$('#account .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#account .form-group').length) {
$('#account .form-group:first').before(this);
}
});
$('#address .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#address .form-group').length) {
$('#address .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#address .form-group').length) {
$('#address .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#address .form-group').length) {
$('#address .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#address .form-group').length) {
$('#address .form-group:first').before(this);
}
});
$('#collapse-payment-address input[name=\'customer_group_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/customfield&customer_group_id=' + this.value,
dataType: 'json',
success: function(json) {
$('#collapse-payment-address .custom-field').hide();
$('#collapse-payment-address .custom-field').removeClass('required');
for (i = 0; i < json.length; i++) {
custom_field = json[i];
$('#payment-custom-field' + custom_field['custom_field_id']).show();
if (custom_field['required']) {
$('#payment-custom-field' + custom_field['custom_field_id']).addClass('required');
} else {
$('#payment-custom-field' + custom_field['custom_field_id']).removeClass('required');
}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-payment-address input[name=\'customer_group_id\']:checked').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('#collapse-payment-address button[id^=\'button-payment-custom-field\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$(node).parent().find('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input[name^=\'custom_field\']').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input[name^=\'custom_field\']').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-payment-address select[name=\'country_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#collapse-payment-address select[name=\'country_id\']').prop('disabled', true);
},
complete: function() {
$('#collapse-payment-address select[name=\'country_id\']').prop('disabled', false);
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('#collapse-payment-address input[name=\'postcode\']').parent().parent().addClass('required');
} else {
$('#collapse-payment-address input[name=\'postcode\']').parent().parent().removeClass('required');
}
html = '<option value="">{{ text_select }}</option>';
if (json['zone'] && json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone'][i]['zone_id'] + '"';
if (json['zone'][i]['zone_id'] == '{{ zone_id }}') {
html += ' selected="selected"';
}
html += '>' + json['zone'][i]['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected">{{ text_none }}</option>';
}
$('#collapse-payment-address select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-payment-address select[name=\'country_id\']').trigger('change');
//--></script>
@@ -0,0 +1,335 @@
<form class="form-horizontal">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-shipping-firstname" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-shipping-lastname" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-shipping-company">{{ entry_company }}</label>
<div class="col-sm-10">
<input type="text" name="company" value="{{ company }}" placeholder="{{ entry_company }}" id="input-shipping-company" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-address-1">{{ entry_address_1 }}</label>
<div class="col-sm-10">
<input type="text" name="address_1" value="{{ address_1 }}" placeholder="{{ entry_address_1 }}" id="input-shipping-address-1" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-shipping-address-2">{{ entry_address_2 }}</label>
<div class="col-sm-10">
<input type="text" name="address_2" value="{{ address_2 }}" placeholder="{{ entry_address_2 }}" id="input-shipping-address-2" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-city">{{ entry_city }}</label>
<div class="col-sm-10">
<input type="text" name="city" value="{{ city }}" placeholder="{{ entry_city }}" id="input-shipping-city" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-shipping-postcode" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-country">{{ entry_country }}</label>
<div class="col-sm-10">
<select name="country_id" id="input-shipping-country" class="form-control">
<option value="">{{ text_select }}</option>
{% for country in countries %}
{% if country.country_id == country_id %}
<option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
{% else %}
<option value="{{ country.country_id }}">{{ country.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-zone">{{ entry_zone }}</label>
<div class="col-sm-10">
<select name="zone_id" id="input-shipping-zone" class="form-control">
</select>
</div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'address' %}
{% if custom_field.type == 'select' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if address_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == address_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div id="input-shipping-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if address_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == address_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div id="input-shipping-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox"> {% if address_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in address_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %} </div>
{% endfor %} </div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
</div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-shipping-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %} {{ address_custom_field[custom_field.custom_field_id] }} {% endif %}" />
</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if address_custom_field[custom_field.custom_field_id] %}{{ address_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
<div class="buttons">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-guest-shipping" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
</form>
<script type="text/javascript"><!--
// Sort the custom fields
$('#collapse-shipping-address .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group').eq(parseInt($(this).attr('data-sort'))+2).before(this);
}
if ($(this).attr('data-sort') > $('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group:first').before(this);
}
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-shipping-address button[id^=\'button-shipping-custom-field\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$(node).parent().find('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input[name^=\'custom_field\']').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input[name^=\'custom_field\']').attr('value', json['file']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-shipping-address select[name=\'country_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#collapse-shipping-address select[name=\'country_id\']').prop('disabled', true);
},
complete: function() {
$('#collapse-shipping-address select[name=\'country_id\']').prop('disabled', false);
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('#collapse-shipping-address input[name=\'postcode\']').parent().parent().addClass('required');
} else {
$('#collapse-shipping-address input[name=\'postcode\']').parent().parent().removeClass('required');
}
html = '<option value="">{{ text_select }}</option>';
if (json['zone'] && json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone'][i]['zone_id'] + '"';
if (json['zone'][i]['zone_id'] == '{{ zone_id }}') {
html += ' selected="selected"';
}
html += '>' + json['zone'][i]['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected">{{ text_none }}</option>';
}
$('#collapse-shipping-address select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-shipping-address select[name=\'country_id\']').trigger('change');
//--></script>
@@ -0,0 +1,39 @@
<div class="row">
<div class="col-sm-6">
<h2>{{ text_new_customer }}</h2>
<p>{{ text_checkout }}</p>
<div class="radio">
<label> {% if account == 'register' %}
<input type="radio" name="account" value="register" checked="checked" />
{% else %}
<input type="radio" name="account" value="register" />
{% endif %}
{{ text_register }}</label>
</div>
{% if checkout_guest %}
<div class="radio">
<label> {% if account == 'guest' %}
<input type="radio" name="account" value="guest" checked="checked" />
{% else %}
<input type="radio" name="account" value="guest" />
{% endif %}
{{ text_guest }}</label>
</div>
{% endif %}
<p>{{ text_register_account }}</p>
<input type="button" value="{{ button_continue }}" id="button-account" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
<div class="col-sm-6">
<h2>{{ text_returning_customer }}</h2>
<p>{{ text_i_am_returning_customer }}</p>
<div class="form-group">
<label class="control-label" for="input-email">{{ entry_email }}</label>
<input type="text" name="email" value="" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-password">{{ entry_password }}</label>
<input type="password" name="password" value="" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
<a href="{{ forgotten }}">{{ text_forgotten }}</a></div>
<input type="button" value="{{ button_login }}" id="button-login" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
@@ -0,0 +1,350 @@
<form class="form-horizontal">
{% if addresses %}
<div class="radio">
<label>
<input type="radio" name="payment_address" value="existing" checked="checked" />
{{ text_address_existing }}</label>
</div>
<div id="payment-existing">
<select name="address_id" class="form-control">
{% for address in addresses %}
{% if address['address_id'] == address_id %}
<option value="{{ address.address_id }}" selected="selected">{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.city }}, {{ address.zone }}, {{ address.country }}</option>
{% else %}
<option value="{{ address.address_id }}">{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.city }}, {{ address.zone }}, {{ address.country }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="radio">
<label>
<input type="radio" name="payment_address" value="new" />
{{ text_address_new }}</label>
</div>
{% endif %}
<br />
<div id="payment-new" style="display: {% if addresses %}none{% else %}block{% endif %};">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="" placeholder="{{ entry_firstname }}" id="input-payment-firstname" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="" placeholder="{{ entry_lastname }}" id="input-payment-lastname" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-payment-company">{{ entry_company }}</label>
<div class="col-sm-10">
<input type="text" name="company" value="" placeholder="{{ entry_company }}" id="input-payment-company" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-address-1">{{ entry_address_1 }}</label>
<div class="col-sm-10">
<input type="text" name="address_1" value="" placeholder="{{ entry_address_1 }}" id="input-payment-address-1" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-payment-address-2">{{ entry_address_2 }}</label>
<div class="col-sm-10">
<input type="text" name="address_2" value="" placeholder="{{ entry_address_2 }}" id="input-payment-address-2" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-city">{{ entry_city }}</label>
<div class="col-sm-10">
<input type="text" name="city" value="" placeholder="{{ entry_city }}" id="input-payment-city" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="" placeholder="{{ entry_postcode }}" id="input-payment-postcode" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-country">{{ entry_country }}</label>
<div class="col-sm-10">
<select name="country_id" id="input-payment-country" class="form-control">
<option value="">{{ text_select }}</option>
{% for country in countries %}
{% if country.country_id == country_id %}
<option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
{% else %}
<option value="{{ country.country_id }}">{{ country.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-zone">{{ entry_zone }}</label>
<div class="col-sm-10">
<select name="zone_id" id="input-payment-zone" class="form-control">
</select>
</div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.type == 'select' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}">
{% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}">
{% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">{{ custom_field.value }}</textarea>
</div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-payment-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="" id="input-payment-custom-field{{ custom_field.custom_field_id }}" />
</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class="buttons clearfix">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-payment-address" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
</form>
<script type="text/javascript"><!--
$('input[name=\'payment_address\']').on('change', function() {
if (this.value == 'new') {
$('#payment-existing').hide();
$('#payment-new').show();
} else {
$('#payment-existing').show();
$('#payment-new').hide();
}
});
//--></script>
<script type="text/javascript"><!--
// Sort the custom fields
$('#collapse-payment-address .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#collapse-payment-address .form-group').length-2) {
$('#collapse-payment-address .form-group').eq(parseInt($(this).attr('data-sort'))+2).before(this);
}
if ($(this).attr('data-sort') > $('#collapse-payment-address .form-group').length-2) {
$('#collapse-payment-address .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#collapse-payment-address .form-group').length-2) {
$('#collapse-payment-address .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#collapse-payment-address .form-group').length-2) {
$('#collapse-payment-address .form-group:first').before(this);
}
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-payment-address button[id^=\'button-payment-custom-field\']').on('click', function() {
var element = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(element).button('loading');
},
complete: function() {
$(element).button('reset');
},
success: function(json) {
$(element).parent().find('.text-danger').remove();
if (json['error']) {
$(element).parent().find('input[name^=\'custom_field\']').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(element).parent().find('input[name^=\'custom_field\']').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-payment-address select[name=\'country_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#collapse-payment-address select[name=\'country_id\']').prop('disabled', true);
},
complete: function() {
$('#collapse-payment-address select[name=\'country_id\']').prop('disabled', false);
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('#collapse-payment-address input[name=\'postcode\']').parent().parent().addClass('required');
} else {
$('#collapse-payment-address input[name=\'postcode\']').parent().parent().removeClass('required');
}
html = '<option value="">{{ text_select }}</option>';
if (json['zone'] && json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone'][i]['zone_id'] + '"';
if (json['zone'][i]['zone_id'] == '{{ zone_id }}') {
html += ' selected="selected"';
}
html += '>' + json['zone'][i]['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected">{{ text_none }}</option>';
}
$('#collapse-payment-address select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-payment-address select[name=\'country_id\']').trigger('change');
//--></script>
@@ -0,0 +1,43 @@
{% if error_warning %}
<div class="alert alert-warning alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
{% if payment_methods %}
<p>{{ text_payment_method }}</p>
{% for payment_method in payment_methods %}
<div class="radio">
<label>{% if payment_method.code == code or not code %}
{% set code = payment_method.code %}
<input type="radio" name="payment_method" value="{{ payment_method.code }}" checked="checked" />
{% else %}
<input type="radio" name="payment_method" value="{{ payment_method.code }}" />
{% endif %}
{{ payment_method.title }}
{% if payment_method.terms %}
({{ payment_method.terms }})
{% endif %} </label>
</div>
{% endfor %}
{% endif %}
<p><strong>{{ text_comments }}</strong></p>
<p>
<textarea name="comment" rows="8" class="form-control">{{ comment }}</textarea>
</p>
{% if text_agree %}
<div class="buttons">
<div class="pull-right">{{ text_agree }}
{% if agree %}
<input type="checkbox" name="agree" value="1" checked="checked" />
{% else %}
<input type="checkbox" name="agree" value="1" />
{% endif %}
&nbsp;
<input type="button" value="{{ button_continue }}" id="button-payment-method" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
{% else %}
<div class="buttons">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-payment-method" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
{% endif %}
@@ -0,0 +1,543 @@
<div class="row">
<div class="col-sm-6">
<fieldset id="account">
<legend>{{ text_your_details }}</legend>
<div class="form-group" style="display: {% if customer_groups|length > 1 %} block {% else %} none {% endif %};">
<label class="control-label">{{ entry_customer_group }}</label>
{% for customer_group in customer_groups %}
{% if customer_group.customer_group_id == customer_group_id %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" checked="checked" />
{{ customer_group.name }}</label>
</div>
{% else %}
<div class="radio">
<label>
<input type="radio" name="customer_group_id" value="{{ customer_group.customer_group_id }}" />
{{ customer_group.name }}</label>
</div>
{% endif %}
{% endfor %}</div>
<div class="form-group required">
<label class="control-label" for="input-payment-firstname">{{ entry_firstname }}</label>
<input type="text" name="firstname" value="" placeholder="{{ entry_firstname }}" id="input-payment-firstname" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-lastname">{{ entry_lastname }}</label>
<input type="text" name="lastname" value="" placeholder="{{ entry_lastname }}" id="input-payment-lastname" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-email">{{ entry_email }}</label>
<input type="text" name="email" value="" placeholder="{{ entry_email }}" id="input-payment-email" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-telephone">{{ entry_telephone }}</label>
<input type="text" name="telephone" value="" placeholder="{{ entry_telephone }}" id="input-payment-telephone" class="form-control" />
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'account' %}
{% if custom_field.type == 'select' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endfor %}
</select>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">{{ custom_field.value }}</textarea>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<br />
<button type="button" id="button-payment-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="" id="input-payment-custom-field{{ custom_field.custom_field_id }}" />
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
<fieldset>
<legend>{{ text_your_password }}</legend>
<div class="form-group required">
<label class="control-label" for="input-payment-password">{{ entry_password }}</label>
<input type="password" name="password" value="" placeholder="{{ entry_password }}" id="input-payment-password" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-confirm">{{ entry_confirm }}</label>
<input type="password" name="confirm" value="" placeholder="{{ entry_confirm }}" id="input-payment-confirm" class="form-control" />
</div>
</fieldset>
</div>
<div class="col-sm-6">
<fieldset id="address">
<legend>{{ text_your_address }}</legend>
<div class="form-group">
<label class="control-label" for="input-payment-company">{{ entry_company }}</label>
<input type="text" name="company" value="" placeholder="{{ entry_company }}" id="input-payment-company" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-address-1">{{ entry_address_1 }}</label>
<input type="text" name="address_1" value="" placeholder="{{ entry_address_1 }}" id="input-payment-address-1" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-payment-address-2">{{ entry_address_2 }}</label>
<input type="text" name="address_2" value="" placeholder="{{ entry_address_2 }}" id="input-payment-address-2" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-city">{{ entry_city }}</label>
<input type="text" name="city" value="" placeholder="{{ entry_city }}" id="input-payment-city" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-postcode">{{ entry_postcode }}</label>
<input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-payment-postcode" class="form-control" />
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-country">{{ entry_country }}</label>
<select name="country_id" id="input-payment-country" class="form-control">
<option value="">{{ text_select }}</option>
{% for country in countries %}
{% if country.country_id == country_id %}
<option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
{% else %}
<option value="{{ country.country_id }}">{{ country.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="form-group required">
<label class="control-label" for="input-payment-zone">{{ entry_zone }}</label>
<select name="zone_id" id="input-payment-zone" class="form-control">
</select>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'address' %}
{% if custom_field.type == 'select' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endfor %}
</select>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<div id="input-payment-custom-field{{ custom_field.custom_field_id }}"> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %} </div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control">{{ custom_field.value }}</textarea>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label">{{ custom_field.name }}</label>
<br />
<button type="button" id="button-payment-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="" id="input-payment-custom-field{{ custom_field.custom_field_id }}" />
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div id="payment-custom-field{{ custom_field.custom_field_id }}" class="form-group custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="control-label" for="input-payment-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-payment-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
{{ captcha }}</div>
</div>
<div class="checkbox">
<label for="newsletter">
<input type="checkbox" name="newsletter" value="1" id="newsletter" />
{{ entry_newsletter }}</label>
</div>
{% if shipping_required %}
<div class="checkbox">
<label>
<input type="checkbox" name="shipping_address" value="1" checked="checked" />
{{ entry_shipping }}</label>
</div>
{% endif %}
{% if text_agree %}
<div class="buttons clearfix">
<div class="pull-right">{{ text_agree }}
&nbsp;
<input type="checkbox" name="agree" value="1" />
<input type="button" value="{{ button_continue }}" id="button-register" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
{% else %}
<div class="buttons clearfix">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-register" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
{% endif %}
<script type="text/javascript"><!--
// Sort the custom fields
$('#account .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#account .form-group').length) {
$('#account .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#account .form-group').length) {
$('#account .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#account .form-group').length) {
$('#account .form-group:first').before(this);
}
});
$('#address .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#address .form-group').length) {
$('#address .form-group').eq($(this).attr('data-sort')).before(this);
}
if ($(this).attr('data-sort') > $('#address .form-group').length) {
$('#address .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#address .form-group').length) {
$('#address .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#address .form-group').length) {
$('#address .form-group:first').before(this);
}
});
$('#collapse-payment-address input[name=\'customer_group_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/customfield&customer_group_id=' + this.value,
dataType: 'json',
success: function(json) {
$('#collapse-payment-address .custom-field').hide();
$('#collapse-payment-address .custom-field').removeClass('required');
for (i = 0; i < json.length; i++) {
custom_field = json[i];
$('#payment-custom-field' + custom_field['custom_field_id']).show();
if (custom_field['required']) {
$('#payment-custom-field' + custom_field['custom_field_id']).addClass('required');
}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-payment-address input[name=\'customer_group_id\']:checked').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('#collapse-payment-address button[id^=\'button-payment-custom-field\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input[name^=\'custom_field\']').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input[name^=\'custom_field\']').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-payment-address select[name=\'country_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#collapse-payment-address select[name=\'country_id\']').prop('disabled', true);
},
complete: function() {
$('#collapse-payment-address select[name=\'country_id\']').prop('disabled', false);
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('#collapse-payment-address input[name=\'postcode\']').parent().addClass('required');
} else {
$('#collapse-payment-address input[name=\'postcode\']').parent().removeClass('required');
}
html = '<option value="">{{ text_select }}</option>';
if (json['zone'] && json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone'][i]['zone_id'] + '"';
if (json['zone'][i]['zone_id'] == '{{ zone_id }}') {
html += ' selected="selected"';
}
html += '>' + json['zone'][i]['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected">{{ text_none }}</option>';
}
$('#collapse-payment-address select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-payment-address select[name=\'country_id\']').trigger('change');
//--></script>
@@ -0,0 +1,349 @@
<form class="form-horizontal">
{% if addresses %}
<div class="radio">
<label>
<input type="radio" name="shipping_address" value="existing" checked="checked" />
{{ text_address_existing }}</label>
</div>
<div id="shipping-existing">
<select name="address_id" class="form-control">
{% for address in addresses %}
{% if address.address_id == address_id %}
<option value="{{ address.address_id }}" selected="selected">{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.city }}, {{ address.zone }}, {{ address.country }}</option>
{% else %}
<option value="{{ address.address_id }}">{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.city }}, {{ address.zone }}, {{ address.country }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="radio">
<label>
<input type="radio" name="shipping_address" value="new" />
{{ text_address_new }}</label>
</div>
{% endif %}
<br />
<div id="shipping-new" style="display: {% if addresses %}none{% else %}block{% endif %};">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="" placeholder="{{ entry_firstname }}" id="input-shipping-firstname" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-lastname">{{ entry_lastname }}</label>
<div class="col-sm-10">
<input type="text" name="lastname" value="" placeholder="{{ entry_lastname }}" id="input-shipping-lastname" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-shipping-company">{{ entry_company }}</label>
<div class="col-sm-10">
<input type="text" name="company" value="" placeholder="{{ entry_company }}" id="input-shipping-company" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-address-1">{{ entry_address_1 }}</label>
<div class="col-sm-10">
<input type="text" name="address_1" value="" placeholder="{{ entry_address_1 }}" id="input-shipping-address-1" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-shipping-address-2">{{ entry_address_2 }}</label>
<div class="col-sm-10">
<input type="text" name="address_2" value="" placeholder="{{ entry_address_2 }}" id="input-shipping-address-2" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-city">{{ entry_city }}</label>
<div class="col-sm-10">
<input type="text" name="city" value="" placeholder="{{ entry_city }}" id="input-shipping-city" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-shipping-postcode" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-country">{{ entry_country }}</label>
<div class="col-sm-10">
<select name="country_id" id="input-shipping-country" class="form-control">
<option value="">{{ text_select }}</option>
{% for country in countries %}
{% if country.country_id == country_id %}
<option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
{% else %}
<option value="{{ country.country_id }}">{{ country.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-zone">{{ entry_zone }}</label>
<div class="col-sm-10">
<select name="zone_id" id="input-shipping-zone" class="form-control">
</select>
</div>
</div>
{% for custom_field in custom_fields %}
{% if custom_field.type == 'select' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div id="input-shipping-custom-field{{ custom_field.custom_field_id }}">
{% for custom_field_value in custom_field.custom_field_value %}
<div class="radio">
<label>
<input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div id="input-shipping-custom-field{{ custom_field.custom_field_id }}">
{% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">
<label>
<input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
</div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control">{{ custom_field.value }}</textarea>
</div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-shipping-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" />
</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-shipping-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-shipping-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class="buttons clearfix">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-shipping-address" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
</form>
<script type="text/javascript"><!--
$('input[name=\'shipping_address\']').on('change', function() {
if (this.value == 'new') {
$('#shipping-existing').hide();
$('#shipping-new').show();
} else {
$('#shipping-existing').show();
$('#shipping-new').hide();
}
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-shipping-address .form-group[data-sort]').detach().each(function() {
if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group').eq(parseInt($(this).attr('data-sort'))+2).before(this);
}
if ($(this).attr('data-sort') > $('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group:last').after(this);
}
if ($(this).attr('data-sort') == $('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group:last').after(this);
}
if ($(this).attr('data-sort') < -$('#collapse-shipping-address .form-group').length-2) {
$('#collapse-shipping-address .form-group:first').before(this);
}
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-shipping-address button[id^=\'button-shipping-custom-field\']').on('click', function() {
var element = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
if (typeof timer != 'undefined') {
clearInterval(timer);
}
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(element).button('loading');
},
complete: function() {
$(element).button('reset');
},
success: function(json) {
$(element).parent().find('.text-danger').remove();
if (json['error']) {
$(element).parent().find('input[name^=\'custom_field\']').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(element).parent().find('input[name^=\'custom_field\']').val(json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
$('.time').datetimepicker({
language: '{{ datepicker }}',
pickDate: false
});
$('.datetime').datetimepicker({
language: '{{ datepicker }}',
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('#collapse-shipping-address select[name=\'country_id\']').on('change', function() {
$.ajax({
url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('#collapse-shipping-address select[name=\'country_id\']').prop('disabled', true);
},
complete: function() {
$('#collapse-shipping-address select[name=\'country_id\']').prop('disabled', false);
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('#collapse-shipping-address input[name=\'postcode\']').parent().parent().addClass('required');
} else {
$('#collapse-shipping-address input[name=\'postcode\']').parent().parent().removeClass('required');
}
html = '<option value="">{{ text_select }}</option>';
if (json['zone'] && json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone'][i]['zone_id'] + '"';
if (json['zone'][i]['zone_id'] == '{{ zone_id }}') {
html += ' selected="selected"';
}
html += '>' + json['zone'][i]['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected">{{ text_none }}</option>';
}
$('#collapse-shipping-address select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
$('#collapse-shipping-address select[name=\'country_id\']').trigger('change');
//--></script>
@@ -0,0 +1,33 @@
{% if error_warning %}
<div class="alert alert-warning alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
{% endif %}
{% if shipping_methods %}
<p>{{ text_shipping_method }}</p>
{% for shipping_method in shipping_methods %}
<p><strong>{{ shipping_method.title }}</strong></p>
{% if not shipping_method.error %}
{% for quote in shipping_method.quote %}
<div class="radio">
<label> {% if quote.code == code or not code %}
{% set code = quote.code %}
<input type="radio" name="shipping_method" value="{{ quote.code }}" checked="checked" />
{% else %}
<input type="radio" name="shipping_method" value="{{ quote.code }}" />
{% endif %}
{{ quote.title }} - {{ quote.text }}</label>
</div>
{% endfor %}
{% else %}
<div class="alert alert-danger alert-dismissible">{{ shipping_method.error }}</div>
{% endif %}
{% endfor %}
{% endif %}
<p><strong>{{ text_comments }}</strong></p>
<p>
<textarea name="comment" rows="8" class="form-control">{{ comment }}</textarea>
</p>
<div class="buttons">
<div class="pull-right">
<input type="button" value="{{ button_continue }}" id="button-shipping-method" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
</div>
</div>
@@ -0,0 +1,51 @@
<div id="cart" class="btn-group btn-block">
<button type="button" data-toggle="dropdown" data-loading-text="{{ text_loading }}" class="btn btn-inverse btn-block btn-lg dropdown-toggle"><i class="fa fa-shopping-cart"></i> <span id="cart-total">{{ text_items }}</span></button>
<ul class="dropdown-menu pull-right">
{% if products or vouchers %}
<li>
<table class="table table-striped">
{% for product in products %}
<tr>
<td class="text-center">{% if product.thumb %} <a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-thumbnail" /></a> {% endif %}</td>
<td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a> {% if product.option %}
{% for option in product.option %} <br />
- <small>{{ option.name }} {{ option.value }}</small> {% endfor %}
{% endif %}
{% if product.recurring %} <br />
- <small>{{ text_recurring }} {{ product.recurring }}</small> {% endif %}</td>
<td class="text-right">x {{ product.quantity }}</td>
<td class="text-right">{{ product.total }}</td>
<td class="text-center"><button type="button" onclick="cart.remove('{{ product.cart_id }}');" title="{{ button_remove }}" class="btn btn-danger btn-xs"><i class="fa fa-times"></i></button></td>
</tr>
{% endfor %}
{% for voucher in vouchers %}
<tr>
<td class="text-center"></td>
<td class="text-left">{{ voucher.description }}</td>
<td class="text-right">x&nbsp;1</td>
<td class="text-right">{{ voucher.amount }}</td>
<td class="text-center text-danger"><button type="button" onclick="voucher.remove('{{ voucher.key }}');" title="{{ button_remove }}" class="btn btn-danger btn-xs"><i class="fa fa-times"></i></button></td>
</tr>
{% endfor %}
</table>
</li>
<li>
<div>
<table class="table table-bordered">
{% for total in totals %}
<tr>
<td class="text-right"><strong>{{ total.title }}</strong></td>
<td class="text-right">{{ total.text }}</td>
</tr>
{% endfor %}
</table>
<p class="text-right"><a href="{{ cart }}"><strong><i class="fa fa-shopping-cart"></i> {{ text_cart }}</strong></a>&nbsp;&nbsp;&nbsp;<a href="{{ checkout }}"><strong><i class="fa fa-share"></i> {{ text_checkout }}</strong></a></p>
</div>
</li>
{% else %}
<li>
<p class="text-center">{{ text_empty }}</p>
</li>
{% endif %}
</ul>
</div>
@@ -0,0 +1,7 @@
{% if modules %}
<aside id="column-left" class="col-sm-3 hidden-xs">
{% for module in modules %}
{{ module }}
{% endfor %}
</aside>
{% endif %}
@@ -0,0 +1,7 @@
{% if modules %}
<aside id="column-right" class="col-sm-3 hidden-xs">
{% for module in modules %}
{{ module }}
{% endfor %}
</aside>
{% endif %}
@@ -0,0 +1,3 @@
{% for module in modules %}
{{ module }}
{% endfor %}
@@ -0,0 +1,3 @@
{% for module in modules %}
{{ module }}
{% endfor %}
@@ -0,0 +1,26 @@
{% if currencies|length > 1 %}
<div class="pull-left">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-currency">
<div class="btn-group">
<button class="btn btn-link dropdown-toggle" data-toggle="dropdown">{% for currency in currencies %}
{% if currency.symbol_left and currency.code == code %} <strong>{{ currency.symbol_left }}</strong> {% elseif currency.symbol_right and currency.code == code %} <strong>{{ currency.symbol_right }}</strong> {% endif %}
{% endfor %} <span class="hidden-xs hidden-sm hidden-md">{{ text_currency }}</span>&nbsp;<i class="fa fa-caret-down"></i></button>
<ul class="dropdown-menu">
{% for currency in currencies %}
{% if currency.symbol_left %}
<li>
<button class="currency-select btn btn-link btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</button>
</li>
{% else %}
<li>
<button class="currency-select btn btn-link btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_right }} {{ currency.title }}</button>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<input type="hidden" name="code" value="" />
<input type="hidden" name="redirect" value="{{ redirect }}" />
</form>
</div>
{% endif %}
@@ -0,0 +1,36 @@
<footer class="pt-4 pb-3">
<div class="container-fluid">
<hr>
<div class="row g-3 justify-content-between">
<div class="col-md-auto text-center text-md-start">
<div class="logo d-inline-block">{{ config_name|upper }}</div>
<div class="comment">{{ config_comment|nl2br }}</div>
</div>
<div class="col-md-auto text-center text-md-end">
<div><a href="tel:{{ config_telephone }}">{{ config_telephone }}</a></div>
<div><a href="mailto:{{ config_email }}">{{ config_email }}</a></div>
<div>{{ config_address }}</div>
</div>
{% if informations %}
<div class="col-12">
<div class="row g-3 justify-content-center">
{% for information in informations %}
<div class="col-auto"><a href="{{ information.href }}">{{ information.title }}</a></div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
</footer>
<script src="store/view/theme/dominik/assets/js/bootstrap.bundle.min.js"></script>
{% for style in styles %}
<link href="{{ style.href }}" type="text/css" rel="{{ style.rel }}" media="{{ style.media }}" />
{% endfor %}
{% for script in scripts %}
<script src="{{ script }}" type="text/javascript"></script>
{% endfor %}
<script src="store/view/theme/dominik/assets/js/script.js"></script>
</body></html>
@@ -0,0 +1,107 @@
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="{{ direction }}" lang="{{ lang }}" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="{{ direction }}" lang="{{ lang }}" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="{{ direction }}" lang="{{ lang }}">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ title }}</title>
{% if robots %}
<meta name="robots" content="{{ robots }}" />
{% endif %}
<base href="{{ base }}" />
{% if description %}
<meta name="description" content="{{ description }}" />
{% endif %}
{% if keywords %}
<meta name="keywords" content="{{ keywords }}" />
{% endif %}
<meta property="og:title" content="{{ title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ og_url }}" />
{% if og_image %}
<meta property="og:image" content="{{ og_image }}" />
{% else %}
<meta property="og:image" content="{{ logo }}" />
{% endif %}
<meta property="og:site_name" content="{{ name }}" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap" rel="stylesheet">
<link href="store/view/theme/dominik/assets/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="store/view/theme/dominik/assets/css/main.css" type="text/css" rel="stylesheet" />
{% for style in styles %}
<link href="{{ style.href }}" type="text/css" rel="{{ style.rel }}" media="{{ style.media }}" />
{% endfor %}
<script src="store/view/theme/dominik/assets/js/jquery-3.6.3.min.js"></script>
{% for script in scripts %}
<script src="{{ script }}" type="text/javascript"></script>
{% endfor %}
{% for link in links %}
<link href="{{ link.href }}" rel="{{ link.rel }}" />
{% endfor %}
{% for analytic in analytics %}
{{ analytic }}
{% endfor %}
</head>
<body class="body">
<header class="sticky-top bg-white">
<div class="container-fluid">
<div class="row gx-3 flex-nowrap align-items-center">
<div class="col">
<div class="d-none d-lg-inline-block">
<ul class="menu left-menu">
{{ menu }}
{{ blog_menu }}
</ul>
</div>
<div class="d-lg-none">
<div class="menu-btn" >
<svg onclick="mobilemenu();return false;" width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.306641 12H15.9822" stroke="#14142B" stroke-linecap="round"/>
<path d="M0.306641 5H23.6931" stroke="#14142B" stroke-linecap="round"/>
<path d="M0.306641 19H23.6931" stroke="#14142B" stroke-linecap="round"/>
</svg>
</div>
</div>
</div>
<div class="col-auto"><a class="logo" href="{{ home }}">{{ name|upper }}</a></div>
<div class="col d-flex justify-content-end">
<ul class="menu">
<li><a href="tel:{{ config_telephone }}"><svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.1708 16.415C13.6356 16.415 14.5982 16.0216 15.4436 15.0673C15.5106 15.0003 15.5776 14.925 15.6361 14.8581C16.1384 14.2972 16.3728 13.7448 16.3728 13.2174C16.3728 12.6148 16.0212 12.0539 15.2762 11.5349L12.8404 9.84406C12.0954 9.32514 11.2081 9.26656 10.505 9.96128L9.8605 10.6058C9.668 10.7983 9.50057 10.8067 9.31643 10.6895C8.86443 10.4049 7.952 9.60971 7.33257 8.99028C6.67969 8.34578 6.0519 7.62592 5.71708 7.09856C5.60826 6.90604 5.61663 6.747 5.80915 6.55448L6.44531 5.90995C7.14843 5.20682 7.08984 4.31955 6.57087 3.57457L4.88002 1.13874C4.36105 0.393764 3.80022 0.0505719 3.19754 0.0422014C2.6702 0.0338308 2.11774 0.276577 1.55692 0.778806C1.48159 0.84577 1.41462 0.904363 1.34766 0.962963C0.393415 1.81676 0 2.77936 0 4.22747C0 6.62144 1.47321 9.53442 4.1769 12.2381C6.86384 14.925 9.78514 16.415 12.1708 16.415ZM12.1791 15.1259C10.0446 15.1678 7.3075 13.5271 5.13951 11.3676C2.9548 9.19121 1.23884 6.36196 1.28069 4.22747C1.29744 3.30671 1.62389 2.51151 2.27679 1.94231C2.33538 1.89209 2.37723 1.85023 2.43583 1.80838C2.68694 1.59075 2.9548 1.47356 3.19754 1.47356C3.44029 1.47356 3.65792 1.56564 3.81696 1.81676L5.44085 4.25258C5.61663 4.51207 5.63337 4.80503 5.37389 5.06452L4.63728 5.80113C4.05971 6.3787 4.10156 7.08182 4.52009 7.64263C4.99721 8.28721 5.82589 9.22471 6.47042 9.86085C7.10659 10.5053 8.11943 11.4094 8.77229 11.8948C9.33314 12.3134 10.0363 12.3553 10.6139 11.7777L11.3504 11.0411C11.6099 10.7816 11.8945 10.7983 12.1624 10.9658L14.5982 12.5896C14.8409 12.7571 14.9414 12.9663 14.9414 13.2174C14.9414 13.4602 14.8242 13.7281 14.6066 13.9791C14.5564 14.0377 14.5229 14.0796 14.4726 14.1382C13.9034 14.7911 13.1083 15.1091 12.1791 15.1259Z" fill="black" fill-opacity="0.85"/>
</svg>
<span class="d-none d-lg-inline-block ms-2">Позвонить</span></a></li>
<li><a href="#" onclick="SendRequest(0);return false;"><svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.14788 18.3899C5.55804 18.3899 5.84264 18.1723 6.35324 17.7203L9.24107 15.1505H14.6149C17.1094 15.1505 18.4486 13.7694 18.4486 11.3169V4.905C18.4486 2.45242 17.1094 1.07129 14.6149 1.07129H3.83371C1.33929 1.07129 0 2.44406 0 4.905V11.3169C0 13.7778 1.33929 15.1505 3.83371 15.1505H4.23549V17.3269C4.23549 17.9714 4.56194 18.3899 5.14788 18.3899ZM5.49107 16.8581V14.4306C5.49107 13.9786 5.31529 13.8029 4.86328 13.8029H3.83371C2.14286 13.8029 1.34766 12.9407 1.34766 11.3084V4.905C1.34766 3.27274 2.14286 2.41895 3.83371 2.41895H14.6149C16.2974 2.41895 17.101 3.27274 17.101 4.905V11.3084C17.101 12.9407 16.2974 13.8029 14.6149 13.8029H9.19086C8.72207 13.8029 8.48771 13.8699 8.16964 14.1963L5.49107 16.8581Z" fill="black" fill-opacity="0.85"/>
</svg>
<span class="d-none d-lg-inline-block ms-2">Написать</span></a></li>
<li><a href="{{ wishlist }}"><svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_406_479)">
<path d="M0 5.56752C0 9.1334 2.98828 12.6406 7.70929 15.654C7.88507 15.7628 8.13614 15.88 8.31193 15.88C8.48771 15.88 8.73886 15.7628 8.923 15.654C13.6356 12.6406 16.6239 9.1334 16.6239 5.56752C16.6239 2.60435 14.5899 0.511719 11.8778 0.511719C10.3292 0.511719 9.07364 1.24832 8.31193 2.37834C7.567 1.25669 6.29464 0.511719 4.74609 0.511719C2.03404 0.511719 0 2.60435 0 5.56752ZM1.34766 5.56752C1.34766 3.34096 2.78739 1.85937 4.72935 1.85937C6.30301 1.85937 7.207 2.83873 7.74271 3.67578C7.96871 4.0106 8.11107 4.10268 8.31193 4.10268C8.51286 4.10268 8.63843 4.00223 8.88114 3.67578C9.45871 2.85547 10.3292 1.85937 11.8945 1.85937C13.8365 1.85937 15.2762 3.34096 15.2762 5.56752C15.2762 8.68133 11.9866 12.038 8.48771 14.365C8.404 14.4235 8.34543 14.4654 8.31193 14.4654C8.27843 14.4654 8.21986 14.4235 8.1445 14.365C4.63728 12.038 1.34766 8.68133 1.34766 5.56752Z" fill="black" fill-opacity="0.85"/>
</g>
<defs>
<clipPath id="clip0_406_479">
<rect width="16.6239" height="15.8789" fill="white" transform="translate(0 0.000488281)"/>
</clipPath>
</defs>
</svg>
<span class="d-none d-lg-inline-block ms-2 text-wishlist">{{ text_wishlist }}</span></a></li>
</ul>
</div>
</div>
</div>
</header>
@@ -0,0 +1,10 @@
{{ header }}
{#
{{ column_left }}
#}
{{ content_top }}
{{ content_bottom }}
{#
{{ column_right }}
#}
{{ footer }}
@@ -0,0 +1,24 @@
{% if languages|length > 1 %}
<div class="pull-left">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-language">
<div class="btn-group">
<button class="btn btn-link dropdown-toggle" data-toggle="dropdown">
{% for language in languages %}
{% if language.code == code %}
<img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}">
{% endif %}
{% endfor %}
<span class="hidden-xs hidden-sm hidden-md">{{ text_language }}</span>&nbsp;<i class="fa fa-caret-down"></i></button>
<ul class="dropdown-menu">
{% for language in languages %}
<li>
<button class="btn btn-link btn-block language-select" type="button" name="{{ language.code }}"><img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}" /> {{ language.name }}</button>
</li>
{% endfor %}
</ul>
</div>
<input type="hidden" name="code" value="" />
<input type="hidden" name="redirect" value="{{ redirect }}" />
</form>
</div>
{% endif %}
@@ -0,0 +1,7 @@
{{ header }}
<div id="common-maintenance" class="container">
<div class="row">
<div class="col-12">{{ message }}</div>
</div>
</div>
{{ footer }}
@@ -0,0 +1,39 @@
{% if categories %}
{% for category in categories %}
<li><a href="{{ category.href }}">{{ category.name }}</a>
{% if category.children %}
<ul>
{% for children in category.children %}
<li><a href="{{ children.href }}">{{ children.name }}</a> </li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% endif %}
{#
{% if category.children %}
<li><a href="{{ category.href }}">{{ category.name }}</a>
{% for children in category.children %}
<ul>
{% for child in children %}
<li><a href="{{ child.href }}">{{ child.name }}</a></li>
{% endfor %}
</ul>
{% endfor %}
</li>
{% else %}
<li><a href="{{ category.href }}">{{ category.name }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
#}
@@ -0,0 +1,16 @@
<a href="{{ product.href }}" class="d-block product-card" data-product-id="{{ product.product_id }}">
<div class="images">
{% if product.additional_thumb %}
<img src="{{ product.additional_thumb }}" alt="Свадебное платье {{ product.name }} прокат Dominik" class="hidden-image" loading="lazy">
{% endif %}
<img src="{{ product.thumb }}" alt="Свадебное платье {{ product.name }} прокат Dominik" loading="lazy">
<div class="fav-btn" onclick="wishlist.add('{{ product.product_id }}');return false;"><svg width="33" height="30" viewBox="0 0 33 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.304688 9.85026C0.304688 16.8004 6.12908 23.6363 15.3307 29.5097C15.6733 29.7217 16.1627 29.9502 16.5053 29.9502C16.8479 29.9502 17.3374 29.7217 17.6963 29.5097C26.8815 23.6363 32.7059 16.8004 32.7059 9.85026C32.7059 4.0748 28.7415 -0.00390625 23.4554 -0.00390625C20.4372 -0.00390625 17.9899 1.43179 16.5053 3.6343C15.0534 1.44811 12.5734 -0.00390625 9.5552 -0.00390625C4.2692 -0.00390625 0.304688 4.0748 0.304688 9.85026ZM2.93138 9.85026C2.93138 5.51051 5.73752 2.62278 9.52257 2.62278C12.5898 2.62278 14.3517 4.53162 15.3959 6.1631C15.8363 6.8157 16.1138 6.99516 16.5053 6.99516C16.8969 6.99516 17.1417 6.79938 17.6147 6.1631C18.7405 4.56424 20.4372 2.62278 23.488 2.62278C27.2731 2.62278 30.0793 5.51051 30.0793 9.85026C30.0793 15.9193 23.6675 22.4617 16.8479 26.9972C16.6848 27.1114 16.5706 27.1929 16.5053 27.1929C16.44 27.1929 16.3258 27.1114 16.179 26.9972C9.34311 22.4617 2.93138 15.9193 2.93138 9.85026Z" fill="white"/>
</svg>
</div>
</div>
<div class="product-name text-center py-4">
<h5 class="product-title">{{ product.name }}</h5>
<div class="product-price">{% if product.price_n|round or product.price_2_n|round %}{{ price_prefix }} {{ product.min_price }}{% else %}Покупка {{ product.price_3 }}{% endif %}</div>
</div>
</a>
@@ -0,0 +1,6 @@
<div id="search" class="input-group">
<input type="text" name="search" value="{{ search }}" placeholder="{{ text_search }}" class="form-control input-lg" />
<span class="input-group-btn">
<button type="button" class="btn btn-default btn-lg"><i class="fa fa-search"></i></button>
</span>
</div>
@@ -0,0 +1,25 @@
{{ header }}
<div id="common-success" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
{{ text_message }}
<div class="buttons">
<div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
</div>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
@@ -0,0 +1,24 @@
{{ header }}
{{ content_top }}
<section id="error-not-found" class="not-found-page py-5">
<div class="container-fluid">
<div class="not-found-wrap">
<div class="not-found-copy">
<div class="not-found-eyebrow">{{ text_eyebrow|default('Ошибка 404') }}</div>
<h1 class="heading">{{ heading_title|default('Страница не найдена') }}</h1>
<p class="subheading">{{ text_error|default('Похоже, эта страница больше не доступна или адрес был введён с ошибкой.') }}</p>
<p>{{ text_hint|default('Вернитесь на главную или воспользуйтесь поиском, чтобы найти нужный раздел.') }}</p>
<div class="not-found-actions">
<a href="{{ continue }}" class="btn btn-dark">{{ button_home|default('На главную') }}</a>
<a href="{{ search|default(continue) }}" class="btn btn-outline-dark">{{ button_search|default('Поиск') }}</a>
<a href="{{ contact|default(continue) }}" class="btn btn-white">{{ button_contact|default('Связаться') }}</a>
</div>
</div>
<div class="not-found-mark" aria-hidden="true">
<span>404</span>
</div>
</div>
</div>
</section>
{{ content_bottom }}
{{ footer }}
@@ -0,0 +1,13 @@
<script type="text/javascript">
console.log("[GTAG] Submit cart view: " + {{ ecomm_prodid }});
gtag('event', 'page_view', {
'send_to': '{{ send_to }}',
'name': 'cart',
'ecomm_prodid': {{ ecomm_prodid }},
'ecomm_pagetype': 'cart',
'ecomm_totalvalue': {{ ecomm_totalvalue }},
'value': {{ ecomm_totalvalue }},
'items': {{ items }}
});
</script>
@@ -0,0 +1,7 @@
<script type="text/javascript">
gtag('event', 'page_view', {
'send_to': '{{ send_to }}',
'name': "category",
'description': "{{ description }}"
});
</script>
@@ -0,0 +1,6 @@
<script type="text/javascript">
gtag('event', 'page_view', {
'send_to': '{{ send_to }}',
'name': "home"
});
</script>
@@ -0,0 +1,53 @@
<script type="text/javascript">
(function($) {
var option_map = {{ option_map }};
var submitGtag = function(ecomm_prodid) {
console.log("[GTAG] Submit product view: " + ecomm_prodid);
gtag('event', 'view_item', {
'send_to': '{{ send_to }}',
'ecomm_prodid': [ecomm_prodid],
'items': [
{
'brand': '{{ brand }}',
'category': '{{ category }}',
'id': ecomm_prodid,
'name': '{{ name }}',
'quantity': 1
}
]
});
};
var submitGtagByColorAndSize = function(color, size) {
$.each(option_map.groups, function(ecomm_prodid, group) {
if (group.color == color && group.size == size) {
submitGtag(ecomm_prodid);
}
});
};
if (option_map.colors === null && option_map.sizes === null) {
submitGtagByColorAndSize("", "");
} else {
$('[name^="option["]').change(function() {
var color, size = "";
$('select[name^="option["], [type="radio"][name^="option["]:checked').each(function(index, option) {
var product_option_value_id = $(option).val();
if (option_map.colors !== null && typeof option_map.colors[product_option_value_id] != 'undefined') {
color = option_map.colors[product_option_value_id];
}
if (option_map.sizes !== null && typeof option_map.sizes[product_option_value_id] != 'undefined') {
size = option_map.sizes[product_option_value_id];
}
});
submitGtagByColorAndSize(color, size);
}).trigger('change');
}
})(jQuery);
</script>
@@ -0,0 +1,17 @@
<script type="text/javascript">
gtag('event', 'purchase', {
'send_to': '{{ send_to }}',
'transaction_id': '{{ transaction_id }}',
'currency': '{{ currency }}',
'tax': '{{ tax }}',
'shipping': '{{ shipping }}',
'value': {{ value }},
'items': {{ items }},
'ecomm_totalvalue': {{ ecomm_totalvalue }},
'ecomm_prodid': {{ ecomm_prodid }}
});
if (typeof gtag_report_conversion == 'function') {
gtag_report_conversion();
}
</script>
@@ -0,0 +1,6 @@
<script type="text/javascript">
gtag('event', 'view_search_results', {
'send_to': '{{ send_to }}',
'search_term': "{{ search_term }}"
});
</script>
@@ -0,0 +1,19 @@
<fieldset>
<legend>{{ text_captcha }}</legend>
<div class="form-group required">
{% if route|slice(0, 9) == 'checkout/' %}
<label class="control-label" for="input-payment-captcha">{{ entry_captcha }}</label>
<input type="text" name="captcha" id="input-payment-captcha" class="form-control" autocomplete="off" />
<img src="index.php?route=extension/captcha/basic/captcha" alt="" />
{% else %}
<label class="col-sm-2 control-label" for="input-captcha">{{ entry_captcha }}</label>
<div class="col-sm-10">
<input type="text" name="captcha" id="input-captcha" class="form-control" />
<img src="index.php?route=extension/captcha/basic/captcha" alt="" />
{% if error_captcha %}
<div class="text-danger">{{ error_captcha }}</div>
{% endif %}
</div>
{% endif %}
</div>
</fieldset>
@@ -0,0 +1,18 @@
<script src="//www.google.com/recaptcha/api.js" type="text/javascript"></script>
<fieldset>
<legend>{{ text_captcha }}</legend>
<div class="form-group required">{% if route|slice(0, 9) == 'checkout/' %}
<label class="control-label" for="input-payment-captcha">{{ entry_captcha }}</label>
<div id="input-payment-captcha" class="g-recaptcha" data-sitekey="{{ site_key }}"></div>
{% if error_captcha %}
<div class="text-danger">{{ error_captcha }}</div>
{% endif %}
{% else %}
<label class="col-sm-2 control-label">{{ entry_captcha }}</label>
<div class="col-sm-10">
<div class="g-recaptcha" data-sitekey="{{ site_key }}"></div>
{% if error_captcha %}
<div class="text-danger">{{ error_captcha }}</div>
{% endif %}</div>
{% endif %}</div>
</fieldset>
@@ -0,0 +1,13 @@
<div class="list-group">
{% if not logged %}
<a href="{{ login }}" class="list-group-item">{{ text_login }}</a> <a href="{{ register }}" class="list-group-item">{{ text_register }}</a> <a href="{{ forgotten }}" class="list-group-item">{{ text_forgotten }}</a>
{% endif %}
<a href="{{ account }}" class="list-group-item">{{ text_account }}</a>
{% if logged %}
<a href="{{ edit }}" class="list-group-item">{{ text_edit }}</a> <a href="{{ password }}" class="list-group-item">{{ text_password }}</a>
{% endif %}
<a href="{{ address }}" class="list-group-item">{{ text_address }}</a> <a href="{{ wishlist }}" class="list-group-item">{{ text_wishlist }}</a> <a href="{{ order }}" class="list-group-item">{{ text_order }}</a> <a href="{{ download }}" class="list-group-item">{{ text_download }}</a><a href="{{ recurring }}" class="list-group-item">{{ text_recurring }}</a> <a href="{{ reward }}" class="list-group-item">{{ text_reward }}</a> <a href="{{ return }}" class="list-group-item">{{ text_return }}</a> <a href="{{ transaction }}" class="list-group-item">{{ text_transaction }}</a> <a href="{{ newsletter }}" class="list-group-item">{{ text_newsletter }}</a>
{% if logged %}
<a href="{{ logout }}" class="list-group-item">{{ text_logout }}</a>
{% endif %}
</div>
@@ -0,0 +1,21 @@
<div class="swiper-viewport">
<div id="banner{{ module }}" class="swiper-container">
<div class="swiper-wrapper">{% for banner in banners %}
<div class="swiper-slide">
{% if banner.link %}<a href="{{ banner.link }}">{% endif %}
<img src="{{ banner.image }}" alt="{{ banner.title }}" class="img-responsive hidden-xs" />
{% if banner.image_mobile %}<img src="{{ banner.image_mobile }}" alt="{{ banner.title }}" class="img-responsive visible-xs" />{% endif %}
{% if banner.link %}</a>{% endif %}
{% if banner.description %}<div class="banner-description">{{ banner.description }}</div>{% endif %}
{% if banner.button_text and banner.link %}<a href="{{ banner.link }}" class="banner-button">{{ banner.button_text }}</a>{% endif %}
</div>
{% endfor %}</div>
</div>
</div>
<script type="text/javascript"><!--
$('#banner{{ module }}').swiper({
effect: 'fade',
autoplay: 2500,
autoplayDisableOnInteraction: false
});
--></script>
@@ -0,0 +1,42 @@
<h3>{{ heading_title }}</h3>
<div class="row">
{% for product in products %}
<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
<p>{{ product.description }}</p>
{% if product.rating %}
<div class="rating">
{% for i in 1..5 %}
{% if product.rating < i %}
<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
{% else %}
<span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if product.price %}
<p class="price">
{% if not product.special %}
{{ product.price }}
{% else %}
<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
{% endif %}
{% if product.tax %}
<span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
</p>
{% endif %}
</div>
<div class="button-group">
<button type="button" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
</div>
</div>
</div>
{% endfor %}
</div>
@@ -0,0 +1,57 @@
{% if (products) %}
<div class="catalogue__product">
<span class="catalogue__product-title">
{{ heading_title }}
</span>
<ul class="catalogue__product-list">
{% for product in products %}
<li class="catalogue__product-list-item">
<a class="catalogue__product-list-link" href="{{ product['href'] }}">
<img {{ lazyload ? 'src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src' : 'src' }}="{{ product['thumb'] }}" alt="{{ product['name'] }}">
</a>
<div class="catalogue__product-list-item-desc">
<div class="products-list__label">
{% if (product['isnewest']) %}
<div class="label">{{ labelsinfo['new']['name'][language_id] }}</div>
{% endif %}
{% if (product['special'] and product['sales']) %}
<div class="label label--red">{{ labelsinfo['sale']['name'][language_id] ~ ' ' ~ product['discount'] }}</div>
{% endif %}
{% if (product['popular']) %}
<span class="label label--popular">{{ product['popular'] }}</span>
{% endif %}
{% if (product['hit']) %}
<span class="label label--hit">{{ product['hit'] }}</span>
{% endif %}
{% if (product['catch']) %}
{% if (product['nocatch']) %}
<span class="label label--nocatch">{{ product['catch'] }}</span>
{% else %}
<span class="label label--catch">{{ product['catch'] }}</span>
{% endif %}
{% endif %}
</div>
<a class="link--brown" href="{{ product['href'] }}"><span>{{ product['name'] }}</span></a>
<div class="catalogue__product-list-item-price">
{% if (product['price']) %}
{% if (product['special']) %}
<span class="product__price-old">
{{ product['price'] }}
</span>
<span class="product__price">
{{ product['special'] }}
</span>
{% else %}
<span class="product__price">{{ product['price'] }}</span>
{% endif %}
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
@@ -0,0 +1,17 @@
<div class="list-group">
{% for category in categories %}
{% if category.blog_category_id == blog_category_id %}
<a href="{{ category.href }}" class="list-group-item active">{{ category.name }}</a>
{% if category.children %}
{% for child in category.children %}
{% if child.blog_category_id == child_id %}
<a href="{{ child.href }}" class="list-group-item active">&nbsp;&nbsp;&nbsp;- {{ child.name }}</a>
{% else %}
<a href="{{ child.href }}" class="list-group-item">&nbsp;&nbsp;&nbsp;- {{ child.name }}</a>
{% endif %}
{% endfor %}
{% endif %}
{% else %} <a href="{{ category.href }}" class="list-group-item">{{ category.name }}</a>
{% endif %}
{% endfor %}
</div>
@@ -0,0 +1,30 @@
<h3>{{ heading_title }}</h3>
<div class="row">
{% for article in articles %}
<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a href="{{ article.href }}"><img src="{{ article.thumb }}" alt="{{ article.name }}" title="{{ article.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ article.href }}">{{ article.name }}</a></h4>
<p>{{ article.description }}</p>
{% if article.rating %}
<div class="rating">
{% for i in 5 %}
{% if article.rating < i %}
<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
{% else %}
<span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
<div class="button-group">
<button type="button" onclick="location.href = ('{{ article.href }}');"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_more }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ article.date_added }}" "><i class="fa fa-clock-o"></i></button>
<button type="button" data-toggle="tooltip" title="{{ text_views }} {{ article.viewed }}" "><i class="fa fa-eye"></i></button>
</div>
</div>
</div>
{% endfor %}
</div>
@@ -0,0 +1,30 @@
<h3>{{ heading_title }}</h3>
<div class="row">
{% for article in articles %}
<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a href="{{ article.href }}"><img src="{{ article.thumb }}" alt="{{ article.name }}" title="{{ article.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ article.href }}">{{ article.name }}</a></h4>
<p>{{ article.description }}</p>
{% if article.rating %}
<div class="rating">
{% for i in 5 %}
{% if article.rating < i %}
<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
{% else %}
<span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
<div class="button-group">
<button type="button" onclick="location.href = ('{{ article.href }}');"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_more }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ article.date_added }}" "><i class="fa fa-clock-o"></i></button>
<button type="button" data-toggle="tooltip" title="{{ text_views }} {{ article.viewed }}" "><i class="fa fa-eye"></i></button>
</div>
</div>
</div>
{% endfor %}
</div>
@@ -0,0 +1,24 @@
<div class="carousel swiper-viewport">
<div id="carousel{{ module }}" class="swiper-container">
<div class="swiper-wrapper">{% for banner in banners %}
<div class="swiper-slide text-center">{% if banner.link %}<a href="{{ banner.link }}"><img src="{{ banner.image }}" alt="{{ banner.title }}" class="img-responsive" /></a>{% else %}<img src="{{ banner.image }}" alt="{{ banner.title }}" class="img-responsive" />{% endif %}</div>
{% endfor %}</div>
</div>
<div class="swiper-pagination carousel{{ module }}"></div>
<div class="swiper-pager">
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</div>
<script type="text/javascript"><!--
$('#carousel{{ module }}').swiper({
mode: 'horizontal',
slidesPerView: 5,
pagination: '.carousel{{ module }}',
paginationClickable: true,
nextButton: '.carousel .swiper-button-next',
prevButton: '.carousel .swiper-button-prev',
autoplay: 2500,
loop: true
});
--></script>
@@ -0,0 +1,17 @@
<div class="list-group">
{% for category in categories %}
{% if category.category_id == category_id %}
<a href="{{ category.href }}" class="list-group-item active">{{ category.name }}</a>
{% if category.children %}
{% for child in category.children %}
{% if child.category_id == child_id %}
<a href="{{ child.href }}" class="list-group-item active">&nbsp;&nbsp;&nbsp;- {{ child.name }}</a>
{% else %}
<a href="{{ child.href }}" class="list-group-item">&nbsp;&nbsp;&nbsp;- {{ child.name }}</a>
{% endif %}
{% endfor %}
{% endif %}
{% else %} <a href="{{ category.href }}" class="list-group-item">{{ category.name }}</a>
{% endif %}
{% endfor %}
</div>
@@ -0,0 +1,12 @@
<h3>{{ heading_title }}</h3>
<div class="row product-layout">{% for product in products %}
<div class="col-lg-3 col-md-3s col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a target="_blank" href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
<div class="caption">
<p><a href="{{ product.href }}">{{ product.name }}</a></p>
<p class="price">{{ product.price }}</p>
</div>
</div>
</div>
{% endfor %} <img src="{{ tracking_pixel }}" height="0" width="0" /> </div>
@@ -0,0 +1,17 @@
{% if products %}
<section class="featured py-5">
<div class="container-fluid">
<div class="section-heading py-3 text-center">
<h3 class="heading">{{ module_name }}</h3>
</div>
<div class="row g-3">
{% for product in products %}
<div class="col-6 col-lg-4">
{% include 'dominik/template/common/product.twig' %}
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
@@ -0,0 +1,32 @@
{% if articles %}
<h3>{{ heading_title }}</h3>
<div class="row">
{% for article in articles %}
<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a href="{{ article.href }}"><img src="{{ article.thumb }}" alt="{{ article.name }}" title="{{ article.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ article.href }}">{{ article.name }}</a></h4>
<p>{{ article.description }}</p>
{% if article.rating %}
<div class="rating">
{% for i in 5 %}
{% if article.rating < i %}
<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
{% else %}
<span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
<div class="button-group">
<button type="button" onclick="location.href = ('{{ article.href }}');"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_more }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ article.date_added }}" "><i class="fa fa-clock-o"></i></button>
<button type="button" data-toggle="tooltip" title="{{ text_views }} {{ article.viewed }}" "><i class="fa fa-eye"></i></button>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
@@ -0,0 +1,55 @@
{% if (products) %}
<div class="catalogue__product">
<span class="catalogue__product-title">
{{ heading_title }}
</span>
<ul class="catalogue__product-list">
{% for product in products %}
<li class="catalogue__product-list-item">
<a class="catalogue__product-list-link" href="{{ product['href'] }}">
<img {{ lazyload ? 'src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src' : 'src' }}="{{ product['thumb'] }}" alt="{{ product['name'] }}">
</a>
<div class="catalogue__product-list-item-desc">
<div class="products-list__label">
{% if (product['isnewest']) %}
<div class="label">{{ labelsinfo['new']['name'][language_id] }}</div>
{% endif %}
{% if (product['special'] and product['sales']) %}
<div class="label label--red">{{ labelsinfo['sale']['name'][language_id] ~ ' ' ~ product['discount'] }}</div>
{% endif %}
{% if (product['catch']) %}
{% if (product['nocatch']) %}
<span class="label label--nocatch">{{ product['catch'] }}</span>
{% else %}
<span class="label label--catch">{{ product['catch'] }}</span>
{% endif %}
{% endif %}
{% if (product['popular']) %}
<span class="label label--popular">{{ product['popular'] }}</span>
{% endif %}
{% if (product['hit']) %}
<span class="label label--hit">{{ product['hit'] }}</span>
{% endif %}
</div>
<a class="link--brown" href="{{ product['href'] }}"><span>{{ product['name'] }}</span></a>
<div class="catalogue__product-list-item-price">
{% if (product['price']) %}
{% if (product['special']) %}
<span class="product__price-old">
{{ product['price'] }}
</span>
<span class="product__price">
{{ product['special'] }}
</span>
{% else %}
<span class="product__price">{{ product['price'] }}</span>
{% endif %}
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
@@ -0,0 +1,29 @@
{% if products %}
<h3>{{ heading_title }}</h3>
<div class="row"> {% for product in products %}
<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
<p>{{ product.description }}</p>
{% if product.rating %}
<div class="rating">{% for i in 1..5 %}
{% if product.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span> {% endif %}
{% endfor %}</div>
{% endif %}
{% if product.price %}
<p class="price"> {% if not product.special %}
{{ product.price }}
{% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
{% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
{% endif %} </div>
<div class="button-group">
<button type="button" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
</div>
</div>
</div>
{% endfor %} </div>
{% endif %}
@@ -0,0 +1,32 @@
<div class="panel panel-default">
<div class="panel-heading">{{ heading_title }}</div>
<div class="list-group"> {% for filter_group in filter_groups %} <a class="list-group-item">{{ filter_group.name }}</a>
<div class="list-group-item">
<div id="filter-group{{ filter_group.filter_group_id }}">{% for filter in filter_group.filter %}
<div class="checkbox">
<label>{% if filter.filter_id in filter_category %}
<input type="checkbox" name="filter[]" value="{{ filter.filter_id }}" checked="checked" />
{{ filter.name }}
{% else %}
<input type="checkbox" name="filter[]" value="{{ filter.filter_id }}" />
{{ filter.name }}
{% endif %}</label>
</div>
{% endfor %}</div>
</div>
{% endfor %}</div>
<div class="panel-footer text-right">
<button type="button" id="button-filter" class="btn btn-primary">{{ button_filter }}</button>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
filter = [];
$('input[name^=\'filter\']:checked').each(function(element) {
filter.push(this.value);
});
location = '{{ action }}&filter=' + filter.join(',');
});
//--></script>
@@ -0,0 +1,4 @@
<div>{% if heading_title %}
<h2>{{ heading_title }}</h2>
{% endif %}
{{ html }}</div>
@@ -0,0 +1,9 @@
<div class="sidebar">
<ul class="nav nav-tabs nav-stacked">
{% for information in informations %}
<li><a href="{{ information.href }}">{{ information.title }}</a></li>
{% endfor %}
<li><a href="{{ contact }}">{{ text_contact }}</a></li>
<li><a href="{{ sitemap }}">{{ text_sitemap }}</a></li>
</ul>
</div>
@@ -0,0 +1,27 @@
<h3>{{ heading_title }}</h3>
<div class="row"> {% for product in products %}
<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="product-thumb transition">
<div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
<div class="caption">
<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
<p>{{ product.description }}</p>
{% if product.rating %}
<div class="rating">{% for i in 1..5 %}
{% if product.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span> {% endif %}
{% endfor %}</div>
{% endif %}
{% if product.price %}
<p class="price"> {% if not product.special %}
{{ product.price }}
{% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
{% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
{% endif %} </div>
<div class="button-group">
<button type="button" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
</div>
</div>
</div>
{% endfor %} </div>
@@ -0,0 +1,58 @@
{% if (products) %}
<div class="catalogue__product">
<span class="catalogue__product-title">
{{ heading_title }}
</span>
<ul class="catalogue__product-list">
{% for product in products %}
<li class="catalogue__product-list-item">
<a class="catalogue__product-list-link" href="{{ product['href'] }}">
<img {{ lazyload ? 'src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src' : 'src' }}="{{ product['thumb'] }}" alt="{{ product['name'] }}">
</a>
<div class="catalogue__product-list-item-desc">
<div class="products-list__label">
{% if (product['isnewest']) %}
<div class="label">{{ labelsinfo['new']['name'][language_id] }}</div>
{% endif %}
{% if (product['special'] and product['sales']) %}
<div class="label label--red">{{ labelsinfo['sale']['name'][language_id] ~ ' ' ~ product['discount'] }}</div>
{% endif %}
{% if (product['popular']) %}
<span class="label label--popular">{{ product['popular'] }}</span>
{% endif %}
{% if (product['hit']) %}
<span class="label label--hit">{{ product['hit'] }}</span>
{% endif %}
{% if (product['catch']) %}
{% if (product['nocatch']) %}
<span class="label label--nocatch">{{ product['catch'] }}</span>
{% else %}
<span class="label label--catch">{{ product['catch'] }}</span>
{% endif %}
{% endif %}
</div>
<a class="link--brown" href="{{ product['href'] }}"><span>{{ product['name'] }}</span></a>
<div class="catalogue__product-list-item-price">
{% if (product['price']) %}
{% if (product['special']) %}
<span class="product__price-old">
{{ product['price'] }}
</span>
<span class="product__price">
{{ product['special'] }}
</span>
{% else %}
<span class="product__price">{{ product['price'] }}</span>
{% endif %}
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}

Some files were not shown because too many files have changed in this diff Show More