Merge remote-tracking branch 'origin/develop' into qlo-catalog-update

This commit is contained in:
Shreesh Arora
2022-12-07 18:45:15 +05:30
135 changed files with 3708 additions and 3463 deletions

255
.gitignore vendored Normal file
View File

@@ -0,0 +1,255 @@
# Editors, tools and OS's
.buildpath
/.htaccess
.project
.settings
.idea
.svn
.DS_Store
.sass-cache
config.codekit
*.sublime-project
*.sublime-workspace
nbproject
bower_components
composer.lock
# Cache, temp and personal files
/cache/**
!/cache/cacert.pem
!/cache/index.php
!/cache/cachefs/
!/cache/cachefs/index.php
!/cache/purifier/
!/cache/purifier/index.php
!/cache/push/
!/cache/push/activity
!/cache/push/index.php
!/cache/push/trends
!/cache/sandbox/
!/cache/sandbox/index.php
!/cache/smarty/
!/cache/smarty/cache/
!/cache/smarty/cache/index.php
!/cache/smarty/compile/
!/cache/smarty/compile/index.php
!/cache/smarty/index.php
!/cache/tcpdf/
!/cache/tcpdf/index.php
/download/*
!/download/.htaccess
!/download/index.php
img/**
!/img/404.gif
!/img/admin/
!/img/admin/*.gif
!/img/admin/*.png
!/img/admin/*.jpg
!/img/admin/index.php
!/img/bg_500.png
!/img/bg_loader.png
!/img/c/
!/img/c/index.php
!/img/cms/
!/img/cms/.htaccess
!/img/cms/cms-img.jpg
!/img/cms/index.php
!/img/co/
!/img/co/index.php
!/img/favicon.ico
!/img/genders/
!/img/genders/Unknown.jpg
!/img/genders/index.php
!/img/hotel_header_image.jpg
!/img/index.php
!/img/jquery-ui/
!/img/jquery-ui/*.png
!/img/jquery-ui/index.php
!/img/l/
!/img/l/index.php
!/img/l/none.jpg
!/img/loader.gif
!/img/loadingAnimation.gif
!/img/logo.jpg
!/img/logo_invoice.jpg
!/img/logo_mail.jpg
!/img/logo_stores.gif
!/img/logo_stores.png
!/img/m/
!/img/m/index.php
!/img/macFFBgHack.png
!/img/os/
!/img/os/index.php
!/img/p/
!/img/p/index.php
!/img/prestashop-avatar.png
!/img/qloapps@2x.png
!/img/qloapps-login@2x.png
!/img/qloapps-login-wink@2x.png
!/img/questionmark.png
!/img/rf/
!/img/rf/index.php
!/img/s/
!/img/s/index.php
!/img/scenes/
!/img/scenes/index.php
!/img/scenes/thumbs/
!/img/scenes/thumbs/index.php
!/img/st/
!/img/st/index.php
!/img/su/
!/img/su/index.php
!/img/t/
!/img/t/*.gif
!/img/t/index.php
!/img/tmp/
!/img/tmp/index.php
/log/*
!/log/.htaccess
!/log/index.php
/upload/*
!/upload/.htaccess
!/upload/index.php
/admin/backups/*
!/admin/backups/.htaccess
!/admin/backups/index.php
/admin/import/*
!/admin/import/.htaccess
!/admin/import/index.php
/themes/*/cache/*
!/themes/*/cache/index.php
/admin/themes/*/cache/*
!/admin/themes/*/cache/index.php
# Config
/config/settings.inc.php
/config/settings.old.php
/config/xml/**
!/config/xml/.htaccess
!/config/xml/index.php
!/config/xml/qlo_mod_list.xml
!config/xml/themes/
!config/xml/themes/default.xml
!config/xml/themes/index.php
# Themes, modules and overrides
# modules/*
/modules/*/config.xml
/modules/*/translations/*
/override/*
!/override/.htaccess
!/override/index.php
!/override/readme_override.txt
!/override/classes/
!/override/classes/index.php
!/override/classes/cache/
!/override/classes/cache/index.php
!/override/classes/controller/
!/override/classes/controller/index.php
!/override/classes/db/
!/override/classes/db/index.php
!/override/classes/exception/
!/override/classes/exception/index.php
!/override/classes/helper/
!/override/classes/helper/index.php
!/override/classes/log/
!/override/classes/log/index.php
!/override/classes/module/
!/override/classes/module/index.php
!/override/classes/order/
!/override/classes/order/index.php
!/override/classes/pdf/
!/override/classes/pdf/index.php
!/override/classes/range/
!/override/classes/range/index.php
!/override/classes/shop/
!/override/classes/shop/index.php
!/override/classes/stock/
!/override/classes/stock/index.php
!/override/classes/tax/
!/override/classes/tax/index.php
!/override/classes/tree/
!/override/classes/tree/index.php
!/override/classes/webservice/
!/override/classes/webservice/index.php
!/override/controllers/
!/override/controllers/index.php
!/override/controllers/admin/
!/override/controllers/admin/index.php
!/override/controllers/admin/templates/
!/override/controllers/admin/templates/index.php
!/override/controllers/front
!/override/modules/
!/override/modules/index.php
admin/themes/default/sass/ie.sass
admin/themes/default/sass/print.sass
admin/themes/default/sass/screen.sass
admin/themes/default/css/ie.css
admin/themes/default/css/print.css
admin/themes/default/css/screen.css
# Translations and emails templates
/translations/**
!/translations/index.php
!/translations/en.gzip
!/translations/export/
!/translations/export/index.php
/mails/*
!/mails/.htaccess
!/mails/index.php
!/mails/en/
/themes/hotel-reservation-theme/cache/*
!/themes/hotel-reservation-theme/cache/
!/themes/hotel-reservation-theme/cache/index.php
/themes/hotel-reservation-theme/lang/*
!/themes/hotel-reservation-theme/lang/index.php
!/themes/hotel-reservation-theme/lang/en.php
/themes/hotel-reservation-theme/modules/*/translations/*.php
!/themes/hotel-reservation-theme/modules/*/translations/index.php
/themes/hotel-reservation-theme/mails/*
!/themes/hotel-reservation-theme/mails/index.php
!/themes/hotel-reservation-theme/mails/en/
/themes/hotel-reservation-theme/modules/*/mails/*
!/themes/hotel-reservation-theme/modules/*/mails/index.php
!/themes/hotel-reservation-theme/modules/*/mails/en
# MISC
**sitemap.xml
robots.txt

View File

@@ -86,9 +86,8 @@ function error_modal(heading, msg) {
}
//move to hash after clicking on anchored links
function scroll_if_anchor(href) {
function scroll_if_anchor(href, fromTop = 120) {
href = typeof(href) === "string" ? href : $(this).attr("href");
var fromTop = 120;
if(href.indexOf("#") === 0) {
var $target = $(href);
if($target.length) {

View File

@@ -112,6 +112,3 @@
//Print support
@import "partials/print"
//Add css
@import "partials/css"

View File

@@ -1,18 +1,5 @@
//Avatar
.employee_avatar_small
@extend .avatar-sm
vertical-align: middle
img
padding: 0
border: none
.employee_avatar
@extend .avatar-lg
display: block!important
margin: 10px auto!important
text-align: center
.avatar-xs
@include avatar(16px, 16px)
.avatar-sm

View File

@@ -10,7 +10,7 @@
z-index: 1
position: absolute
margin: 0 auto
width: 69.5px
text-align: center
left: 0
right: 0
@@ -70,6 +70,8 @@
display: none
z-index: 1
@include rotateY(180deg)
.login-actions
position: relative
#shop_name
text-align: center

View File

@@ -1,155 +0,0 @@
.datepicker2
background: #fff
position: absolute
z-index: 599
right: -10rem
.daterangepicker
border-radius: 5px 5px 0 0 !important
.bootstrap
#datepicker
.daterangepicker
thead
tr
th
padding: 0.7em 0.3em
text-align: center
font-weight: bold
border: 0
background-color: #fff !important
color: #555555 !important
font-size: 14px
text-transform: capitalize
&:first-child
th
font-size: unset
font-weight: bold
background-color: #00AFF0 !important
border: unset !important
color: #fff !important
padding: unset !important
text-transform: capitalize
.icon-angle-left
font-weight: bold
padding: 10px
.icon-angle-right
font-weight: bold
padding: 10px
th
&.prev
border-top-left-radius: 8px !important
border-bottom-left-radius: 8px !important
left: 2px
top: 3px
&.next
border-top-right-radius: 8px !important
border-bottom-right-radius: 8px !important
right: 2px
top: 3px
&.month-switch
top: 3px
td
padding: 5px 10px
color: #555
.ui-datepicker
width: auto !important
margin: 5px auto 0
width: auto !important
z-index: 1032 !important
.ui-datepicker-header
background-color: #00AFF0 !important
.ui-datepicker-title
color: #fff
font-style: normal
font-weight: bold
font-size: unset
thead
background-color: #f7f7f7
th
font-style: normal
font-size: 15px
line-height: 23px
color: #555555
tbody
td
&:last-child
border-right: 0px
tr
border-bottom: 1px solid #bbb
border: none
&:last-child
border-bottom: 0px
a
text-decoration: none
.form-date-actions .btn:hover, .form-date-actions .btn:focus, .form-date-actions .btn:active
outline: unset !important
text-decoration: none
.form-date-actions
bottom: -24px
position: absolute
width: 100%
z-index: 599
background-color: #fff
border: solid 1px #ccc
border-radius: 0 0 5px 5px
.ui-datepicker-prev
float: left
cursor: pointer
left: 15px !important
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #fff
content: "\f104"
font-family: FontAwesome
.ui-datepicker-next
float: right
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #fff
content: "\f105"
font-family: FontAwesome
&:hover
top: 5px !important
right: 2px !important
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus
border: unset
background: none
font-weight: none
color: none
.ui-datepicker td span,
.ui-datepicker td a
display: inline-block
text-align: center
line-height: 25px
color: #ffffff
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next
top: 5px !important
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default
border: none !important
.ui-widget-content
.ui-icon
background-image: none !important
.ui-datepicker td span, .ui-datepicker td a
text-align: center !important
padding: 4px 9px !important
.ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus
background: unset !important
border: unset !important
.ui-widget-content .ui-slider-handle, .ui-datepicker-current .ui-slider-handle
border: 1px solid #d3d3d3 !important
color: #555555 !important
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) !important
.ui-datepicker-prev-hover
top: unset !important

View File

@@ -14,42 +14,340 @@
// ui-datepicker-buttonpane: The buttonpane that is used when the showButtonPanel option is set.
// ui-datepicker-current: The button used to select today's date.
$color-bright: white
$color-calendar: #00A4E7
$color-calendar-compare: #FF8000
$color-calendar-day: $color-bright
$color-calendar-outrange: #ccc
$color-calendar-day-selected: $color-calendar
$color-calendar-day-selected-compare: $color-calendar-compare
$color-calendar-range: lighten($color-calendar,10%)
$color-calendar-range-compare: lighten($color-calendar-compare,10%)
.datepicker2
background: #fff
position: absolute
z-index: 599
right: -10rem
.daterangepicker
border-radius: 5px 5px 0 0 !important
.bootstrap
#datepicker
.daterangepicker
position: relative
width: 100%
font-family: Verdana, Arial, sans-serif
font-size: 13px
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.26)
margin-bottom: 8px
padding: 12px
border-bottom-left-radius: 0
border-bottom-right-radius: 0
table
width: 100%
margin: 0
border-spacing: 1px
thead
tr th
text-transform: uppercase
text-align: center
font-weight: bold
border: 0
background-color: #fff !important
color: #777 !important
font-size: 14px
tr:first-child th
padding-bottom: 10px
text-transform: capitalize
.icon-angle-left
font-weight: bold
padding-left: 6px
&:after
content: ''
position: absolute
top: -5px
left: -2px
width: 24px
height: 24px
background-color: #f0f0f0
z-index: -1
border-radius: 50%
.icon-angle-right
font-weight: bold
padding-right: 6px
&:after
content: ''
position: absolute
top: -5px
right: -2px
width: 24px
height: 24px
background-color: #f0f0f0
z-index: -1
border-radius: 50%
td, th
text-align: center
padding: 0
position: relative
tr
border-bottom: solid 1px white
td
color: #555
font-size: 14px
line-height: 25px
padding: 5px 10px
&.day:after
content: ""
position: absolute
display: block
top: 0
width: 100%
z-index: 0
background-color: transparent
@include left(0)
&.day:hover
cursor: pointer
color: #212121
&.day.disabled
color: $color-calendar-outrange
&.old, &.new
color: $color-calendar-outrange
&.start-selected:not(.old):not(.new):not(.end-selected)
color: $color-bright
background-color: #1292ff
//@extend .chevron-left
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-left-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.end-selected-compare
@include border-radius(0)
&.end-selected:not(.old):not(.new):not(.start-selected)
color: $color-bright
background-color: #1292ff
//@extend .chevron-right
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-right-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.start-selected-compare
@include border-radius(0)
&.start-selected-compare:not(.old):not(.new):not(.end-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-left-radius(15px)
&.range
background-color: #f2f2f2
@include border-left-radius(0)
&.end-selected-compare:not(.old):not(.new):not(.start-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-right-radius(15px)
&.range
background-color: #f2f2f2
@include border-right-radius(0)
&.end-selected.start-selected
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-radius(0)
&.end-selected-compare.start-selected-compare
color: $color-bright
@include border-radius(15px)
font-weight: 700
background-color: $color-calendar-day-selected-compare
&.range
background-color: mix($color-calendar-day-selected-compare,$color-calendar-range,70%)
@include border-radius(0)
&.range
color: #333
background-color: #f2f2f2
&.range-compare
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.range-compare
color: lighten($color-calendar-range-compare,35%)
background-color: $color-calendar-range-compare
&.range
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.today
background-color: $color-bright
span
padding: 0
display: block
width: 33.333%
height: 3em
line-height: 3em
font-weight: 400
float: left
text-transform: uppercase
cursor: pointer
&:hover
color: white
background-color: $color-calendar-day-selected
&.active
background-color: $color-calendar-day-selected
color: #fff
&.old
color: $color-calendar-outrange
th
&.next
@include text-align(right)
&.prev
@include text-align(left)
&.next, &.prev, &.month-switch
font-size: 16px !important
font-weight: normal
color: #333 !important
&:hover
opacity: 0.8
thead tr:first-child th
cursor: pointer
.ui-datepicker
margin: 5px auto 0
width: auto !important
z-index: 111111 !important
top: 0
left: 0
padding: 4px
padding: 12px !important
margin-top: 1px
@include border-radius(4px)
&:before
content: ''
display: inline-block!important
border-left: 7px solid transparent
border-right: 7px solid transparent
border-bottom: 7px solid #ccc
border-bottom-color: rgba(black,.2)
position: absolute
top: -7px
left: 6px
&:after
content: ''
display: inline-block!important
border-left: 6px solid transparent
border-right: 6px solid transparent
border-bottom: 6px solid white
position: absolute
top: -6px
left: 7px
.ui-datepicker-header
background: transparent !important
background: none
border: none
color: gray
font-weight: normal
.ui-state-default
background: transparent !important
.ui-datepicker-title
color: #333
font-size: 16px
font-style: normal
th
font-size: 12px
font-weight: 600
color: #777
text-transform: uppercase
tbody
td
&:last-child
border-right: 0px
tr
border-bottom: 1px solid #bbb
border: none
&:last-child
border-bottom: 0px
a
text-decoration: none
.ui-state-highlight
border: solid 1px darken(#FEFBE2 ,50%) !important
background: #FEFBE2 !important
.ui-datepicker-today
background: #e7f4ff !important
.ui-state-highlight
color: #1292ff !important
.ui-datepicker-current-day, .ui-datepicker-today.ui-datepicker-current-day
background-color: #1292ff !important
.ui-datepicker-current-day, .ui-datepicker-today.ui-datepicker-current-day .ui-state-highlight
color: #fff !important
.ui-state-active
color: white !important
background: $primary-color !important
border: solid 1px darken($primary-color,10%) !important
.ui-datepicker-prev-hover
left: 2px !important
.form-date-actions .btn:hover, .form-date-actions .btn:focus, .form-date-actions .btn:active
outline: unset !important
text-decoration: none
.form-date-actions
bottom: -27px
position: absolute
width: 100%
z-index: 599
background-color: #fff
box-shadow: 0 7px 10px 0 rgba(0,0,0,0.26)
padding: 2px
border-bottom-left-radius: 4px
border-bottom-right-radius: 4px
.ui-datepicker-prev
float: left
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #333
content: "\f104"
font-family: FontAwesome
position: absolute
left: 8px
.ui-datepicker-next
float: right
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #333
content: "\f105"
font-family: FontAwesome
position: absolute
right: 8px
&:hover
top: 5px !important
right: 2px !important
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus
border: unset
background: none
font-weight: none
color: none
.ui-widget-content.ui-datepicker
border: none
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.26)
.ui-datepicker td span,
.ui-datepicker td a
display: inline-block
text-align: center
line-height: 25px
color: #ffffff
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next
top: 5px !important
background-color: #f0f0f0
border: none
border-radius: 50%
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default
border: none !important
background: transparent !important
font-size: 14px
color: #333
.ui-widget-content
.ui-icon
background-image: none !important
.ui-datepicker td span, .ui-datepicker td a
text-align: center !important
padding: 4px 9px !important
.ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus
background: unset !important
border: unset !important
.ui-widget-content .ui-slider-handle, .ui-datepicker-current .ui-slider-handle
border: 1px solid #d3d3d3 !important
color: #555555 !important
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) !important
.ui-datepicker-prev-hover
top: unset !important

View File

@@ -68,162 +68,19 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
width: 35%
button
@include margin(5px, 0, 0, 0)
.daterangepicker
position: relative
width: 100%
font-size: 13px
border: solid 1px #ccc
@include margin(0, 0, 8px, 0)
table
width: 100%
margin: 0
border-spacing: 1px
thead
tr th
background-color: darken($color-calendar,5%)
color: white
font-size: 0.7em
height: 1.5em
text-transform: uppercase
tr:first-child th
background-color: $color-bright
border-bottom: 1px solid darken($color-calendar,5%)
font-weight: 200
font-size: 1.4em
color: $color-calendar-day-selected
td, th
text-align: center
padding: 0
position: relative
tr
border-bottom: solid 1px white
td
color: $color-calendar-day-selected
height: 2.4em
padding: 0 8px
@include transition-property(all)
@include transition-duration(0.2s)
@include transition-timing-function(ease-out)
&.day:after
content: ""
position: absolute
display: block
top: 0
width: 100%
z-index: 0
background-color: transparent
@include left(0)
&.day:hover
cursor: pointer
&.day.disabled
color: $color-calendar-outrange
&.old, &.new
color: $color-calendar-outrange
&.start-selected:not(.old):not(.new):not(.end-selected)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected
@include border-left-radius(15px)
//@extend .chevron-left
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-left-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.end-selected-compare
@include border-radius(0)
&.end-selected:not(.old):not(.new):not(.start-selected)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected
//@extend .chevron-right
@include border-right-radius(15px)
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-right-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.start-selected-compare
@include border-radius(0)
&.start-selected-compare:not(.old):not(.new):not(.end-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-left-radius(15px)
&.range
background-color: mix($color-calendar-day-selected-compare,$color-calendar-range,70%)
@include border-left-radius(0)
&.end-selected-compare:not(.old):not(.new):not(.start-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-right-radius(15px)
&.range
background-color: mix($color-calendar-day-selected-compare,$color-calendar-range,70%)
@include border-right-radius(0)
&.end-selected.start-selected
color: $color-bright
@include border-radius(15px)
font-weight: 700
background-color: $color-calendar-day-selected
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-radius(0)
&.end-selected-compare.start-selected-compare
color: $color-bright
@include border-radius(15px)
font-weight: 700
background-color: $color-calendar-day-selected-compare
&.range
background-color: mix($color-calendar-day-selected-compare,$color-calendar-range,70%)
@include border-radius(0)
&.range
color: lighten($color-calendar-range,35%)
background-color: $color-calendar-range
&.range-compare
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.range-compare
color: lighten($color-calendar-range-compare,35%)
background-color: $color-calendar-range-compare
&.range
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.today
background-color: $color-bright
span
padding: 0
display: block
width: 33.333%
height: 3em
line-height: 3em
font-weight: 400
float: left
text-transform: uppercase
cursor: pointer
&:hover
color: white
background-color: $color-calendar-day-selected
&.active
background-color: $color-calendar-day-selected
color: #fff
&.old
color: $color-calendar-outrange
th
&.next
@include text-align(right)
@include padding(0, 10px, 0, 0)
&.prev
@include text-align(left)
@include padding(0, 0, 0, 10px)
&.next, &.prev, &.month-switch
font-size: 1.3em
line-height: 2em
height: 2em
&:hover
background-color: darken($color-calendar,5%)
color: white
thead tr:first-child th
cursor: pointer
.form-date-actions .btn:hover, .form-date-actions .btn:focus, .form-date-actions .btn:active
outline: unset !important
text-decoration: none
.form-date-actions
bottom: -27px
position: absolute
width: 100%
z-index: 599
background-color: #fff
box-shadow: 0 7px 10px 0 rgba(0,0,0,0.26)
padding: 2px
border-bottom-left-radius: 4px
border-bottom-right-radius: 4px
//chevrons are disabled time to figure out the firefox incompatibility..
.chevron-left, .chevron-right
@@ -253,7 +110,7 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
-ms-animation: one 0.2s ease-in-out
-o-animation: one 0.2s ease-in-out
animation: one 0.2s ease-in-out
@-webkit-keyframes one
0%
background-color: $color-calendar

View File

@@ -117,19 +117,6 @@
padding: 9px 0
color: $brand-warning
#employee_infos
.employee_name
position: relative
@include ltr
padding-right: 40px !important
@include rtl
padding-left: 40px !important
.employee_avatar_small
.img-thumbnail
@include border-radius(0)
@include avatar(36px, 0px)
position: absolute
top: 0px
@include right(0)
img
border: none
padding: 0

View File

@@ -1,5 +1,4 @@
<?php
/*
{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
@@ -22,14 +21,14 @@
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
*}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
{if $type == 'orders' && isset($ids_order)}
{foreach from=$ids_order item=id_order name=orders}
<a href="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$id_order}" style="margin: 1px 0;" target="_blank">#{$id_order}</a>{if !$smarty.foreach.orders.last},{/if}
{/foreach}
{elseif $type == 'abandoned'}
<span class="badge badge-danger">{l s='Abandoned cart'}</span>
{elseif $type == 'non_orderd'}
<span class="badge badge-danger">{l s='Non-orderd cart'}</span>
{/if}

View File

@@ -59,16 +59,18 @@
</div>
</div>
{else}
<h2>{l s='Guest not registered'}</h2>
<h2>{l s='Guest not registered.'}</h2>
{/if}
</div>
</div>
<div class="col-lg-6">
<div class="panel">
<h3><i class="icon-shopping-cart"></i> {l s='Order information'}</h3>
{if $order->id}
<h2><a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&amp;id_order={$order->id|intval}&amp;vieworder"> {l s='Order #%d' sprintf=$order->id|string_format:"%06d"}</a></h2>
{l s='Made on:'} {dateFormat date=$order->date_add}
<h3><i class="icon-shopping-cart"></i> {l s='Order(s) Information'}</h3>
{if is_array($cart_orders) && count($cart_orders)}
{foreach from=$cart_orders item=$cart_order}
<h2><a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&amp;id_order={$cart_order.id_order|intval}&amp;vieworder"> {l s='Order #%d' sprintf=$cart_order.id_order|string_format:"%06d"}</a></h2>
{/foreach}
{l s='Created on:'} {dateFormat date=$cart_order.date_add}
{else}
<h2>{l s='No order was created from this cart.'}</h2>
{if $customer->id}
@@ -80,113 +82,60 @@
</div>
<div class="panel">
<h3><i class="icon-archive"></i> {l s='Cart summary'}</h3>
<div class="row">
<table class="table" id="orderProducts">
<thead>
<tr>
<th class="fixed-width-xs">&nbsp;</th>
<th><span class="title_box">{l s='Product'}</span></th>
<th class="text-right fixed-width-md"><span class="title_box">{l s='Unit price'}</span></th>
<th class="text-center fixed-width-md"><span class="title_box">{l s='Quantity'}</span></th>
<th class="text-center fixed-width-sm"><span class="title_box">{l s='Stock'}</span></th>
<th class="text-right fixed-width-sm"><span class="title_box">{l s='Total'}</span></th>
</tr>
</thead>
<tbody>
{foreach from=$products item='product'}
{if isset($customized_datas[$product.id_product][$product.id_product_attribute][$product.id_address_delivery])}
<tr>
<td>{$product.image}</td>
<td><a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&amp;id_product={$product.id_product}&amp;updateproduct">
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
</a>
</td>
<td class="text-right">{displayWtPriceWithCurrency price=$product.price_wt currency=$currency}</td>
<td class="text-center">{$product.customizationQuantityTotal}</td>
<td class="text-center">{$product.qty_in_stock}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$product.total_customization_wt currency=$currency}</td>
</tr>
{foreach from=$customized_datas[$product.id_product][$product.id_product_attribute][$product.id_address_delivery] item='customization'}
<tr>
<td colspan="2">
{foreach from=$customization.datas key='type' item='datas'}
{if $type == constant('Product::CUSTOMIZE_FILE')}
<ul style="margin: 0; padding: 0; list-style-type: none;">
{foreach from=$datas key='index' item='data'}
<li style="display: inline; margin: 2px;">
<a href="displayImage.php?img={$data.value}&name={$order->id|intval}-file{$index}" class="_blank">
<img src="{$pic_dir}{$data.value}_small" alt="" /></a>
</li>
{/foreach}
</ul>
{elseif $type == constant('Product::CUSTOMIZE_TEXTFIELD')}
<div class="form-horizontal">
{foreach from=$datas key='index' item='data'}
<div class="form-group">
<span class="control-label col-lg-3"><strong>{if $data.name}{$data.name}{else}{l s='Text #'}{$index}{/if}</strong></span>
<div class="col-lg-9">
<p class="form-control-static">{$data.value}</p>
</div>
</div>
{/foreach}
</div>
{/if}
{/foreach}
</td>
<td></td>
<td class="text-center">{$customization.quantity}</td>
<td></td>
<td></td>
</tr>
{/foreach}
{/if}
{if !isset($product.customizationQuantityTotal) || $product.cart_quantity > $product.customizationQuantityTotal}
<tr>
<td>{$product.image}</td>
<td>
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&amp;id_product={$product.id_product}&amp;updateproduct">
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
</a>
</td>
<td class="text-right">{displayWtPriceWithCurrency price=$product.product_price currency=$currency}</td>
<td class="text-center">{if isset($product.customizationQuantityTotal)}{math equation='x - y' x=$product.cart_quantity y=$product.customizationQuantityTotal|intval}{else}{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity|intval}{/if}</td>
<td class="text-center">{$product.qty_in_stock}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$product.product_total currency=$currency}</td>
</tr>
{/if}
{/foreach}
<div class="row">
<table class="table" id="orderProducts">
<thead>
<tr>
<td colspan="5">{l s='Total cost of products:'}</td>
<th class="fixed-width-xs"><span class="title_box">{l s='Image'}</span></th>
<th class="text-center"><span class="title_box">{l s='Room Type'}</span></th>
<th class="text-center"><span class="title_box">{l s='Unit Price'}</span></th>
<th class="text-right"><span class="title_box">{l s='Total'}</span></th>
</tr>
</thead>
<tbody>
{foreach from=$products item='product'}
<tr>
<td>{$product.image}</td>
<td class="text-center">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&amp;id_product={$product.id_product}&amp;updateproduct">
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
</a>
</td>
<td class="text-center">{displayWtPriceWithCurrency price=$product.product_price currency=$currency}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$product.product_total currency=$currency}</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="3">{l s='Total cost of room types:'}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$total_products currency=$currency}</td>
</tr>
{if $total_discounts != 0}
<tr>
<td colspan="5">{l s='Total value of vouchers:'}</td>
<td colspan="3">{l s='Total value of vouchers:'}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$total_discounts currency=$currency}</td>
</tr>
{/if}
{if $total_wrapping > 0}
<tr>
<td colspan="5">{l s='Total cost of gift wrapping:'}</td>
<td colspan="3">{l s='Total cost of gift wrapping:'}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$total_wrapping currency=$currency}</td>
</tr>
{/if}
{if $cart->getOrderTotal(true, Cart::ONLY_SHIPPING) > 0}
<tr>
<td colspan="5">{l s='Total cost of shipping:'}</td>
<td colspan="3">{l s='Total cost of shipping:'}</td>
<td class="text-right">{displayWtPriceWithCurrency price=$total_shipping currency=$currency}</td>
</tr>
{/if}
<tr>
<td colspan="5" class=" success"><strong>{l s='Total:'}</strong></td>
<td colspan="3" class=" success"><strong>{l s='Total:'}</strong></td>
<td class="text-right success"><strong>{displayWtPriceWithCurrency price=$total_price currency=$currency}</strong></td>
</tr>
</tbody>
</tfoot>
</table>
</div>
{if $discounts}

View File

@@ -23,100 +23,100 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<script>
var dashboard_ajax_url = '{$link->getAdminLink('AdminDashboard')}';
var adminstats_ajax_url = '{$link->getAdminLink('AdminStats')}';
var no_results_translation = '{l s='No result' js=1}';
var dashboard_use_push = '{$dashboard_use_push|intval}';
var read_more = '{l s='Read more' js=1}';
var dashboard_ajax_url = '{$link->getAdminLink('AdminDashboard')}';
var adminstats_ajax_url = '{$link->getAdminLink('AdminStats')}';
var no_results_translation = '{l s='No result' js=1}';
var dashboard_use_push = '{$dashboard_use_push|intval}';
var read_more = '{l s='Read more' js=1}';
</script>
<div id="dashboard">
{$hookDashboardTop}
<div class="row">
{if $warning}
<div class="col-lg-12">
<div class="alert alert-warning">{$warning}</div>
</div>
{/if}
<div class="col-lg-12">
<div class="panel clearfix">
<div class="col-lg-6">
<div id="calendar">
<form action="{$action|escape}" method="post" id="calendar_form" name="calendar_form" class="form-inline">
<div class="btn-toolbar">
<div class="btn-group input-group">
<button type="button" name="submitDateDay" class="btn btn-default submitDateDay{if (!isset($preselect_date_range) || !$preselect_date_range) || (isset($preselect_date_range) && $preselect_date_range == 'day')} active{/if}">
{l s='Day'}
</button>
<button type="button" name="submitDateMonth" class="btn btn-default submitDateMonth {if isset($preselect_date_range) && $preselect_date_range == 'month'}active{/if}">
{l s='Month'}
</button>
<button type="button" name="submitDateYear" class="btn btn-default submitDateYear{if isset($preselect_date_range) && $preselect_date_range == 'year'} active{/if}">
{l s='Year'}
</button>
<button type="button" name="submitDateDayPrev" class="btn btn-default submitDateDayPrev{if isset($preselect_date_range) && $preselect_date_range == 'prev-day'} active{/if}">
{l s='Day'}-1
</button>
<button type="button" name="submitDateMonthPrev" class="btn btn-default submitDateMonthPrev{if isset($preselect_date_range) && $preselect_date_range == 'prev-month'} active{/if}">
{l s='Month'}-1
</button>
<button type="button" name="submitDateYearPrev" class="btn btn-default submitDateYearPrev{if isset($preselect_date_range) && $preselect_date_range == 'prev-year'} active{/if}">
{l s='Year'}-1
</button>
</div>
<input type="hidden" name="datepickerFrom" id="datepickerFrom" value="{$date_from|escape}" class="form-control">
<input type="hidden" name="datepickerTo" id="datepickerTo" value="{$date_to|escape}" class="form-control">
<input type="hidden" name="preselectDateRange" id="preselectDateRange" value="{if isset($preselect_date_range)}{$preselect_date_range}{/if}" class="form-control">
<div class="form-group input-group">
<button id="datepickerExpand" class="btn btn-default" type="button">
<i class="icon-calendar-empty"></i>
<span class="hidden-xs">
{l s='From'}
<strong class="text-info" id="datepicker-from-info">{$date_from|escape}</strong>
{l s='To'}
<strong class="text-info" id="datepicker-to-info">{$date_to|escape}</strong>
<strong class="text-info" id="datepicker-diff-info"></strong>
</span>
<i class="icon-caret-down"></i>
</button>
{$calendar}
</div>
</div>
</form>
</div>
</div>
<div class="col-lg-6">
<form action="{$action|escape}" method="post" class="form-inline">
<div class="text-right">
<select class="form-control stats-filter-hotel" name="stats_id_hotel">
{foreach from=$hotel_options item=hotel_option}
<option value="{$hotel_option.id_hotel}" {if $hotel_option.id_hotel == $id_hotel}selected{/if}>
{$hotel_option.hotel_name|escape:'html':'UTF-8'}
</option>
{/foreach}
</select>
<input type="hidden" id="submit-stats-hotel" name="submitStatsHotel" value="1" disabled>
</div>
</form>
</div>
</div>
</div>
</div>
{$hookDashboardTop}
<div class="row">
{if $warning}
<div class="col-lg-12">
<div class="alert alert-warning">{$warning}</div>
</div>
{/if}
<div class="col-lg-12">
<div class="panel clearfix">
<div class="col-lg-6">
<div id="calendar">
<form action="{$action|escape}" method="post" id="calendar_form" name="calendar_form" class="form-inline">
<div class="btn-toolbar">
<div class="btn-group input-group">
<button type="button" name="submitDateDay" class="btn btn-default submitDateDay{if (!isset($preselect_date_range) || !$preselect_date_range) || (isset($preselect_date_range) && $preselect_date_range == 'day')} active{/if}">
{l s='Day'}
</button>
<button type="button" name="submitDateMonth" class="btn btn-default submitDateMonth {if isset($preselect_date_range) && $preselect_date_range == 'month'}active{/if}">
{l s='Month'}
</button>
<button type="button" name="submitDateYear" class="btn btn-default submitDateYear{if isset($preselect_date_range) && $preselect_date_range == 'year'} active{/if}">
{l s='Year'}
</button>
<button type="button" name="submitDateDayPrev" class="btn btn-default submitDateDayPrev{if isset($preselect_date_range) && $preselect_date_range == 'prev-day'} active{/if}">
{l s='Day'}-1
</button>
<button type="button" name="submitDateMonthPrev" class="btn btn-default submitDateMonthPrev{if isset($preselect_date_range) && $preselect_date_range == 'prev-month'} active{/if}">
{l s='Month'}-1
</button>
<button type="button" name="submitDateYearPrev" class="btn btn-default submitDateYearPrev{if isset($preselect_date_range) && $preselect_date_range == 'prev-year'} active{/if}">
{l s='Year'}-1
</button>
</div>
<input type="hidden" name="datepickerFrom" id="datepickerFrom" value="{$date_from|escape}" class="form-control">
<input type="hidden" name="datepickerTo" id="datepickerTo" value="{$date_to|escape}" class="form-control">
<input type="hidden" name="preselectDateRange" id="preselectDateRange" value="{if isset($preselect_date_range)}{$preselect_date_range}{/if}" class="form-control">
<div class="form-group input-group">
<button id="datepickerExpand" class="btn btn-default" type="button">
<i class="icon-calendar-empty"></i>
<span class="hidden-xs">
{l s='From'}
<strong class="text-info" id="datepicker-from-info">{dateFormat date=$date_from}</strong>
{l s='To'}
<strong class="text-info" id="datepicker-to-info">{dateFormat date=$date_to}</strong>
<strong class="text-info" id="datepicker-diff-info"></strong>
</span>
<i class="icon-caret-down"></i>
</button>
{$calendar}
</div>
</div>
</form>
</div>
</div>
<div class="col-lg-6">
<form action="{$action|escape}" method="post" class="form-inline">
<div class="text-right">
<select class="form-control stats-filter-hotel" name="stats_id_hotel">
{foreach from=$hotel_options item=hotel_option}
<option value="{$hotel_option.id_hotel}" {if $hotel_option.id_hotel == $id_hotel}selected{/if}>
{$hotel_option.hotel_name|escape:'html':'UTF-8'}
</option>
{/foreach}
</select>
<input type="hidden" id="submit-stats-hotel" name="submitStatsHotel" value="1" disabled>
</div>
</form>
</div>
</div>
</div>
</div>
{include file='recomended-banner.tpl'}
<div class="row" id="recommendation-wrapper" style="display:none">
</div>
<div class="row">
<div class="col-md-8 col-md-push-4 col-lg-7 col-lg-push-3" id="hookDashboardZoneTwo">
<div class='row'>
{$hookDashboardZoneTwo}
</div>
</div>
<div class="col-md-4 col-md-pull-8 col-lg-3 col-lg-pull-7" id="hookDashboardZoneOne">
{$hookDashboardZoneOne}
</div>
<div class="col-md-4 col-md-pull-8 col-lg-2 col-lg-pull-0" id="hookDashboardZoneThree">
<div class="row">
{$hookDashboardZoneThree}
<div class="row">
<div class="col-md-8 col-md-push-4 col-lg-7 col-lg-push-3" id="hookDashboardZoneTwo">
<div class='row'>
{$hookDashboardZoneTwo}
</div>
</div>
<div class="col-md-4 col-md-pull-8 col-lg-3 col-lg-pull-7" id="hookDashboardZoneOne">
{$hookDashboardZoneOne}
</div>
<div class="col-md-4 col-md-pull-8 col-lg-2 col-lg-pull-0" id="hookDashboardZoneThree">
<div class="row">
{$hookDashboardZoneThree}
{if isset($upgrade_info) && $upgrade_info}
<div class="col-sm-12">
<section class="widget panel">
@@ -124,29 +124,28 @@
</section>
</div>
{/if}
<div class="col-sm-12">
<section class="dash_links widget panel">
<h3><i class="icon-link"></i> {l s="Help Center"}</h3>
<dl>
<dt><a href="https://qloapps.com/qlo-reservation-system/" class="_blank">{l s="Official Documentation"}</a></dt>
<dd>{l s="Qloapps User Guide"}</dd>
</dl>
<dl>
<dt><a href="https://forums.qloapps.com/" class="_blank">{l s="Qloapps Forum"}</a></dt>
<dd>{l s="Connect with the Qloapps community"}</dd>
</dl>
<dl>
<dt><a href="https://qloapps.com/addons/" class="_blank">{l s="Qloapps Addons"}</a></dt>
<dd>{l s="Enhance your store Qloapps modules"}</dd>
</dl>
<dl>
<dt><a href="https://qloapps.com/contact/" class="_blank">{l s="Contact Us!"}</a></dt>
<dd>{l s="Contact us for any help"}</dd>
</dl>
</section>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<section class="dash_links widget panel">
<h3><i class="icon-link"></i> {l s="Help Center"}</h3>
<dl>
<dt><a href="https://qloapps.com/qlo-reservation-system/" class="_blank">{l s="Official Documentation"}</a></dt>
<dd>{l s="Qloapps User Guide"}</dd>
</dl>
<dl>
<dt><a href="https://forums.qloapps.com/" class="_blank">{l s="Qloapps Forum"}</a></dt>
<dd>{l s="Connect with the Qloapps community"}</dd>
</dl>
<dl>
<dt><a href="https://qloapps.com/addons/" class="_blank">{l s="Qloapps Addons"}</a></dt>
<dd>{l s="Enhance your store Qloapps modules"}</dd>
</dl>
<dl>
<dt><a href="https://qloapps.com/contact/" class="_blank">{l s="Contact Us!"}</a></dt>
<dd>{l s="Contact us for any help"}</dd>
</dl>
</section>
</div>
</div>
</div>
</div>
</div>

View File

@@ -74,7 +74,7 @@
</span>
</button>
</div>
<div class="form-group">
<div class="form-group login-actions">
<div id="remind-me" class="checkbox pull-left">
<label for="stay_logged_in">
<input name="stay_logged_in" type="checkbox" id="stay_logged_in" value="1" tabindex="3"/>
@@ -100,7 +100,7 @@
</label>
<input type="text" name="email_forgot" id="email_forgot" class="form-control" autofocus="autofocus" tabindex="5" placeholder="&#xf0e0 test@example.com" />
</div>
<div class="panel-footer">
<div class="panel-footer login-actions">
<button type="button" href="#" class="btn btn-default show-login-form" tabindex="7">
<i class="icon-caret-left"></i>
{l s='Back to login'}

View File

@@ -22,7 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<span class="employee_avatar_small">
<img class="imgm img-thumbnail" alt="" src="{$employee_image}" width="32" height="32" />
</span>
{$employee_name}
{$employee_name|escape:'html':'UTF-8'}
<br />
({$employee_email|escape:'html':'UTF-8'})

View File

@@ -57,7 +57,7 @@
</ul>
{/if}
</td>
<td>{$data.date_from|escape:'html':'UTF-8'|date_format:"%d-%m-%Y"}&nbsp;-&nbsp; {$data.date_to|escape:'html':'UTF-8'|date_format:"%d-%m-%Y"}</td>
<td>{dateFormat date=$data.date_from} - {dateFormat date=$data.date_to}</td>
<td id="cart_detail_data_unit_price_{$data.id|escape:'html':'UTF-8'}">
{if $data.feature_price_diff != 0}
{assign var=shown_room_type_price value=$data.feature_price_tax_excl}

View File

@@ -54,7 +54,7 @@
</a>
</td>
<td class="text-center">
<span class="booking_duration_show">{$data.date_from|date_format:"%d-%m-%Y"}&nbsp-&nbsp {$data.date_to|date_format:"%d-%m-%Y"}</span>
<span class="booking_duration_show">{dateFormat date=$data.date_from} - {dateFormat date=$data.date_to}</span>
{if $can_edit}
<div class="booking_duration_edit" style="display:none;">

View File

@@ -291,10 +291,10 @@
</a>
</td>
<td>
{$data['date_from']|date_format:"%d-%m-%Y"}
{dateFormat date=$data['date_from']}
</td>
<td>
{$data['date_to']|date_format:"%d-%m-%Y"}
{dateFormat date=$data['date_to']}
</td>
<td>
<form action="" method="post" class="form-horizontal row room_status_info_form">
@@ -305,7 +305,11 @@
{/foreach}
</select>
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}<span class="badge badge-success margin-bottom-5">{l s='checked in on'} {$data['check_in']|date_format:"%d-%m-%Y"}</span>{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}<span class="badge badge-success margin-bottom-5">{l s='checked out on'} {$data['check_out']|date_format:"%d-%m-%Y"}</span>{/if}
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}
<p class="text-center"><span class="badge badge-success margin-bottom-5">{l s='Checked in on'} {dateFormat date=$data['check_in']}</span></p>
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
<p class="text-center"><span class="badge badge-success margin-bottom-5">{l s='Checked out on'} {dateFormat date=$data['check_out']}</span></p>
{/if}
{* field for the current date *}
<input class="room_status_date wk-input-date" type="text" name="status_date" value="{$data['date_from']|date_format:"%d-%m-%Y"}" readonly/>

View File

@@ -0,0 +1,284 @@
{if isset($product->id)}
<div id="product-lengthofstay" class="panel product-tab">
<h3 class="tab"><i class="icon-calendar"></i> {l s='Length Of Stay'}</h3>
<input type="hidden" name="submitted_tabs[]" value="LengthOfStay" />
<div class="panel-content">
<div class="alert alert-info">
{l s='Please read below important points regarding length of stay management'}
<ul>
<li>{l s='Set 1 day for setting no limit on Minimum length of stay'}</li>
<li>{l s='Set 0 day for setting no limit on Maximum length of stay'}</li>
<li>{l s='Enable "Length of stay for date ranges" for setting values of \"Minimum length of stay\" and \"Maximum length of stay\" according to different date ranges'}</li>
<li>{l s='Length of stays (minimum|maximum) of all the dates which does not fall under the date ranges of \"Length of stay for date ranges\", will be taken from the global values of length of stays of this room type.'}</li>
<li>{l s='\"Date to\" will not be included in the date range of \"Length of stay for date ranges\".'}</li>
</ul>
</div>
<div class="form-group">
<label class="control-label col-sm-3 required" for="min_los">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Enter minimum length of stay for the hotel. set 1 day for setting no limit on minimum length of stay.'}">{l s='Minimum length of stay'}</span>
</label>
<div class="col-sm-2">
<div class="input-group">
<input type="text" id="min_los" name="min_los" value="{if isset($smarty.post.min_los)}{$smarty.post.min_los|escape:'html':'UTF-8'}{elseif isset($roomTypeInfo['min_los']) && $roomTypeInfo['min_los']}{$roomTypeInfo['min_los']|escape:'html':'UTF-8'}{else}1{/if}">
<span class="input-group-addon">{l s='Day(s)'}</span>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3 required" for="max_los">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Enter maximum length of stay for the hotel. set 0 day for setting no limit on maximum length of stay.'}">{l s='Maximum length of stay'}</span>
</label>
<div class="col-sm-2">
<div class="input-group">
<input type="text" id="max_los" name="max_los" value="{if isset($smarty.post.max_los)}{$smarty.post.max_los|escape:'html':'UTF-8'}{elseif isset($roomTypeInfo['max_los'])}{$roomTypeInfo['max_los']|escape:'html':'UTF-8'}{else}0{/if}">
<span class="input-group-addon">{l s='Day(s)'}</span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="active_restriction_dates" class="control-label col-sm-3">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Enable, if you want set minimum|maximum length of stay according to different date ranges.'}">{l s='Length of stay for date ranges'}</span>
</label>
<div class="col-sm-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" value="1" id="active_restriction_dates_on" name="active_restriction_dates" {if isset($smarty.post.active_restriction_dates) && $smarty.post.active_restriction_dates}checked="checked"{elseif isset($roomTypeInfo['restrictionDataRange']) && $roomTypeInfo['restrictionDataRange']}checked="checked"{/if}>
<label for="active_restriction_dates_on">{l s='Yes'}</label>
<input type="radio" value="0" id="active_restriction_dates_off" name="active_restriction_dates" {if isset($smarty.post.active_restriction_dates)}{if !$smarty.post.active_restriction_dates}checked="checked"{/if}{elseif isset($roomTypeInfo['restrictionDataRange'])}{if !$roomTypeInfo['restrictionDataRange']}checked="checked"{/if}{else}checked="checked"{/if}>
<label for="active_restriction_dates_off">{l s='No'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
<div id="restriction_dates_container" class="form-group table-responsive" {if isset($smarty.post.active_restriction_dates)}{if !$smarty.post.active_restriction_dates}style="display:none;"{/if}{elseif isset($roomTypeInfo['restrictionDataRange'])}{if !$roomTypeInfo['restrictionDataRange']}style="display:none;"{/if}{/if}>
<table id="restriction_dates_table" class="table table-striped">
<thead>
<th>{l s='Date From'}</th>
<th>{l s='Date To'}</th>
<th>{l s='Minimum length of stay'}</th>
<th>{l s='Maximum length of stay'}</th>
<th></th>
</thead>
<tbody>
{if isset($smarty.post.active_restriction_dates) && $smarty.post.active_restriction_dates && isset($smarty.post.restriction_date_from) && $smarty.post.restriction_date_from}
{assign var="restrictionDataRange" value=[]}
{foreach from=$smarty.post.restriction_date_from item=restrictionDateFromVal key=restrictionKey}
{assign var="restrictionDataRangeTemp" value=['date_from' => $restrictionDateFromVal, 'date_to' => $smarty.post.restriction_date_to[$restrictionKey], 'min_los' => $smarty.post.restriction_min_los[$restrictionKey], 'max_los' => $smarty.post.restriction_max_los[$restrictionKey]]}
{if isset($smarty.post.id_rt_restriction) && isset($smarty.post.id_rt_restriction[$restrictionKey])}
{$restrictionDataRangeTemp['id_rt_restriction'] = $smarty.post.id_rt_restriction[$restrictionKey]}
{/if}
{$restrictionDataRange[] = $restrictionDataRangeTemp}
{/foreach}
{elseif isset($roomTypeInfo['restrictionDataRange']) && $roomTypeInfo['restrictionDataRange']}
{assign var="restrictionDataRange" value=$roomTypeInfo['restrictionDataRange']}
{else}
{assign var="restrictionDataRange" value=[['date_from' => '', 'date_to' => '', 'min_los' => '', 'max_los' => '']]}
{/if}
{foreach from=$restrictionDataRange item=restrictionInfo}
<tr>
<td>
<div class="input-group">
<input class="form-control restriction_date date_from_restriction" type="text" name="restriction_date_from[]" value="{$restrictionInfo['date_from']|date_format:'%d-%m-%Y'}" readonly>
<span class="input-group-addon"><i class="icon-calendar"></i></span>
</div>
</td>
<td>
<div class="input-group">
<input class="form-control restriction_date date_to_restriction" type="text" name="restriction_date_to[]" value="{$restrictionInfo['date_to']|date_format:'%d-%m-%Y'}" readonly>
<span class="input-group-addon"><i class="icon-calendar"></i></span>
</div>
</td>
<td>
<div class="input-group">
<input class="form-control" type="text" name="restriction_min_los[]" value="{$restrictionInfo['min_los']}">
<span class="input-group-addon">{l s='day(s)'}</span>
</div>
</td>
<td>
<div class="input-group">
<input class="form-control" type="text" name="restriction_max_los[]" value="{$restrictionInfo['max_los']}">
<span class="input-group-addon">{l s='day(s)'}</span>
</div>
</td>
<td>
{if isset($restrictionInfo['id_rt_restriction'])}
<input type="hidden" name="id_rt_restriction[]" value="{$restrictionInfo['id_rt_restriction']}">
{/if}
<a href="#" class="btn btn-default delete_date_restriction" {if isset($restrictionInfo['id_rt_restriction'])}data-id-rt-restriction="{$restrictionInfo['id_rt_restriction']}"{/if}><i class="icon-trash"></i></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
<div class="row">
<div class="col-sm-12">
<a href="#" id="add_los_restriction" class="btn btn-default"><i class="icon icon-plus"></i> {l s='Add more length of stays'}</a>
</div>
</div>
</div>
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default">
<i class="process-icon-cancel"></i>
{l s='Cancel'}
</a>
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save'}
</button>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save and stay'}
</button>
</div>
</div>
{/if}
<script>
var days_txt = "{l s='day(s)' js=1}";
var adminProductLink = "{$link->getAdminlink('AdminProducts')}";
var someErrorText = "{l s='Something went wrong. Please try again.' js=1}";
// console.log($.datepicker.parseDate( "dd-mm-yy", "15-06-2022" ));
$(document).ready(function() {
$("input[name='active_restriction_dates']").on('change', function () {
if (parseInt($(this).val())) {
$("#restriction_dates_container").show(200);
} else {
$("#restriction_dates_container").hide(200);
}
});
$(document).on("click", ".delete_date_restriction",function(e) {
e.preventDefault();
if (typeof $(this).attr('data-id-rt-restriction') !== 'undefined' && $(this).attr('data-id-rt-restriction') !== false) {
var currentElement = $(this);
$.ajax({
url: adminProductLink,
type: 'POST',
dataType: 'json',
data: {
ajax: true,
action:'deleteRoomTypeLengthOfStayRestriction',
id_rt_restriction: currentElement.attr('data-id-rt-restriction'),
},
success: function (result) {
if (typeof result.success !== 'undefined' && result.success !== false) {
showSuccessMessage(result.success);
currentElement.closest('tr').remove();
} else if (typeof result.error !== 'undefined' && result.error !== false) {
showErrorMessage(result.error);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
showErrorMessage(someErrorText);
}
});
} else {
$(this).closest('tr').remove();
}
});
$('#add_los_restriction').on('click',function(e) {
e.preventDefault();
var html = '';
html += '<tr>';
html += '<td>';
html += '<div class="input-group">';
html += '<input class="form-control restriction_date date_from_restriction" type="text" name="restriction_date_from[]" value="" readonly>';
html += '<span class="input-group-addon"><i class="icon-calendar"></i></span>';
html += '</div>';
html += '</td>';
html += '<td>';
html += '<div class="input-group">';
html += '<input class="form-control restriction_date date_to_restriction" type="text" name="restriction_date_to[]" value="" readonly>';
html += '<span class="input-group-addon"><i class="icon-calendar"></i></span>';
html += '</div>';
html += '</td>';
html += '<td>';
html += '<div class="input-group">';
html += '<input class="form-control" type="text" name="restriction_min_los[]" value="">';
html += '<span class="input-group-addon">'+ days_txt +'</span>';
html += '</div>';
html += '</td>';
html += '<td>';
html += '<div class="input-group">';
html += '<input class="form-control" type="text" name="restriction_max_los[]" value="">';
html += '<span class="input-group-addon">'+ days_txt +'</span>';
html += '</div>';
html += '</td>';
html += '<td>';
html += '<a href="#" class="btn btn-default delete_date_restriction"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
$('#restriction_dates_table tbody').append(html);
$(this).blur();
});
$(document).on('focus', '.restriction_date', function() {
var dateFormat = "dd-mm-yy";
$(this).datepicker({
defaultDate: new Date(),
dateFormat: dateFormat,
minDate: 0,
beforeShow: function (input, instance) {
if ($(input).hasClass('date_to_restriction') ) {
var dateFrom = $(this).closest('tr').find('td div input.date_from_restriction').val();
if (typeof dateFrom !== 'undefined' && dateFrom !== false && dateFrom != '') {
// This can also work but more testing needed: var date = new Date($.datepicker.parseDate(dateFormat, dateFrom));
var minDateTo = new Date($.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate(dateFormat, dateFrom)));
minDateTo.setDate(minDateTo.getDate() + 1);
$(this).datepicker("option", "minDate", minDateTo);
}
}
},
beforeShowDay: function (currentDate) {
let dateRange = [];
$(this).closest('tr').siblings().each(function( index ) {
var dateFrom = $(this).find('td div input.date_from_restriction').val();
var dateTo = $(this).find('td div input.date_to_restriction').val();
if ((typeof dateFrom !== 'undefined' && dateFrom !== false && dateFrom != '') && (typeof dateTo !== 'undefined' && dateTo !== false && dateTo != '')) {
for (let index = $.datepicker.parseDate(dateFormat, dateFrom); index < $.datepicker.parseDate(dateFormat, dateTo); index.setDate(index.getDate() + 1)) {
dateRange.push($.datepicker.formatDate(dateFormat, index));
}
}
});
let dateString = $.datepicker.formatDate(dateFormat, currentDate);
return [dateRange.indexOf(dateString) == -1];
},
onClose: function (dateText, instance) {
if ($(this).hasClass('date_from_restriction')) {
if (dateText != "") {
var dateFrom = $.datepicker.parseDate(dateFormat, dateText);
var dateTo = $(this).closest('tr').find('td div input.date_to_restriction').val();
dateTo = $.datepicker.parseDate(dateFormat, dateTo);
if (dateFrom >= dateTo) {
// In this case empty date_to, so that user have to again select the date for date_to field
$(this).closest('tr').find('td div input.date_to_restriction').val("");
}
}
}
}
});
});
});
</script>

View File

@@ -322,29 +322,16 @@
</li>
{/if}
<li id="employee_infos" class="dropdown">
<a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&amp;id_employee={$employee->id|intval}&amp;updateemployee" class="employee_name dropdown-toggle" data-toggle="dropdown">
<span class="employee_avatar_small">
{if isset($employee)}
<img class="imgm img-thumbnail" alt="" src="{$employee->getImage()}" width="32" height="32" />
{/if}
</span>
<a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&amp;id_employee={$employee->id|intval}&amp;updateemployee" class="dropdown-toggle" data-toggle="dropdown">
<span class="string-long">{$employee->firstname}&nbsp;{$employee->lastname}</span>
<span class="string-short">{l s='Me'}</span>
<i class="caret"></i>
</a>
<ul id="employee_links" class="dropdown-menu">
<li>
<span class="employee_avatar">
<img class="imgm img-thumbnail" alt="" src="{$employee->getImage()}" width="96" height="96" />
</span>
</li>
<li class="text-center text-nowrap">{$employee->firstname} {$employee->lastname}</li>
<li class="divider"></li>
<li><a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&amp;id_employee={$employee->id|intval}&amp;updateemployee"><i class="icon-wrench"></i> {l s='My preferences'}</a></li>
{if $host_mode}
<li><a href="https://www.prestashop.com/cloud/" class="_blank"><i class="icon-wrench"></i> {l s='My PrestaShop account'}</a></li>
{/if}
<li class="divider"></li>
<li><a id="header_logout" href="{$login_link|escape:'html':'UTF-8'}&amp;logout"><i class="icon-signout"></i> {l s='Sign out'}</a></li>
</ul>
</li>

View File

@@ -491,10 +491,7 @@ class EmployeeCore extends ObjectModel
public function getImage()
{
if (!Validate::isLoadedObject($this)) {
return Tools::getAdminImageUrl('prestashop-avatar.png');
}
return Tools::getShopProtocol().'profile.prestashop.com/'.urlencode($this->email).'.jpg';
return Context::getContext()->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO'));
}
public function getLastElementsForNotify($element)

View File

@@ -800,10 +800,9 @@ class LanguageCore extends ObjectModel
$lang->iso_code = Tools::strtolower($iso_code);
$lang->language_code = $iso_code; // Rewritten afterwards if the language code is available
$lang->active = true;
// If the language pack has not been provided, retrieve it from prestashop.com
if (!$lang_pack) {
$lang_pack = json_decode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code));
$lang_pack = json_decode(Tools::file_get_contents(_QLO_API_URL_.'/lang_pack/get_lang_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code));
}
// If a language pack has been found or provided, prefill the language object with the value
@@ -836,7 +835,7 @@ class LanguageCore extends ObjectModel
Configuration::updateGlobalValue('PS_ALLOW_ACCENTED_CHARS_URL', 1);
}
$flag = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg');
$flag = Tools::file_get_contents(_QLO_API_URL_.'/download/lang_pack/flags/'.$iso_code.'.jpg');
if ($flag != null && !preg_match('/<body>/', $flag)) {
$file = fopen(_PS_ROOT_DIR_.'/img/l/'.(int)$lang->id.'.jpg', 'w');
if ($file) {
@@ -917,11 +916,11 @@ class LanguageCore extends ObjectModel
$errors = array();
$file = _PS_TRANSLATIONS_DIR_.(string)$iso.'.gzip';
if (!$lang_pack_link = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='.$version.'&iso_lang='.Tools::strtolower((string)$iso))) {
if (!$lang_pack_link = Tools::file_get_contents(_QLO_API_URL_.'/lang_pack/get_lang_pack.php?version='.$version.'&iso_lang='.Tools::strtolower((string)$iso))) {
$errors[] = Tools::displayError('Archive cannot be downloaded from prestashop.com.');
} elseif (!$lang_pack = json_decode($lang_pack_link)) {
$errors[] = Tools::displayError('Error occurred when language was checked according to your Prestashop version.');
} elseif (empty($lang_pack->error) && ($content = Tools::file_get_contents('http://translations.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.Tools::strtolower($lang_pack->iso_code.'.gzip')))) {
} elseif (empty($lang_pack->error) && ($content = Tools::file_get_contents($lang_pack->download_link))) {
if (!@file_put_contents($file, $content)) {
if (is_writable(dirname($file))) {
@unlink($file);
@@ -939,7 +938,6 @@ class LanguageCore extends ObjectModel
$gz = new Archive_Tar($file, true);
$files_list = AdminTranslationsController::filterTranslationFiles(Language::getLanguagePackListContent((string)$iso, $gz));
$files_paths = AdminTranslationsController::filesListToPaths($files_list);
$i = 0;
$tmp_array = array();
@@ -982,8 +980,6 @@ class LanguageCore extends ObjectModel
AdminTranslationsController::checkAndAddMailsFiles((string)$iso, $files_list);
AdminTranslationsController::addNewTabs((string)$iso, $files_list);
}
//By webkul....Replace our customized mail files in the mail folder.....
Language::replaceCustomizedMailFiles($iso);
}
return count($errors) ? $errors : true;

View File

@@ -410,7 +410,6 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount'] += $data_v['total_price_tax_excl'];
// For order refund
$cart_htl_data[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
$cart_htl_data[$type_key]['date_diff'][$date_join]['id_room'] = $data_v['id_room'];
} else {
$cart_htl_data[$type_key]['date_diff'][$date_join]['extra_demands'] = $objBookingDemand->getRoomTypeBookingExtraDemands(
@@ -455,7 +454,6 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$cart_htl_data[$type_key]['date_diff'][$date_join]['amount'] = $data_v['total_price_tax_excl'];
// For order refund
$cart_htl_data[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
$cart_htl_data[$type_key]['date_diff'][$date_join]['id_room'] = $data_v['id_room'];
$totalDemandsPriceTE += $cart_htl_data[$type_key]['date_diff'][$date_join]['extra_demands_price_te'];
$totalDemandsPriceTI += $cart_htl_data[$type_key]['date_diff'][$date_join]['extra_demands_price_ti'];

View File

@@ -183,7 +183,7 @@ class WebserviceRequestCore
public static $ws_current_classname;
public static $shopIDs;
public static $shopIDs = array();
public function getOutputEnabled()

View File

@@ -51,6 +51,7 @@
<module action="enable" name="blocknewsletter"/>
<module action="enable" name="blocksocial"/>
<module action="enable" name="blockmyaccount"/>
<module action="enable" name="qloblockcontact"/>
<module action="enable" name="blocklanguages"/>
<module action="enable" name="blockcurrencies"/>
<module action="enable" name="productcomments"/>
@@ -111,8 +112,8 @@
<hook module="wkfooterlangcurrencyblock" hook="displayFooter" position="3"/>
<hook module="wkfooterpaymentinfoblockcontainer" hook="displayFooter" position="4"/>
<hook module="wkfooteraboutblock" hook="displayFooterMostLeftBlock" position="3"/>
<hook module="wkfooteraboutblock" hook="displayFooterPaymentInfo" position="1"/>
<hook module="wkfooterpaymentblock" hook="displayFooterPaymentInfo" position="2"/>
<hook module="wkfooterpaymentblock" hook="displayAddModuleSettingLink" position="6"/>
<hook module="wkfooterpaymentblock" hook="displayFooterPaymentInfo" position="1"/>
<hook module="wkfooternotificationblock" hook="displayFooter" position="5"/>
<hook module="blocknavigationmenu" hook="displayTop" position="2"/>
<hook module="blocknavigationmenu" hook="displayFooter" position="6"/>
@@ -132,10 +133,6 @@
<hook module="blockmyaccount" hook="Header" position="8"/>
<hook module="blockmyaccount" hook="actionModuleRegisterHookAfter" position="1"/>
<hook module="blockmyaccount" hook="actionModuleUnRegisterHookAfter" position="1"/>
<hook module="blocklanguages" hook="Header" position="9"/>
<hook module="blocklanguages" hook="displayFooterMostLeftBlock" position="1"/>
<hook module="blockcurrencies" hook="Header" position="10"/>
<hook module="blockcurrencies" hook="displayFooterMostLeftBlock" position="2"/>
<hook module="productcomments" hook="Header" position="11"/>
<hook module="productcomments" hook="displayRightColumnProduct" position="2"/>
<hook module="productcomments" hook="displayProductTab" position="1"/>
@@ -170,6 +167,12 @@
<hook module="blockuserinfo" hook="Header" position="13"/>
<hook module="blockuserinfo" hook="displayTop" position="6"/>
<hook module="blockuserinfo" hook="displayExternalNavigationHook" position="1"/>
<hook module="blockcurrencies" hook="displayNav" position="1"/>
<hook module="blockcurrencies" hook="displayExternalNavigationHook" position="2"/>
<hook module="blocklanguages" hook="displayNav" position="2"/>
<hook module="blocklanguages" hook="displayExternalNavigationHook" position="3"/>
<hook module="qloblockcontact" hook="displayNav" position="3"/>
<hook module="qloblockcontact" hook="displayExternalNavigationHook" position="4"/>
</hooks>
</modules>
<images>

View File

@@ -43,17 +43,19 @@ class AdminCartsControllerCore extends AdminController
$this->_orderWay = 'DESC';
$this->context = Context::getContext();
$this->_select = 'CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) `customer`, a.id_cart total,
IF (IFNULL(o.id_order, \''.$this->l('Non ordered').'\') = \''.$this->l('Non ordered').'\', IF(TIME_TO_SEC(TIMEDIFF(\''.pSQL(date('Y-m-d H:i:00', time())).'\', a.`date_add`)) > 86400, \''.$this->l('Abandoned cart').'\', \''.$this->l('Non ordered').'\'), o.id_order) AS status, IF(o.id_order, 1, 0) badge_success, IF(o.id_order, 0, 1) badge_danger, IF(co.id_guest, 1, 0) id_guest';
$this->_select = 'CONCAT(c.`firstname`, \' \', c.`lastname`) `customer`, a.id_cart total,
TIME_TO_SEC(TIMEDIFF(\''.pSQL(date('Y-m-d H:i:00', time())).'\', a.`date_add`)) AS `time_diff`,
IFNULL(GROUP_CONCAT(o.`id_order`), 0) AS `ids_order`,
IF (IFNULL(o.id_order, \''.$this->l('Non ordered cart').'\') = \''.$this->l('Non ordered cart').'\', IF(TIME_TO_SEC(TIMEDIFF(\''.pSQL(date('Y-m-d H:i:00', time())).'\', a.`date_add`)) > 86400, \''.$this->l('Abandoned cart').'\', \''.$this->l('Non ordered cart').'\'), GROUP_CONCAT(o.`id_order`)) AS filter_ids_order,
IF(o.id_order, 1, 0) badge_success, IF(o.id_order, 0, 1) badge_danger, IF(co.id_guest, 1, 0) id_guest';
$this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer)
LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency)
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart)
LEFT JOIN `'._DB_PREFIX_.'connections` co ON (a.id_guest = co.id_guest AND TIME_TO_SEC(TIMEDIFF(\''.pSQL(date('Y-m-d H:i:00', time())).'\', co.`date_add`)) < 1800)';
$this->_group = ' GROUP BY a.`id_cart`';
if (Tools::getValue('action') && Tools::getValue('action') == 'filterOnlyAbandonedCarts') {
$this->_having = 'status = \''.$this->l('Abandoned cart').'\'';
} else {
$this->_use_found_rows = false;
if (Tools::getValue('action') == 'filterAbandonedCarts') {
$this->_filterHaving = ' AND `ids_order` = 0 AND `time_diff` > 86400';
}
$this->fields_list = array(
@@ -62,11 +64,12 @@ class AdminCartsControllerCore extends AdminController
'align' => 'text-center',
'class' => 'fixed-width-xs'
),
'status' => array(
'ids_order' => array(
'title' => $this->l('Order ID'),
'align' => 'text-center',
'badge_danger' => true,
'havingFilter' => true
'havingFilter' => true,
'filter_key' => 'filter_ids_order',
'callback' => 'getOrderColumn',
),
'customer' => array(
'title' => $this->l('Customer'),
@@ -114,6 +117,29 @@ class AdminCartsControllerCore extends AdminController
}
parent::__construct();
$this->list_no_link = true;
}
public function getOrderColumn($idsOrder, $tr)
{
$smartyVars = array();
if ($idsOrder) {
$idsOrder = explode(',', $idsOrder);
$smartyVars['type'] = 'orders';
$smartyVars['ids_order'] = $idsOrder;
} else {
if ($tr['time_diff'] > 86400) {
$smartyVars['type'] = 'abandoned';
} else {
$smartyVars['type'] = 'non_orderd';
}
}
$tpl = $this->createTemplate('_orders.tpl');
$tpl->assign($smartyVars);
return $tpl->fetch();
}
public function initPageHeaderToolbar()
@@ -200,12 +226,14 @@ class AdminCartsControllerCore extends AdminController
Product::addCustomizationPrice($products, $customized_datas);
$summary = $cart->getSummaryDetails();
/* Display order information */
$id_order = (int)Order::getOrderByCartId($cart->id);
$order = new Order($id_order);
if (Validate::isLoadedObject($order)) {
$tax_calculation_method = $order->getTaxCalculationMethod();
$id_shop = (int)$order->id_shop;
/* Display orders information */
$cartOrders = Order::getAllOrdersByCartId($cart->id);
if ($cartOrders) {
$objOrder = new Order($cartOrders[0]['id_order']);
if (Validate::isLoadedObject($objOrder)) {
$tax_calculation_method = $objOrder->getTaxCalculationMethod();
$id_shop = (int)$objOrder->id_shop;
}
} else {
$id_shop = (int)$cart->id_shop;
$tax_calculation_method = Group::getPriceDisplayMethod(Group::getCurrent()->id);
@@ -286,7 +314,7 @@ class AdminCartsControllerCore extends AdminController
'kpi' => $kpi,
'products' => $products,
'discounts' => $cart->getCartRules(),
'order' => $order,
'cart_orders' => $cartOrders,
'cart' => $cart,
'currency' => $currency,
'customer' => $customer,
@@ -973,7 +1001,7 @@ class AdminCartsControllerCore extends AdminController
$skip_list = array();
foreach ($this->_list as $row) {
if (isset($row['id_order']) && is_numeric($row['id_order'])) {
if (isset($row['ids_order']) && $row['ids_order'] != '0') {
$skip_list[] = $row['id_cart'];
}
}

View File

@@ -263,6 +263,11 @@ class AdminDashboardControllerCore extends AdminController
$calendar_helper->setCompareDateTo($stats_compare_to);
$calendar_helper->setCompareOption(Tools::getValue('compare_date_option', $this->context->employee->stats_compare_option));
Media::addJsDef(array(
'date_subtitle' => $this->l('(from %s to %s)'),
'date_format' => $this->context->language->date_format_lite,
));
$params = array(
'date_from' => $this->context->employee->stats_date_from,
'date_to' => $this->context->employee->stats_date_to,
@@ -307,7 +312,7 @@ class AdminDashboardControllerCore extends AdminController
'PS_DASHBOARD_SIMULATION' => Configuration::get('PS_DASHBOARD_SIMULATION'),
'datepickerFrom' => Tools::getValue('datepickerFrom', $this->context->employee->stats_date_from),
'datepickerTo' => Tools::getValue('datepickerTo', $this->context->employee->stats_date_to),
'preselect_date_range' => Tools::getValue('preselectDateRange', $this->context->employee->preselect_date_range)
'preselect_date_range' => Tools::getValue('preselectDateRange', $this->context->employee->preselect_date_range),
);
return parent::renderView();
}

View File

@@ -95,7 +95,7 @@ class AdminLogsControllerCore extends AdminController
)
);
$this->list_no_link = true;
$this->_select .= 'CONCAT(LEFT(e.firstname, 1), \'. \', e.lastname) employee';
$this->_select .= 'CONCAT(e.firstname, \' \', e.lastname) employee';
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'employee e ON (a.id_employee = e.id_employee)';
$this->_use_found_rows = false;
parent::__construct();
@@ -124,8 +124,8 @@ class AdminLogsControllerCore extends AdminController
$template = $this->context->smarty->createTemplate('controllers/logs/employee_field.tpl', $this->context->smarty);
$employee = new Employee((int)$tr['id_employee']);
$template->assign(array(
'employee_image' => $employee->getImage(),
'employee_name' => $value
'employee_name' => $value,
'employee_email' => $employee->email,
));
return $template->fetch();
}

View File

@@ -108,6 +108,14 @@ class AdminPPreferencesControllerCore extends AdminController
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_LOS_RESTRICTION_BO' => array(
'title' => $this->l('Apply Min and Max lenght of stay restrictions for back-office bookings'),
'hint' => $this->l('While creating bookings from back-office, apply minimum and maximum lenght of stay restrictions'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
)
),
'submit' => array('title' => $this->l('Save'))

View File

@@ -112,6 +112,7 @@ class AdminProductsControllerCore extends AdminController
'Warehouses' => $this->l('Warehouses'),
'Configuration' => $this->l('Configuration'),
'Occupancy' => $this->l('Occupancy'),
'LengthOfStay' => $this->l('Length of Stay'),
'Booking' => $this->l('Booking Information'),
);
@@ -133,7 +134,8 @@ class AdminProductsControllerCore extends AdminController
//'Suppliers' => 13,
'Configuration' => 14,
'Occupancy' => 15,
'Booking' => 16,
'LengthOfStay' => 16,
'Booking' => 17,
));
}
@@ -2225,6 +2227,9 @@ class AdminProductsControllerCore extends AdminController
if ($this->isTabSubmitted('Occupancy')) {
$this->processOccupancy();
}
if ($this->isTabSubmitted('LengthOfStay')) {
$this->processLengthOfStay();
}
if ($this->isTabSubmitted('Configuration')) {
$this->processConfiguration();
}
@@ -3473,6 +3478,141 @@ class AdminProductsControllerCore extends AdminController
}
}
// send information for the length of stay tab
public function initFormLengthOfStay($product)
{
$data = $this->createTemplate($this->tpl_form);
if ($product->id) {
if ($this->product_exists_in_shop) {
// Check if any hotel is created or not
$objRoomType = new HotelRoomType();
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($product->id)) {
if ($roomTypeInfo['id_hotel']) {
// send length of stay date ranges for this room type
$objRoomTypeRestrictionDates = new HotelRoomTypeRestrictionDateRange();
$roomTypeInfo['restrictionDataRange'] = $objRoomTypeRestrictionDates->getRoomTypeLengthOfStayRestriction($product->id);
$smartyVars['roomTypeInfo'] = $roomTypeInfo;
} else {
$this->displayWarning($this->l('No hotel is attached to this room type.'));
}
} else {
$this->displayWarning($this->l('Room type information is missing.'));
}
} else {
$this->displayWarning($this->l('You must save room type before managing length of stay.'));
}
} else {
$this->displayWarning($this->l('You must save room type before managing length of stay.'));
}
$smartyVars['product'] = $product;
$data->assign($smartyVars);
$this->tpl_form_vars['custom_form'] = $data->fetch();
}
public function processLengthOfStay()
{
if ($this->tabAccess['edit'] == 1) {
$idProduct = Tools::getValue('id_product');
if (Validate::isLoadedObject($product = new Product((int)$idProduct))) {
$objRoomType = new HotelRoomType();
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($idProduct)) {
$roomTypeMinLos = Tools::getValue('min_los');
$roomTypeMaxLos = Tools::getValue('max_los');
// validate length of stay global values for room type
if (!$roomTypeMinLos || $roomTypeMinLos == null) {
$this->errors[] = Tools::displayError('Global minimum length of stay is a required field.');
} elseif (!Validate::isUnsignedInt($roomTypeMinLos)) {
$this->errors[] = Tools::displayError('Global minimum length of stay value is invalid. Please enter integer value. Set 1 day incase of setting no limit on global minimum length of stay.');
}
if ($roomTypeMaxLos == null) {
$this->errors[] = Tools::displayError('Global maximum length of stay is a required field.');
} elseif (!Validate::isUnsignedInt($roomTypeMaxLos)) {
$this->errors[] = Tools::displayError('Invalid value entered for global maximum length of stay field. Please enter integer value. Set 0 day incase of setting no limit on maximum length of stay.');
} elseif ($roomTypeMinLos && $roomTypeMaxLos > 0 && ($roomTypeMinLos > $roomTypeMaxLos)) {
$this->errors[] = Tools::displayError('Value of global maximum length of stay must be greater than global minimum length of stay.');
}
if (Tools::getValue('active_restriction_dates')) {
if (Tools::getValue('restriction_date_from') && Tools::getValue('restriction_date_to')) {
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange();
$dateFromRestriction = Tools::getValue('restriction_date_from');
$dateToRestriction = Tools::getValue('restriction_date_to');
$minLosDays = Tools::getValue('restriction_min_los');
$maxLosDays = Tools::getValue('restriction_max_los');
$this->errors = array_merge($this->errors, $objRoomTypeRestrictDateRange->validateRoomTypeLengthOfStayRestriction($dateFromRestriction, $dateToRestriction, $minLosDays, $maxLosDays));
} else {
$this->errors[] = Tools::displayError('Please add at least one Minimum & maximum length of stay restriction for date range if \'Length of stay for date ranges\' option is enable.');
}
}
if (!$this->errors) {
$objRoomType = new HotelRoomType($roomTypeInfo['id']);
$objRoomType->min_los = $roomTypeMinLos;
$objRoomType->max_los = $roomTypeMaxLos;
if ($objRoomType->save()) {
if (Tools::getValue('active_restriction_dates') && Tools::getValue('restriction_date_from')) {
// @ToDo: we should validate this room type restriction ids belongs to this room type
$idRoomTypeRestriction = Tools::getValue('id_rt_restriction');
foreach ($dateFromRestriction as $restrictionKey => $dateFrom) {
// change into database compatible format
$dateFrom = date('Y-m-d', strtotime($dateFrom));
$dateTo = date('Y-m-d', strtotime($dateToRestriction[$restrictionKey]));
if ($idRoomTypeRestriction[$restrictionKey]) {
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange($idRoomTypeRestriction[$restrictionKey]);
} else {
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange();
}
$objRoomTypeRestrictDateRange->id_product = $idProduct;
$objRoomTypeRestrictDateRange->date_from = $dateFrom;
$objRoomTypeRestrictDateRange->date_to = $dateTo;
$objRoomTypeRestrictDateRange->min_los = $minLosDays[$restrictionKey];
$objRoomTypeRestrictDateRange->max_los = $maxLosDays[$restrictionKey];
$objRoomTypeRestrictDateRange->save();
}
} else {
// if disabled length of stay for date ranges then delete all previously saved
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange();
if ($losRestrictions = $objRoomTypeRestrictDateRange->getRoomTypeLengthOfStayRestriction($idProduct)) {
foreach ($losRestrictions as $losDate) {
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange($losDate['id_rt_restriction']);
$objRoomTypeRestrictDateRange->delete();
}
}
}
} else {
$this->errors[] = Tools::displayError('Something went wrong while saving global minimum & maximum length of stay values. Please try again !!');
}
}
}
}
} else {
$this->errors[] = Tools::displayError('You do not have the right permission.');
}
}
// delete the rows of length of stay on date range
public function ajaxProcessDeleteRoomTypeLengthOfStayRestriction()
{
if ($this->tabAccess['edit'] == 1) {
$objRoomTypeRestrictionDates = new HotelRoomTypeRestrictionDateRange(Tools::getValue('id_rt_restriction'));
if ($objRoomTypeRestrictionDates->delete()) {
die(json_encode(array('success' => $this->l('Successfully deleted'))));
} else {
die(json_encode(array('error' => $this->l('Something went wrong. Please reload the page and try again !!'))));
}
} else {
die(json_encode(array('error' => $this->l('You do not have the right permission'))));
}
}
public function validateDisableDateRanges($disableDates)
{
if (count($disableDates)) {
@@ -5483,7 +5623,6 @@ class AdminProductsControllerCore extends AdminController
public function getModalDuplicateOptions()
{
$tpl = $this->createTemplate('modal-duplicate-options.tpl');
$idsHotel = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
$hotelsInfo = array();
foreach ($idsHotel as $idHotel) {
@@ -5499,13 +5638,15 @@ class AdminProductsControllerCore extends AdminController
$hotelsInfo[] = $hotelInfo;
}
}
$formAction = $this->context->link->getAdminLink('AdminProducts', true).'&duplicateproduct';
$tpl->assign(array(
$this->context->smarty->assign(array(
'action' => $formAction,
'hotels_info' => $hotelsInfo,
'duplicate_images' => 1,
));
$modalContent = $this->context->smarty->fetch('controllers/products/modal-duplicate-options.tpl');
$modalActions = array(
array(
'type' => 'button',
@@ -5520,9 +5661,10 @@ class AdminProductsControllerCore extends AdminController
'modal_id' => 'modal-duplicate-options',
'modal_class' => 'modal-md',
'modal_title' => $this->l('Duplication options'),
'modal_content' => $tpl->fetch(),
'modal_content' => $modalContent,
'modal_actions' => $modalActions,
);
return $modal;
}

View File

@@ -2097,6 +2097,7 @@ class AdminThemesControllerCore extends AdminController
'blockcart',
'blockcurrencies',
'blocklanguages',
'qloblockcontact',
'blockmyaccount',
'blocknewsletter',
'blocksocial',

View File

@@ -218,6 +218,8 @@ class CategoryControllerCore extends FrontController
public function displayAjaxFilterResults()
{
$response = array('status' => false);
$this->display_header = false;
$this->display_footer = false;
@@ -286,9 +288,13 @@ class CategoryControllerCore extends FrontController
array_multisort($indi_arr, $direction, $booking_data['rm_data']);
}
$this->context->smarty->assign(array('booking_data' => $booking_data));
$html = $this->context->smarty->fetch('_partials/room_type_list.tpl');
$response['status'] = true;
$response['html_room_type_list'] = $html;
}
die($this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/room_type_list.tpl'));
$this->ajaxDie(json_encode($response));
}
/**

View File

@@ -304,19 +304,6 @@ class ProductControllerCore extends FrontController
$date_to = date('Y-m-d', strtotime('+1 day', strtotime($date_from)));
}
$obj_htl_cart_booking_data = new HotelCartBookingData();
$obj_booking_detail = new HotelBookingDetail();
$num_days = $obj_booking_detail->getNumberOfDays($date_from, $date_to);
//$price_tax_incl = Product::getPriceStatic($this->product->id, HotelBookingDetail::useTax());
//$total_price = $price_tax_incl * $num_days;
//// By webkul New way to calculate product prices with feature Prices
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($this->product->id, $date_from, $date_to);
if ($useTax) {
$total_price = $roomTypeDateRangePrice['total_price_tax_incl'];
} else {
$total_price = $roomTypeDateRangePrice['total_price_tax_excl'];
}
//END
$obj_booking_dtl = new HotelBookingDetail();
$hotel_room_data = $obj_booking_dtl->DataForFrontSearch($date_from, $date_to, $hotel_id, $this->product->id, 1);
@@ -324,12 +311,6 @@ class ProductControllerCore extends FrontController
$total_available_rooms = $hotel_room_data['stats']['num_avail'];
}
$hotel_branch_obj = new HotelBranchInformation($hotel_id);
if (isset($this->context->cart->id)) {
$num_cart_rooms = $obj_htl_cart_booking_data->getCountRoomsByIdCartIdProduct($this->context->cart->id, $this->product->id, $date_from, $date_to);
if ($num_cart_rooms) {
$total_available_rooms = $total_available_rooms - $num_cart_rooms;
}
}
/*Max date of ordering for order restrict*/
$order_date_restrict = false;
$max_order_date = HotelOrderRestrictDate::getMaxOrderDate($hotel_id);
@@ -362,9 +343,7 @@ class ProductControllerCore extends FrontController
'warning_num' => Configuration::get('WK_ROOM_LEFT_WARNING_NUMBER'),
'ratting_img_path' => _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/icons-sprite.png',
'total_available_rooms' => $total_available_rooms,
'total_price' => $total_price,
'product_controller_url' => $this->context->link->getPageLink('product'),
'num_days' => $num_days,
'date_from' => $date_from,
'date_to' => $date_to,
'hotel_check_in' => date('h:i a', strtotime($hotel_branch_obj->check_in)),
@@ -378,6 +357,9 @@ class ProductControllerCore extends FrontController
'order_date_restrict' => $order_date_restrict
)
);
$this->assignBookingFormVars($this->product->id, $date_from, $date_to);
// product price after imposing feature prices...
if ($useTax) {
$priceProduct = Product::getPriceStatic($this->product->id, true);
@@ -458,6 +440,138 @@ class ProductControllerCore extends FrontController
$this->setTemplate(_PS_THEME_DIR_.'product.tpl');
}
public function assignBookingFormVars(
$idProduct,
$dateFrom,
$dateTo,
$quantity = 1,
$jsonDemands = ''
) {
$objProduct = new Product($idProduct, true, $this->context->language->id, $this->context->shop->id);
if (!Validate::isLoadedObject($objProduct)) {
return false;
}
$smartyVars = array();
$objHotelRoomType = new HotelRoomType();
$objHotel = new HotelBranchInformation();
$objHotelCartBookingData = new HotelCartBookingData();
$objBookingDetail = new HotelBookingDetail();
$objHRTDemand = new HotelRoomTypeDemand();
$objHRTDemandPrice = new HotelRoomTypeDemandPrice();
$idCart = (int) $this->context->cart->id;
$idGuest = (int) $this->context->cart->id_guest;
$warningCount = (int) Configuration::get('WK_ROOM_LEFT_WARNING_NUMBER');
$roomType = $objHotelRoomType->getRoomTypeInfoByIdProduct($idProduct);
$idHotel = $roomType['id_hotel'];
$hotel = $objHotel->hotelBranchesInfo(false, 2, 1, $idHotel);
$hotelLocation = $hotel['city'].', '.(isset($hotel['state_name']) ? ' '.$hotel['state_name'].', ' : '').
' '.$hotel['country_name'];
$orderDateRestrict = false;
$maxOrderDate = HotelOrderRestrictDate::getMaxOrderDate($idHotel);
if ($maxOrderDate) {
$maxOrderDate = date('Y-m-d', strtotime($maxOrderDate));
if (strtotime('-1 day', strtotime($maxOrderDate)) < strtotime($dateFrom)
|| strtotime($maxOrderDate) < strtotime($dateTo)
) {
$orderDateRestrict = true;
}
}
$numDays = $objBookingDetail->getNumberOfDays($dateFrom, $dateTo);
$hotelRoomData = $objBookingDetail->DataForFrontSearch(
$dateFrom,
$dateTo,
$idHotel,
$idProduct,
1,
0,
0,
-1,
0,
0,
$idCart,
$idGuest
);
if ($hotelRoomData) {
$totalAvailableRooms = $hotelRoomData['stats']['num_avail'];
$quantity = ($quantity > $totalAvailableRooms) ? $totalAvailableRooms : $quantity;
}
// calculate room type price first
$useTax = HotelBookingDetail::useTax();
$totalPrice = 0;
$productPriceWithoutReduction = $objProduct->getPriceWithoutReduct(!$useTax);
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
$idProduct,
$dateFrom,
$dateTo
);
$featurePrice = 0;
if ($useTax) {
$featurePrice = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay(
$idProduct,
$dateFrom,
$dateTo,
true
);
$roomTypeDateRangePrice = $roomTypeDateRangePrice['total_price_tax_incl'];
} else {
$featurePrice = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay(
$idProduct,
$dateFrom,
$dateTo,
false
);
$roomTypeDateRangePrice = $roomTypeDateRangePrice['total_price_tax_excl'];
}
$featurePriceDiff = (float) ($productPriceWithoutReduction - $featurePrice);
$totalRoomPrice = $roomTypeDateRangePrice * $quantity;
// calculate demand price now
$demandsPrice = 0;
$roomTypeDemands = $objHRTDemand->getRoomTypeDemands($idProduct);
if ($jsonDemands !== '') {
$cartDemands = json_decode($jsonDemands, true);
$demandsPrice = $objHRTDemandPrice->getRoomTypeDemandsTotalPrice(
$idProduct,
$cartDemands,
$useTax,
$dateFrom,
$dateTo
);
$demandsPrice *= $quantity;
}
// calculate total price
$totalPrice = $totalRoomPrice + $demandsPrice;
$smartyVars['hotel_location'] = $hotelLocation;
$smartyVars['order_date_restrict'] = $orderDateRestrict;
$smartyVars['max_order_date'] = $maxOrderDate;
$smartyVars['date_from'] = $dateFrom;
$smartyVars['date_to'] = $dateTo;
$smartyVars['allow_oosp'] = $objProduct->isAvailableWhenOutOfStock((int) $objProduct->out_of_stock);
$smartyVars['quantity'] = $quantity;
$smartyVars['num_days'] = $numDays;
$smartyVars['warning_count'] = $warningCount;
$smartyVars['total_available_rooms'] = $totalAvailableRooms;
$smartyVars['has_room_type_demands'] = $roomTypeDemands ? true : false; // whether to show price breakup
$smartyVars['rooms_price'] = $totalRoomPrice;
$smartyVars['demands_price'] = $demandsPrice;
$smartyVars['total_price'] = $totalPrice;
$this->context->smarty->assign($smartyVars);
return true;
}
/**
* Assign price and tax to the template
*/
@@ -923,6 +1037,33 @@ class ProductControllerCore extends FrontController
return $this->category;
}
public function displayAjaxRefreshBookingForm()
{
$response = array('status' => false);
$idProduct = (int) Tools::getValue('id_product');
$dateFrom = Tools::getValue('date_from');
$dateTo = Tools::getValue('date_to');
$quantity = (int) Tools::getValue('quantity');
$roomTypeDemands = Tools::getValue('room_type_demands');
$dateFrom = date('Y-m-d', strtotime($dateFrom));
$dateTo = date('Y-m-d', strtotime($dateTo));
if ($this->assignBookingFormVars(
$idProduct,
$dateFrom,
$dateTo,
$quantity,
$roomTypeDemands
)) {
$html = $this->context->smarty->fetch('_partials/booking-form.tpl');
$response['status'] = true;
$response['html_booking_form'] = $html;
}
$this->ajaxDie(json_encode($response));
}
public function displayAjaxCheckRoomAvailabilityAndRate()
{
$result = array();

View File

@@ -659,8 +659,9 @@ class InstallModelInstall extends InstallAbstractModel
'bankwire',
'cheque',
'blockmyaccount',
'blocklanguages',
'qloblockcontact',
'blockcurrencies',
'blocklanguages',
'productcomments',
'wkfooterlangcurrencyblock',
'wkfooterpaymentinfoblockcontainer',

View File

@@ -326,16 +326,17 @@ function init()
$('.edit_product_fields, .standard_refund_fields, .partial_refund_fields, .order_action').hide();
$('tr#new_product').slideDown('fast', function () {
$('tr#new_product td').fadeIn('fast', function() {
$('tr#new_product td').fadeIn('fast').promise().done(function () {
$('#add_product_product_name').focus();
scroll_if_anchor('#new_product');
scroll_if_anchor('#new_product', 360);
});
});
e.preventDefault();
});
$('#cancelAddProduct').unbind('click').click(function() {
$('.order_action').show();
$('.order_action').not('.standard_refund_fields').show();
$('tr#new_product td').fadeOut('fast');
});

View File

@@ -524,6 +524,7 @@ var ajaxCart = {
$('.unvail_rooms_cond_display').hide();
}
}
BookingForm.refresh();
}
if (pagename == 'category') {

View File

@@ -1,37 +1 @@
# Currency block
## About
Adds a block allowing customers to choose their preferred shopping currency.
## Contributing
PrestaShop modules are open-source extensions to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
### Requirements
Contributors **must** follow the following rules:
* **Make your Pull Request on the "dev" branch**, NOT the "master" branch.
* Do not update the module's version number.
* Follow [the coding standards][1].
### Process in details
Contributors wishing to edit a module's files should follow the following process:
1. Create your GitHub account, if you do not have one already.
2. Fork the blockcurrencies project to your GitHub account.
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
4. Create a branch in your local clone of the module for your changes.
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
6. Push your changed branch to your fork in your GitHub account.
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
That's it: you have contributed to this open-source project! Congratulations!
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
[3]: https://help.github.com/articles/using-pull-requests
## Currency selector block

View File

@@ -1,91 +0,0 @@
#.footer-container currencies-block-top {
position: relative;
}
/*@media (max-width:479px) {
.footer-container #currencies-block-top {
width: 25%;
}
}*/
.footer-container #currencies-block-top span.firstWord {
display: none;
}
.footer-container #currencies-block-top div.current {
background-color: #3a3a3a;
border: 1px solid #868686;
color: #bfbfbf;
cursor: pointer;
font-size: 16px;
font-weight: 400;
line-height: 18px;
padding: 10px;
position: relative;
text-shadow: 1px 1px rgba(0, 0, 0, 0.2);
}
/*@media (max-width:479px) {
.footer-container #currencies-block-top div.current {
text-align: center;
padding: 9px 5px 10px;
font-size: 11px;
}
}*/
.footer-container #currencies-block-top div.current strong {
color: #777777;
}
/* .footer-container #currencies-block-top div.current:hover, .footer-container #currencies-block-top div.current.active {
background: #2b2b2b; } */
.footer-container #currencies-block-top div.current:after {
content: "\f0d7";
font-family: "FontAwesome";
font-size: 12px;
position: absolute;
right: 10px;
line-height: 18px;
color: #bfbfbf;
vertical-align: 0px;
padding-left: 7px;
}
/*@media (max-width:479px) {
.footer-container #currencies-block-top div.current:after {
padding-left: 2px;
font-size: 13px;
line-height: 13px;
vertical-align: 0;
}
}*/
/*@media (max-width:479px) {
.footer-container #currencies-block-top div.current .cur-label {
display: none;
}
}*/
.footer-container #currencies-block-top ul {
display: none;
position: absolute;
top: 41px;
right: 0;
left: 0; /*width: 157px;*/
background: #fff;
z-index: 1000;
}
.footer-container #currencies-block-top ul li {
font-weight: 400;
color: #ffffff;
line-height: 28px;
font-size: 16px;
padding: 0px;
}
.footer-container #currencies-block-top ul li a, .footer-container #currencies-block-top ul li > span {
font-weight: normal;
text-shadow: unset;
padding: 3px 10px;
display: block;
color: #555555;
}
.footer-container #currencies-block-top ul li.selected, .footer-container #currencies-block-top ul li:hover a {
background: #3594E6;
}
.footer-container #currencies-block-top ul li.selected > a, .footer-container #currencies-block-top ul li:hover a {
color: #fff;
}
/*# sourceMappingURL=blockcurrencies.css.map */

View File

@@ -24,77 +24,84 @@
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_'))
exit;
if (!defined('_PS_VERSION_')) {
exit;
}
class BlockCurrencies extends Module
{
public function __construct()
{
$this->name = 'blockcurrencies';
$this->tab = 'front_office_features';
$this->version = '0.4.0';
$this->author = 'PrestaShop';
$this->need_instance = 0;
public function __construct()
{
$this->name = 'blockcurrencies';
$this->tab = 'front_office_features';
$this->version = '0.4.0';
$this->author = 'PrestaShop';
$this->need_instance = 0;
parent::__construct();
parent::__construct();
$this->displayName = $this->l('Currency block');
$this->description = $this->l('Adds a block allowing customers to choose their preferred shopping currency.');
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
}
$this->displayName = $this->l('Currency selector block');
$this->description = $this->l('Adds a block allowing customers to select their preferred currency.');
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
}
public function install()
{
return parent::install()
&& $this->registerHook('displayFooterMostLeftBlock')
&& $this->registerHook('displayHeader');
}
public function install()
{
if (!parent::install()
|| !$this->registerHook('actionFrontControllerSetMedia')
|| !$this->registerHook('displayNav')
|| !$this->registerHook('displayExternalNavigationHook')
) {
return false;
}
return true;
}
protected function _prepareHook($params)
{
if (Configuration::get('PS_CATALOG_MODE'))
return false;
public function hookActionFrontControllerSetMedia()
{
$this->context->controller->addCSS($this->getPathUri().'views/css/hook/blockcurrencies.css');
$this->context->controller->addJS($this->getPathUri().'views/js/hook/blockcurrencies.js');
}
if (!Currency::isMultiCurrencyActivated())
return false;
protected function _prepareHook()
{
if (Configuration::get('PS_CATALOG_MODE')) {
return false;
}
$this->smarty->assign('blockcurrencies_sign', $this->context->currency->sign);
return true;
}
if (!Currency::isMultiCurrencyActivated()) {
return false;
}
return true;
}
/**
* Returns module content for header
*
* @param array $params Parameters
* @return string Content
*/
public function hookDisplayTop($params)
{
if ($this->_prepareHook($params))
return $this->display(__FILE__, 'blockcurrencies.tpl');
}
public function hookDisplayNav()
{
if ($this->_prepareHook()) {
return $this->display(__FILE__, 'blockcurrencies.tpl');
}
}
public function hookDisplayNav($params)
{
return $this->hookDisplayTop($params);
}
public function hookDisplayTop()
{
return $this->hookDisplayNav();
}
public function hookDisplayTopSubPrimaryBlock($params)
{
return $this->hookDisplayTop($params);
}
public function hookDisplayTopSubPrimaryBlock()
{
return $this->hookDisplayNav();
}
public function hookDisplayFooterMostLeftBlock($params)
{
return $this->hookDisplayTop($params);
}
public function hookDisplayFooterMostLeftBlock()
{
return $this->hookDisplayNav();
}
public function hookDisplayHeader($params)
{
if (Configuration::get('PS_CATALOG_MODE'))
return;
$this->context->controller->addCSS(($this->_path).'blockcurrencies.css', 'all');
}
}
public function hookDisplayExternalNavigationHook()
{
if (!$this->_prepareHook()) {
return;
}
return $this->display(__FILE__, 'external-navigation-hook.tpl');
}
}

View File

@@ -1,63 +0,0 @@
{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block currencies module -->
<script type="text/javascript">
$(document).ready(function () {
$("#setCurrency").mouseover(function(){
$(this).addClass("countries_hover");
$(".currencies_ul").addClass("currencies_ul_hover");
});
$("#setCurrency").mouseout(function(){
$(this).removeClass("countries_hover");
$(".currencies_ul").removeClass("currencies_ul_hover");
});
$('ul#first-currencies li:not(.selected)').css('opacity', 0.3);
$('ul#first-currencies li:not(.selected)').hover(function(){
$(this).css('opacity', 1);
}, function(){
$(this).css('opacity', 0.3);
});
});
</script>
<div id="currencies_block_top">
<form id="setCurrency" action="{$request_uri}" method="post">
<p>
<input type="hidden" name="id_currency" id="id_currency" value=""/>
<input type="hidden" name="SubmitCurrency" value="" />
{l s='Currency' mod='blockcurrencies'} : {$blockcurrencies_sign}
</p>
<ul id="first-currencies" class="currencies_ul">
{foreach from=$currencies key=k item=f_currency}
<li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}>
<a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}" rel="nofollow">{$f_currency.sign}</a>
</li>
{/foreach}
</ul>
</form>
</div>
<!-- /Block currencies module -->

View File

@@ -1,19 +0,0 @@
{
"name": "PrestaShop/blockcurrencies",
"description": "PrestaShop module blockcurrencies",
"homepage": "https://github.com/PrestaShop/blockcurrencies",
"license": "AFL - Academic Free License (AFL 3.0)",
"authors": [
{
"name": "PrestaShop SA",
"email": "contact@prestashop.com"
}
],
"require": {
"php": ">=5.3.2"
},
"config": {
"preferred-install": "dist"
},
"type": "prestashop-module"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

View File

@@ -1,35 +0,0 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -1,35 +0,0 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -1,9 +0,0 @@
<?php
if (!defined('_PS_VERSION_'))
exit;
function upgrade_module_0_2($object)
{
return ($object->registerHook('displayNav'));
}

View File

@@ -0,0 +1,53 @@
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
.currencies-block-wrap button.dropdown-toggle {
padding: 0;
background-color: transparent;
color: #fff;
}
.currencies-block-wrap .caret {
border-top-color: white;
}
.currencies-block-wrap .dropdown-menu {
max-height: 300px;
overflow-y: auto;
}
/* popup - start */
.fancybox-blockcurrencies .fancybox-inner {
border-radius: 4px;
}
.fancybox-blockcurrencies .list-group {
margin-bottom: 0;
}
.fancybox-blockcurrencies .list-group-item {
border: none;
min-width: 160px;
font-size: 14px;
}
.fancybox-blockcurrencies .list-group-item.active {
background-color: #379BF0;
}
/* popup - end */

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,31 @@
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
$(document).ready(function() {
$(document).on('click', '.btn-currency-selector-popup', function(e) {
e.preventDefault();
$.fancybox.open({
href: '#currency-selector-popup',
wrapCSS: 'fancybox-blockcurrencies',
padding: 0,
minHeight: 0,
});
});
});

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,52 @@
{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if count($currencies) > 1}
<div id="currencies-block-top" class="currencies-block-wrap nav-main-item-right hidden-xs pull-right">
<div class="dropdown">
<button class="btn dropdown-toggle" type="button" data-toggle="dropdown">
{foreach from=$currencies key=k item=f_currency}
{if $cookie->id_currency == $f_currency.id_currency}{$f_currency.iso_code}{/if}
{/foreach}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$currencies key=k item=f_currency}
{if strpos($f_currency.name, '('|cat:$f_currency.iso_code:')') === false}
{assign var="currency_name" value={l s='%s (%s)' sprintf=[$f_currency.name, $f_currency.iso_code]}}
{else}
{assign var="currency_name" value=$f_currency.name}
{/if}
<li {if $cookie->id_currency == $f_currency.id_currency}class="disabled"{/if}>
<a href="javascript:setCurrency({$f_currency.id_currency});" title="{$currency_name}">
{$currency_name}
</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/if}

View File

@@ -0,0 +1,52 @@
{*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*}
{if count($currencies) > 1}
<ul class="nav nav-pills nav-stacked visible-xs wk-nav-style">
<li>
<a class="btn-currency-selector-popup">
{foreach from=$currencies item=currency}
{if $cookie->id_currency == $currency.id_currency}
{$currency.iso_code}
<span class="caret"></span>
{/if}
{/foreach}
</a>
</li>
</ul>
<div id="currency-selector-popup" style="display: none;">
<div class="list-group">
{foreach from=$currencies item=currency}
{if strpos($currency.name, '('|cat:$currency.iso_code:')') === false}
{assign var="currency_name" value={l s='%s (%s)' sprintf=[$currency.name, $currency.iso_code]}}
{else}
{assign var="currency_name" value=$currency.name}
{/if}
<a class="list-group-item {if $cookie->id_currency == $currency.id_currency}active{/if}"
href="javascript:setCurrency({$currency.id_currency});"
rel="nofollow"
title="{$currency_name}">
<span>{$currency_name}</span>
</a>
{/foreach}
</div>
</div>
{/if}

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -1,37 +1 @@
# Language block
## About
Adds a block allowing customers to select a language for your store\'s content.
## Contributing
PrestaShop modules are open-source extensions to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
### Requirements
Contributors **must** follow the following rules:
* **Make your Pull Request on the "dev" branch**, NOT the "master" branch.
* Do not update the module's version number.
* Follow [the coding standards][1].
### Process in details
Contributors wishing to edit a module's files should follow the following process:
1. Create your GitHub account, if you do not have one already.
2. Fork the blocklanguages project to your GitHub account.
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
4. Create a branch in your local clone of the module for your changes.
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
6. Push your changed branch to your fork in your GitHub account.
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
That's it: you have contributed to this open-source project! Congratulations!
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
[3]: https://help.github.com/articles/using-pull-requests
## Language selector block

View File

@@ -1,77 +0,0 @@
.footer-container #languages-block-top {
/*float: right;
margin-right: 10px;*/
/*border-left: 1px solid #515151;*/
position: relative; }
/*@media (max-width: 479px) {
.footer-container #languages-block-top {
width: 25%; } }*/
.footer-container #languages-block-top span.firstWord {
display: none; }
.footer-container #languages-block-top div.current {
background-color: #3a3a3a;
border: 1px solid #868686;
color: #bfbfbf;
cursor: pointer;
font-size: 16px;
font-weight: 400;
line-height: 18px;
padding: 10px;
position: relative;
text-shadow: 1px 1px rgba(0, 0, 0, 0.2); }
/*@media (max-width: 479px) {
.footer-container #languages-block-top div.current {
text-align: center;
padding: 9px 5px 10px;
font-size: 11px; } }*/
.footer-container #languages-block-top div.current strong {
color: #777777; }
.footer-container #languages-block-top div.current:after {
content: "\f0d7";
font-family: "FontAwesome";
font-size: 12px;
position: absolute;
right: 10px;
line-height: 18px;
color: #bfbfbf;
vertical-align: 0px;
padding-left: 7px; }
/*@media (max-width: 479px) {
.footer-container #languages-block-top div.current:after {
padding-left: 2px;
font-size: 13px;
line-height: 13px;
vertical-align: 0; } }*/
@media (max-width: 479px) {
.footer-container #languages-block-top div.current .cur-label {
display: none; } }
.footer-container #languages-block-top ul {
display: none;
position: absolute;
top: 41px;
right: 0;
left: 0;
background: #fff;
padding: 2px 0px 0px;
z-index: 10; }
.footer-container #languages-block-top ul li {
font-weight: 400;
color: #ffffff;
line-height: 28px;
font-size: 16px;
padding: 0px; }
.footer-container #languages-block-top ul li a,
.footer-container #languages-block-top ul li > span {
font-weight: normal;
text-shadow: unset;
padding: 3px 10px;
display: block;
color: #555555; }
.footer-container #languages-block-top ul li.selected, .footer-container #languages-block-top ul li:hover a {
background: #3594E6; }
.footer-container #languages-block-top ul li.selected > span, .footer-container #languages-block-top ul li:hover a {
color: #fff; }
/*# sourceMappingURL=blocklanguages.css.map */

View File

@@ -24,106 +24,111 @@
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_'))
exit;
if (!defined('_PS_VERSION_')) {
exit;
}
class BlockLanguages extends Module
{
public function __construct()
{
$this->name = 'blocklanguages';
$this->tab = 'front_office_features';
$this->version = '1.5.0';
$this->author = 'PrestaShop';
$this->need_instance = 0;
public function __construct()
{
$this->name = 'blocklanguages';
$this->tab = 'front_office_features';
$this->version = '1.5.0';
$this->author = 'PrestaShop';
$this->need_instance = 0;
parent::__construct();
parent::__construct();
$this->displayName = $this->l('Language selector block');
$this->description = $this->l('Adds a block allowing customers to select a language for your store\'s content.');
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
}
$this->displayName = $this->l('Language selector block');
$this->description = $this->l('Adds a block allowing customers to select a language for your website.');
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
}
public function install()
{
return (parent::install()
&& $this->registerHook('displayFooterMostLeftBlock')
&& $this->registerHook('displayHeader')
);
}
public function install()
{
if (!parent::install()
|| !$this->registerHook('actionFrontControllerSetMedia')
|| !$this->registerHook('displayNav')
|| !$this->registerHook('displayExternalNavigationHook')
) {
return false;
}
return true;
}
protected function _prepareHook($params)
{
$languages = Language::getLanguages(true, $this->context->shop->id);
if (!count($languages))
return false;
$link = new Link();
public function hookActionFrontControllerSetMedia()
{
$this->context->controller->addCSS($this->getPathUri().'views/css/hook/blocklanguages.css');
$this->context->controller->addJS($this->getPathUri().'views/js/hook/blocklanguages.js');
}
if ((int)Configuration::get('PS_REWRITING_SETTINGS'))
{
$default_rewrite = array();
if (Dispatcher::getInstance()->getController() == 'product' && ($id_product = (int)Tools::getValue('id_product')))
{
$rewrite_infos = Product::getUrlRewriteInformations((int)$id_product);
foreach ($rewrite_infos as $infos)
$default_rewrite[$infos['id_lang']] = $link->getProductLink((int)$id_product, $infos['link_rewrite'], $infos['category_rewrite'], $infos['ean13'], (int)$infos['id_lang']);
}
protected function _prepareHook()
{
$languages = Language::getLanguages(true, $this->context->shop->id);
if (!count($languages)) {
return false;
}
if (Dispatcher::getInstance()->getController() == 'category' && ($id_category = (int)Tools::getValue('id_category')))
{
$rewrite_infos = Category::getUrlRewriteInformations((int)$id_category);
foreach ($rewrite_infos as $infos)
$default_rewrite[$infos['id_lang']] = $link->getCategoryLink((int)$id_category, $infos['link_rewrite'], $infos['id_lang']);
}
$link = new Link();
if ((int)Configuration::get('PS_REWRITING_SETTINGS')) {
$default_rewrite = array();
if (Dispatcher::getInstance()->getController() == 'product' && ($id_product = (int)Tools::getValue('id_product'))) {
$rewrite_infos = Product::getUrlRewriteInformations((int)$id_product);
foreach ($rewrite_infos as $infos) {
$default_rewrite[$infos['id_lang']] = $link->getProductLink((int)$id_product, $infos['link_rewrite'], $infos['category_rewrite'], $infos['ean13'], (int)$infos['id_lang']);
}
}
if (Dispatcher::getInstance()->getController() == 'cms' && (($id_cms = (int)Tools::getValue('id_cms')) || ($id_cms_category = (int)Tools::getValue('id_cms_category'))))
{
$rewrite_infos = (isset($id_cms) && !isset($id_cms_category)) ? CMS::getUrlRewriteInformations($id_cms) : CMSCategory::getUrlRewriteInformations($id_cms_category);
foreach ($rewrite_infos as $infos)
{
$arr_link = (isset($id_cms) && !isset($id_cms_category)) ?
$link->getCMSLink($id_cms, $infos['link_rewrite'], null, $infos['id_lang']) :
$link->getCMSCategoryLink($id_cms_category, $infos['link_rewrite'], $infos['id_lang']);
$default_rewrite[$infos['id_lang']] = $arr_link;
}
}
$this->smarty->assign('lang_rewrite_urls', $default_rewrite);
}
return true;
}
if (Dispatcher::getInstance()->getController() == 'category' && ($id_category = (int)Tools::getValue('id_category'))) {
$rewrite_infos = Category::getUrlRewriteInformations((int)$id_category);
foreach ($rewrite_infos as $infos) {
$default_rewrite[$infos['id_lang']] = $link->getCategoryLink((int)$id_category, $infos['link_rewrite'], $infos['id_lang']);
}
}
/**
* Returns module content for header
*
* @param array $params Parameters
* @return string Content
*/
public function hookDisplayTop($params)
{
if (!$this->_prepareHook($params))
return;
return $this->display(__FILE__, 'blocklanguages.tpl');
}
if (Dispatcher::getInstance()->getController() == 'cms' && (($id_cms = (int)Tools::getValue('id_cms')) || ($id_cms_category = (int)Tools::getValue('id_cms_category')))) {
$rewrite_infos = (isset($id_cms) && !isset($id_cms_category)) ? CMS::getUrlRewriteInformations($id_cms) : CMSCategory::getUrlRewriteInformations($id_cms_category);
foreach ($rewrite_infos as $infos) {
$arr_link = (isset($id_cms) && !isset($id_cms_category)) ?
$link->getCMSLink($id_cms, $infos['link_rewrite'], null, $infos['id_lang']) :
$link->getCMSCategoryLink($id_cms_category, $infos['link_rewrite'], $infos['id_lang']);
$default_rewrite[$infos['id_lang']] = $arr_link;
}
}
$this->smarty->assign('lang_rewrite_urls', $default_rewrite);
}
return true;
}
public function hookDisplayNav($params)
{
return $this->hookDisplayTop($params);
}
public function hookDisplayNav()
{
if (!$this->_prepareHook()) {
return;
}
return $this->display(__FILE__, 'blocklanguages.tpl');
}
public function hookDisplayTopSubPrimaryBlock($params)
{
return $this->hookDisplayTop($params);
}
public function hookDisplayTop()
{
return $this->hookDisplayNav();
}
public function hookDisplayFooterMostLeftBlock($params)
{
return $this->hookDisplayTop($params);
}
public function hookDisplayTopSubPrimaryBlock()
{
return $this->hookDisplayNav();
}
public function hookDisplayHeader($params)
{
$this->context->controller->addCSS($this->_path.'blocklanguages.css', 'all');
}
public function hookDisplayFooterMostLeftBlock()
{
return $this->hookDisplayNav();
}
public function hookDisplayExternalNavigationHook()
{
if (!$this->_prepareHook()) {
return;
}
return $this->display(__FILE__, 'external-navigation-hook.tpl');
}
}

View File

@@ -1,74 +0,0 @@
{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages_block_top">
<div id="countries">
{* @todo fix display current languages, removing the first foreach loop *}
{foreach from=$languages key=k item=language name="languages"}
{if $language.iso_code == $lang_iso}
<p class="selected_language">
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code|escape:'html':'UTF-8'}" width="16" height="11" />
</p>
{/if}
{/foreach}
<ul id="first-languages" class="countries_ul">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso}
{assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name|escape:'html':'UTF-8'}" rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}">
{else}
<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name|escape:'html':'UTF-8'}" rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}">
{/if}
{/if}
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code|escape:'html':'UTF-8'}" width="16" height="11" />
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
{/foreach}
</ul>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$("#countries").mouseover(function(){
$(this).addClass("countries_hover");
$(".countries_ul").addClass("countries_ul_hover");
});
$("#countries").mouseout(function(){
$(this).removeClass("countries_hover");
$(".countries_ul").removeClass("countries_ul_hover");
});
});
</script>
{/if}
<!-- /Block languages module -->

View File

@@ -1,19 +0,0 @@
{
"name": "prestashop/blocklanguages",
"description": "PrestaShop module blocklanguages",
"homepage": "https://github.com/PrestaShop/blocklanguages",
"license": "AFL - Academic Free License (AFL 3.0)",
"authors": [
{
"name": "PrestaShop SA",
"email": "contact@prestashop.com"
}
],
"require": {
"php": ">=5.3.2"
},
"config": {
"preferred-install": "dist"
},
"type": "prestashop-module"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

View File

@@ -1,35 +0,0 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -1,35 +0,0 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -1,9 +0,0 @@
<?php
if (!defined('_PS_VERSION_'))
exit;
function upgrade_module_1_2($object)
{
return ($object->registerHook('displayNav'));
}

View File

@@ -0,0 +1,53 @@
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
.languages-block-wrap button.dropdown-toggle {
padding: 0;
background-color: transparent;
color: #fff;
}
.languages-block-wrap .caret {
border-top-color: white;
}
.languages-block-wrap .dropdown-menu {
max-height: 300px;
overflow-y: auto;
}
/* popup - start */
.fancybox-blocklanguages .fancybox-inner {
border-radius: 4px;
}
.fancybox-blocklanguages .list-group {
margin-bottom: 0;
}
.fancybox-blocklanguages .list-group-item {
border: none;
min-width: 160px;
font-size: 14px;
}
.fancybox-blocklanguages .list-group-item.active {
background-color: #379BF0;
}
/* popup - end */

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,31 @@
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
$(document).ready(function() {
$(document).on('click', '.btn-language-selector-popup', function(e) {
e.preventDefault();
$.fancybox.open({
href: '#language-selector-popup',
wrapCSS: 'fancybox-blocklanguages',
padding: 0,
minHeight: 0,
});
});
});

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,48 @@
{**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*}
{if count($languages) > 1}
<div id="languages-block-top" class="languages-block-wrap nav-main-item-right hidden-xs pull-right">
<div class="dropdown">
{foreach from=$languages key=k item=language}
{if $language.iso_code == $lang_iso}
<button class="btn dropdown-toggle" type="button" data-toggle="dropdown">
{$language.name|regex_replace:"/\s\(.*\)$/":""}
<span class="caret"></span>
</button>
{/if}
{/foreach}
<ul class="dropdown-menu">
{foreach from=$languages key=k item=language}
<li {if $language.iso_code == $lang_iso}class="disabled"{/if}>
{assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang|escape:'html':'UTF-8'}" title="{$language.name}">
{else}
<a href="{$link->getLanguageLink($language.id_lang)|escape:'html':'UTF-8'}" title="{$language.name}">
{/if}
<span>{$language.name|regex_replace:"/\s\(.*\)$/":""}</span>
</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/if}

View File

@@ -0,0 +1,52 @@
{*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*}
{if count($languages) > 1}
<ul class="nav nav-pills nav-stacked visible-xs wk-nav-style">
<li>
<a class="btn-language-selector-popup">
{foreach from=$languages item=language}
{if $language.iso_code == $lang_iso}
{$language.name|regex_replace:"/\s\(.*\)$/":""}
<span class="caret"></span>
{/if}
{/foreach}
</a>
</li>
</ul>
<div id="language-selector-popup" style="display: none;">
<div class="list-group">
{foreach from=$languages key=k item=language}
{assign var=indice_lang value=$language.id_lang}
<a class="list-group-item {if $language.iso_code == $lang_iso}active{/if}"
{if $language.iso_code != $lang_iso}
{if isset($lang_rewrite_urls.$indice_lang)}
href="{$lang_rewrite_urls.$indice_lang|escape:'html':'UTF-8'}" title="{$language.name}"
{else}
href="{$link->getLanguageLink($language.id_lang)|escape:'html':'UTF-8'}" title="{$language.name}"
{/if}
{/if}
>
<span>{$language.name|regex_replace:"/\s\(.*\)$/":""}</span>
</a>
{/foreach}
</div>
</div>
{/if}

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -98,8 +98,6 @@ class Dashactivity extends Module
array(
'gapi_mode' => $gapi_mode,
'dashactivity_config_form' => $this->renderConfigForm(),
'date_subtitle' => $this->l('(from %s to %s)'),
'date_format' => $this->context->language->date_format_lite,
'link' => $this->context->link
)
);

View File

@@ -40,110 +40,18 @@ function pie_chart_trends(widget_name, chart_details)
.datum(chart_details.data)
.transition().duration(1200)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
}
//TODO unify this with other function in calenda.js and replace date.js functions
Date.parseDate = function(date, format) {
if (format === undefined)
format = 'Y-m-d';
var formatSeparator = format.match(/[.\/\-\s].*?/);
var formatParts = format.split(/\W+/);
var parts = date.split(formatSeparator);
var date = new Date();
if (parts.length === formatParts.length) {
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
for (var i=0; i<=formatParts.length; i++) {
switch(formatParts[i]) {
case 'dd':
case 'd':
case 'j':
date.setDate(parseInt(parts[i], 10)||1);
break;
case 'mm':
case 'm':
date.setMonth((parseInt(parts[i], 10)||1) - 1);
break;
case 'yy':
case 'y':
date.setFullYear(2000 + (parseInt(parts[i], 10)||1));
break;
case 'yyyy':
case 'Y':
date.setFullYear(parseInt(parts[i], 10)||1);
break;
}
}
}
return date;
};
Date.prototype.format = function(format) {
if (format === undefined)
return this.toString();
var formatSeparator = format.match(/[.\/\-\s].*?/);
var formatParts = format.split(/\W+/);
var result = '';
for (var i=0; i<=formatParts.length; i++) {
switch(formatParts[i]) {
case 'd':
case 'j':
result += this.getDate() + formatSeparator;
break;
case 'dd':
result += (this.getDate() < 10 ? '0' : '')+this.getDate() + formatSeparator;
break;
case 'm':
result += (this.getMonth() + 1) + formatSeparator;
break;
case 'mm':
result += (this.getMonth() < 9 ? '0' : '')+(this.getMonth() + 1) + formatSeparator;
break;
case 'yy':
case 'y':
result += this.getFullYear() + formatSeparator;
break;
case 'yyyy':
case 'Y':
result += this.getFullYear() + formatSeparator;
break;
}
}
return result.slice(0, -1);
});
}
$(document).ready(function() {
if (typeof date_subtitle === "undefined")
var date_subtitle = '(from %s to %s)';
if (typeof date_format === "undefined")
var date_format = 'Y-mm-dd';
$('#date-start').change(function() {
start = Date.parseDate($('#date-start').val(), 'Y-m-d');
end = Date.parseDate($('#date-end').val(), 'Y-m-d');
$('#customers-newsletters-subtitle').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format)));
$('#traffic-subtitle').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format)));
});
@@ -151,7 +59,7 @@ $(document).ready(function() {
$('#date-end').change(function() {
start = Date.parseDate($('#date-start').val(), 'Y-m-d');
end = Date.parseDate($('#date-end').val(), 'Y-m-d');
$('#customers-newsletters-subtitle').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format)));
$('#traffic-subtitle').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format)));
});

View File

@@ -128,7 +128,7 @@
<div class="sub-title">
<small class="text-muted" id="customers-newsletters-subtitle"></small>
</div>
<ul class="stats-list">
<li>
<span class="item-label">
@@ -209,7 +209,3 @@
</section>
</div>
</section>
<script type="text/javascript">
date_subtitle = "{$date_subtitle|escape:"html":"UTF-8"}";
date_format = "{$date_format|escape:"html":"UTF-8"}";
</script>

View File

@@ -70,8 +70,6 @@ class DashOccupancy extends Module
'count_occupied' => sprintf('%02d', $occupancyData['count_occupied']),
'count_available' => sprintf('%02d', $occupancyData['count_available']),
'count_unavailable' => sprintf('%02d', $occupancyData['count_unavailable']),
'date_occupancy_range' => $this->l('(from %s to %s)'),
'date_occupancy_avail_format' => $this->context->language->date_format_lite,
));
return $this->display(__FILE__, 'dashboard_zone_one.tpl');

View File

@@ -41,22 +41,17 @@ function generateAvailablityPieChart(chartData) {
}
$(document).ready(function() {
if (typeof date_occupancy_range === "undefined")
var date_occupancy_range = '(from %s to %s)';
if (typeof date_occupancy_avail_format === "undefined")
var date_occupancy_avail_format = 'Y-mm-dd';
$('#date-start').change(function() {
start = Date.parseDate($('#date-start').val(), 'Y-m-d');
end = Date.parseDate($('#date-end').val(), 'Y-m-d');
$('#dashoccupancy_date_range').html(sprintf(date_occupancy_range, start.format(date_occupancy_avail_format), end.format(date_occupancy_avail_format)));
$('#dashoccupancy_date_range').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format)));
});
$('#date-end').change(function() {
start = Date.parseDate($('#date-start').val(), 'Y-m-d');
end = Date.parseDate($('#date-end').val(), 'Y-m-d');
$('#dashoccupancy_date_range').html(sprintf(date_occupancy_range, start.format(date_occupancy_avail_format), end.format(date_occupancy_avail_format)));
$('#dashoccupancy_date_range').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format)));
});
});
});

View File

@@ -84,8 +84,3 @@
<svg></svg>
</div>
</section>
<script type='text/javascript'>
date_occupancy_range = '{$date_occupancy_range|escape:'html':'UTF-8'}';
date_occupancy_avail_format = '{$date_occupancy_avail_format|escape:'html':'UTF-8'}';
</script>

View File

@@ -225,6 +225,7 @@ class HotelBookingDetail extends ObjectModel
*/
public function getBookingData($params)
{
$this->context = Context::getContext();
// extract all keys and values of the array [$params] into variables and values
extract($this->getBookingDataParams($params));
if ($date_from && $date_to && $hotel_id) {
@@ -248,12 +249,19 @@ class HotelBookingDetail extends ObjectModel
$num_cart = 0;
$new_part_arr = array();
$booking_data = array();
$applyLosRestriction = true;
if ($search_partial) {
$this->partAvaiDates = array();
$this->allReqDates = $this->createDateRangeArray($date_from, $date_to, 1);
}
if (isset(Context::getContext()->employee->id)) {
if (!Configuration::get('PS_LOS_RESTRICTION_BO')) {
$applyLosRestriction = false;
}
}
foreach ($room_types as $key => $room_type) {
if ($search_partial) {
$this->dltDates = array();
@@ -261,6 +269,10 @@ class HotelBookingDetail extends ObjectModel
$total_rooms += $obj_room_info->getHotelRoomInfo($room_type['id_product'], $hotel_id, 1);
// Get min & max LOS
$objRoomTypeRestriction = new HotelRoomTypeRestrictionDateRange();
$losRestriction = $objRoomTypeRestriction->getRoomTypeLengthOfStay($room_type['id_product'], $date_from);
$obj_product = new Product((int) $room_type['id_product']);
$product_name = $obj_product->name[Configuration::get('PS_LANG_DEFAULT')];
@@ -309,7 +321,15 @@ class HotelBookingDetail extends ObjectModel
if ($search_unavai) {
$sql1 = 'SELECT `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment`
FROM `'._DB_PREFIX_.'htl_room_information`
WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product` ='.(int)$room_type['id_product'].' AND `id_status` = '. HotelRoomInformation::STATUS_INACTIVE;
WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product` ='.(int)$room_type['id_product'].' AND (`id_status` = '. HotelRoomInformation::STATUS_INACTIVE;
if ($applyLosRestriction) {
$sql1 .= ' OR ( DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') < '.(int)$losRestriction['min_los'];
if ((int)$losRestriction['max_los']) {
$sql1 .= ' OR DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') > '.(int)$losRestriction['max_los'];
}
$sql1 .= ')';
}
$sql1 .= ')';
$sql2 = 'SELECT hri.`id_product`, hri.`id_hotel`, hri.`room_num`, hri.`comment` AS `room_comment`
FROM `'._DB_PREFIX_.'htl_room_information` AS hri
@@ -357,7 +377,18 @@ class HotelBookingDetail extends ObjectModel
$joinAvailRoomSearch = '';
$whereAvailRoomSearch = 'WHERE ri.`id_hotel`='.(int)$hotel_id.' AND ri.`id_product`='.(int)$room_type['id_product'].' AND ri.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE .' AND ri.`id` NOT IN ('.$exclude_ids.')';
$whereAvailRoomSearch = 'WHERE ri.`id_hotel`='.(int)$hotel_id.' AND ri.`id_product`='.(int)$room_type['id_product'].' AND ri.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE;
// Check min & max LOS restrictions
if ($applyLosRestriction) {
$whereAvailRoomSearch .= ' AND DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') >= '.(int)$losRestriction['min_los'];
// check max LOS restriction is greater than zero
if ((int)$losRestriction['max_los']) {
$whereAvailRoomSearch .= ' AND DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') <= '.(int)$losRestriction['max_los'];
}
}
$whereAvailRoomSearch .= ' AND ri.`id` NOT IN ('.$exclude_ids.')';
$groupByAvailRoomSearch = '';
$orderByAvailRoomSearch = '';

View File

@@ -29,6 +29,8 @@ class HotelReservationSystemDb
`id_hotel` int(11) NOT NULL,
`adult` smallint(6) NOT NULL,
`children` smallint(6) NOT NULL,
`min_los` smallint(6) NOT NULL DEFAULT '1',
`max_los` smallint(6) NOT NULL DEFAULT '0',
`date_add` datetime NOT NULL,
`date_upd` datetime NOT NULL,
PRIMARY KEY (`id`)
@@ -352,6 +354,18 @@ class HotelReservationSystemDb
PRIMARY KEY (`id`)
) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;",
"CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."htl_room_type_restriction_date_range` (
`id_rt_restriction` int(11) NOT NULL AUTO_INCREMENT,
`id_product` int(11) NOT NULL,
`min_los` smallint(6) unsigned NOT NULL DEFAULT '1',
`max_los` smallint(6) unsigned NOT NULL DEFAULT '0',
`date_from` date NOT NULL,
`date_to` date NOT NULL,
`date_add` datetime NOT NULL,
`date_upd` datetime NOT NULL,
PRIMARY KEY (`id_rt_restriction`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."htl_access` (
`id_profile` int(10) unsigned NOT NULL,
`id_hotel` int(10) unsigned NOT NULL,
@@ -408,6 +422,7 @@ class HotelReservationSystemDb
`'._DB_PREFIX_.'htl_room_type_demand_price`,
`'._DB_PREFIX_.'htl_room_type_demand`,
`'._DB_PREFIX_.'htl_room_disable_dates`,
`'._DB_PREFIX_.'htl_room_type_restriction_date_range`,
`'._DB_PREFIX_.'htl_access`'
);
}

View File

@@ -25,6 +25,8 @@ class HotelRoomType extends ObjectModel
public $id_hotel;
public $adult;
public $children;
public $min_los;
public $max_los;
public $date_add;
public $date_upd;
@@ -36,6 +38,8 @@ class HotelRoomType extends ObjectModel
'id_hotel' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'adult' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'children' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'min_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'default' => 1),
'max_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'default' => 0),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
@@ -211,14 +215,17 @@ class HotelRoomType extends ObjectModel
*
* @return [array|false] [If data found returns array containing information of the room type else returns false]
*/
public function getRoomTypeInfoByIdProduct($id_product)
public function getRoomTypeInfoByIdProduct($id_product, $idLang = false)
{
$idLang = Context::getContext()->language->id;
$sql = 'SELECT hrt.`id`,hrt.`id_hotel`, hrt.`adult`, hrt.`children`, hbl.`hotel_name`
if (!$idLang) {
$idLang = Context::getContext()->language->id;
}
$sql = 'SELECT hrt.`id`,hrt.`id_hotel`, hrt.`adult`, hrt.`children`, hbl.`hotel_name`, hrt.`min_los`, hrt.`max_los`
FROM `'._DB_PREFIX_.'htl_room_type` AS hrt
INNER JOIN `'._DB_PREFIX_.'htl_branch_info_lang` AS hbl
ON (hbl.`id` = hrt.`id_hotel` AND hbl.`id_lang` = '.(int)$idLang.')
WHERE `id_product` = '.(int)$id_product;
WHERE hrt.`id_product` = '.(int)$id_product;
return Db::getInstance()->getRow($sql);
}

View File

@@ -0,0 +1,202 @@
<?php
/**
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/
class HotelRoomTypeRestrictionDateRange extends ObjectModel
{
public $id_rt_restriction;
public $id_product;
public $min_los;
public $max_los;
public $date_from;
public $date_to;
public $date_add;
public $date_upd;
const WK_ROOM_TYPE_MIN_LOS = 1;
const WK_ROOM_TYPE_MAX_LOS = 2;
public static $definition = array(
'table' => 'htl_room_type_restriction_date_range',
'primary' => 'id_rt_restriction',
'fields' => array(
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'min_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true, 'default' => 1),
'max_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true, 'default' => 0),
'date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true),
'date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate')
),
);
protected $webserviceParameters = array(
'objectMethods' => array(
'add' => 'addWs',
'update' => 'updateWs',
'delete' => 'deleteWs',
),
'objectsNodeName' => 'restriction_date_ranges',
'objectNodeName' => 'restriction_date_range',
'fields' => array(
'id_product' => array(
'xlink_resource' => array(
'resourceName' => 'room_types',
)
),
),
);
public function getRoomTypeLengthOfStayRestriction($idRoomType)
{
$sql = 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_restriction_date_range` WHERE `id_product` = '.(int)$idRoomType;
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}
public function getRoomTypeLengthOfStay($idRoomType, $date = false, $losRestrictionType = false)
{
$losRestriction = array();
// if date is given the return LOS for date range
if ($date) {
$date = date('Y-m-d', strtotime($date));
$sql = 'SELECT `min_los`, `max_los`
FROM `'._DB_PREFIX_.'htl_room_type_restriction_date_range`
WHERE `id_product` = '.(int) $idRoomType.' AND `date_from` <= \''.pSQL($date).'\' AND `date_to` > \''.pSQL($date).'\'';
$losRestriction = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
}
// if no LOS for date range the find it for room type
if (!$losRestriction) {
$sql = 'SELECT `min_los`, `max_los`
FROM `'._DB_PREFIX_.'htl_room_type`
WHERE `id_product` = '.(int) $idRoomType;
$losRestriction = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
}
if ($losRestriction) {
if ($losRestrictionType) {
if ($losRestrictionType == self::WK_ROOM_TYPE_MIN_LOS) {
return $losRestriction['min_los'];
} elseif ($losRestrictionType == self::WK_ROOM_TYPE_MAX_LOS) {
return $losRestriction['max_los'];
}
}
return $losRestriction;
}
return false;
}
public function validateRoomTypeLengthOfStayRestriction($dateFromRestriction, $dateToRestriction, $minLosDays, $maxLosDays)
{
$errors = array();
$objModule = Module::getinstanceByName('hotelreservationsystem');
foreach ($dateFromRestriction as $dateFromKey => $dateFrom) {
$dateTo = $dateToRestriction[$dateFromKey];
$minDay = $minLosDays[$dateFromKey];
$maxDay = $maxLosDays[$dateFromKey];
// validate the fields before saving in the table
if (!$minDay) {
$errors[] = $objModule->l('Minimum length of stay is required.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} elseif (!Validate::isUnsignedInt($minDay)) {
$errors[] = $objModule->l('Minimum length of stay is invalid.', 'HotelRoomTypeLosDateRanges').'
[ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
}
if ($maxDay == null) {
$errors[] = $objModule->l('Maximum length of stay is required.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} elseif (!Validate::isUnsignedInt($maxDay)) {
$errors[] = $objModule->l('Maximum length of stay is invalid.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} elseif ($minDay && $maxDay > 0 && ($minDay > $maxDay)) {
$this->errors[] = Tools::displayError('Value of global maximum length of stay must be greater than global minimum length of stay.');
}
if (!$dateFrom || $dateFrom == '') {
$errors[] = $objModule->l('Date from is required.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} else {
$dateFrom = date('Y-m-d', strtotime($dateFrom));
if (!Validate::isDate($dateFrom)) {
$errors[] = $objModule->l('Date from is invalid.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
}
}
if (!$dateTo || $dateTo == '') {
$errors[] = $objModule->l('Date to is required.', 'HotelRoomTypeLosDateRanges').'
[ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} else {
$dateTo = date('Y-m-d', strtotime($dateTo));
if (!Validate::isDate($dateTo)) {
$errors[] = $objModule->l('Date to is invalid.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} elseif (strtotime($dateTo) <= strtotime($dateFrom)) {
$errors[] = $dateFrom.' and '.$dateTo . $objModule->l('\'Date to\' must be a greater than \'date from\'.', 'HotelRoomTypeLosDateRanges').
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
} else {
// validate date ranges from other date ranges
foreach ($dateToRestriction as $dateToKey => $newDateTo) {
if ($dateFromKey > $dateToKey) {
if (!((strtotime($dateFrom) < strtotime($dateFromRestriction[$dateToKey]) && strtotime($dateTo) <= strtotime($dateFromRestriction[$dateToKey])) || (strtotime($dateFrom) >= strtotime($newDateTo) && strtotime($dateTo) > strtotime($newDateTo)))) {
$errors[] = $objModule->l('Date ranges are conflicting with each other.', 'HotelRoomTypeLosDateRanges').' [ '.$objModule->l('Conflicting rows are', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).', '.($dateToKey+1).' ]';
}
}
}
}
}
}
return $errors;
}
// Webservice :: webservice add function
public function addWs($autodate = true, $null_values = false)
{
$objRoomType = new HotelRoomType();
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($this->id_product)) {
return $this->add($autodate, $null_values);
}
return false;
}
// Webservice :: webservice update function
public function updateWs($null_values = false)
{
$objRoomType = new HotelRoomType();
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($this->id_product)) {
return $this->update($null_values);
}
return false;
}
// Webservice :: webservice delete function
public function deleteWs()
{
return $this->delete();
}
}

View File

@@ -402,14 +402,14 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$rm_amount = $roomTypeDateRangePrice['total_price_tax_excl'];
$cart_data = array('room_num' => $obj_rm_info->room_num,
'room_type' => Product::getProductName((int)$id_product),
'date_from' => date('Y-M-d', strtotime($date_from)),
'date_to' => date('Y-M-d', strtotime($date_to)),
'amount' => $rm_amount,
'date_from' => Tools::displayDate($date_from),
'date_to' => Tools::displayDate($date_to),
'amount' => Tools::displayPrice($rm_amount),
'qty' => $num_day,
'rms_in_cart' => $rms_in_cart,
'total_amount' => $total_amount,
'total_amount' => Tools::displayPrice($total_amount),
'booking_stats' => $booking_stats,
'id_cart_book_data' => $obj_cart_book_data->id
'id_cart_book_data' => $obj_cart_book_data->id);
);
if ($obj_cart_book_data->id) {
@@ -443,7 +443,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$booking_stats = $obj_booking_dtl->getBookingData($bookingParams);
$cart_data = array(
'total_amount' => $total_amount,
'total_amount' => Tools::displayPrice($total_amount),
'rms_in_cart' => $rms_in_cart,
'booking_stats' => $booking_stats
);
@@ -490,7 +490,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$room_tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_.$tpl_path);
$cart_data = array(
'total_amount' => $total_amount,
'total_amount' => Tools::displayPrice($total_amount),
'room_tpl' => $room_tpl,
'rms_in_cart' => $rms_in_cart,
'booking_data' => $booking_data,

View File

@@ -66,6 +66,7 @@ class AdminOrderRestrictSettingsController extends ModuleAdminController
'max_order_date' => array(
'title' => $this->l('Maximum Booking Date'),
'align' => 'center',
'type' => 'date',
),
);
$this->bulk_actions = array(

View File

@@ -39,6 +39,7 @@ require_once 'classes/HotelRoomTypeGlobalDemand.php';
require_once 'classes/HotelRoomTypeGlobalDemandAdvanceOption.php';
require_once 'classes/HotelRoomTypeDemandPrice.php';
require_once 'classes/HotelRoomTypeDemand.php';
require_once 'classes/HotelRoomTypeRestrictionDateRange.php';
require_once 'classes/QloWebservice.php';
require_once 'classes/QloRoomType.php';
@@ -47,4 +48,4 @@ require_once 'classes/HotelBranchRefundRules.php';
// Web services classes
require_once 'classes/WebserviceSpecificManagementQlo.php';
require_once 'classes/WebserviceSpecificManagementHotelImages.php';
require_once 'classes/WebserviceSpecificManagementHotelImages.php';

View File

@@ -630,16 +630,16 @@ $(document).ready(function() {
btn.attr('data-id-cart', result.id_cart);
btn.attr('data-id-cart-book-data', result.id_cart_book_data);
html = "<tr>";
html += "<td>" + result.room_num + "</td>";
html += "<td>" + result.room_type + "</td>";
html += "<td>" + result.date_from + " To " + result.date_to + "</td>";
html += "<td>" + currency_prefix + result.amount + currency_suffix + "</td>";
html += "<td><button class='btn btn-default ajax_cart_delete_data' data-id-product='" + id_prod + "' data-id-hotel='" + id_hotel + "' data-id-cart='" + result.id_cart + "' data-id-cart-book-data='" + result.id_cart_book_data + "' data-date-from='" + date_from + "' data-date-to='" + date_to + "'><i class='icon-trash'></i></button></td>";
html += "<td class='text-center'>" + result.room_num + "</td>";
html += "<td class='text-center'>" + result.room_type + "</td>";
html += "<td class='text-center'>" + result.date_from + " - " + result.date_to + "</td>";
html += "<td class='text-center'>" + result.amount + "</td>";
html += "<td class='text-center'><button class='btn btn-default ajax_cart_delete_data' data-id-product='" + id_prod + "' data-id-hotel='" + id_hotel + "' data-id-cart='" + result.id_cart + "' data-id-cart-book-data='" + result.id_cart_book_data + "' data-date-from='" + date_from + "' data-date-to='" + date_to + "'><i class='icon-trash'></i></button></td>";
html += "</tr>";
$('.cart_tbody').append(html);
$('#cart_total_amt').html(currency_prefix + result.total_amount + currency_suffix);
$('#cart_total_amt').html(result.total_amount);
// $('#cart_record').html(result.rms_in_cart);
// For Stats
@@ -701,16 +701,16 @@ $(document).ready(function() {
btn.attr('data-id-cart-book-data', result.id_cart_book_data);
html = "<tr>";
html += "<td>" + result.room_num + "</td>";
html += "<td>" + result.room_type + "</td>";
html += "<td>" + result.date_from + " To " + result.date_to + "</td>";
html += "<td>" + currency_prefix + result.amount + currency_suffix + "</td>";
html += "<td><button class='btn btn-default ajax_cart_delete_data' data-id-product='" + id_prod + "' data-id-hotel='" + id_hotel + "' data-id-cart='" + result.id_cart + "' data-id-cart-book-data='" + result.id_cart_book_data + "' data-date-from='" + date_from + "' data-date-to='" + date_to + "'><i class='icon-trash'></i></button></td>";
html += "<td class='text-center'>" + result.room_num + "</td>";
html += "<td class='text-center'>" + result.room_type + "</td>";
html += "<td class='text-center'>" + result.date_from + " - " + result.date_to + "</td>";
html += "<td class='text-center'>" + result.amount + "</td>";
html += "<td class='text-center'><button class='btn btn-default ajax_cart_delete_data' data-id-product='" + id_prod + "' data-id-hotel='" + id_hotel + "' data-id-cart='" + result.id_cart + "' data-id-cart-book-data='" + result.id_cart_book_data + "' data-date-from='" + date_from + "' data-date-to='" + date_to + "'><i class='icon-trash'></i></button></td>";
html += "</tr>";
$('.cart_tbody').append(html);
$('#cart_total_amt').html(currency_prefix + result.total_amount + currency_suffix);
$('#cart_total_amt').html(result.total_amount);
// $('#cart_record').html(result.rms_in_cart);
// For Stats
@@ -763,8 +763,10 @@ $(document).ready(function() {
$(".cart_booking_btn").attr('disabled', 'true');
}
btn.parent().parent().remove();
$('#cart_total_amt').html(currency_prefix + result.total_amount + currency_suffix);
btn.hide(400, function () {
btn.closest('tr').remove();
});
$('#cart_total_amt').html(result.total_amount);
// $('#cart_record').html(result.rms_in_cart);
// For Stats

View File

@@ -215,7 +215,7 @@
{foreach from=$book_v['data']['available'] key=avai_k item=avai_v}
<tr>
<td>{$avai_v['room_num']|escape:'htmlall':'UTF-8'}</td>
<td>{$date_from|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$date_to|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'}</td>
<td>{dateFormat date=date('Y-m-d', strtotime($date_from))} - {dateFormat date=date('Y-m-d', strtotime($date_to))}</td>
<td>{$avai_v['room_comment']|escape:'htmlall':'UTF-8'}</td>
<td>
{foreach $allotment_types as $allotment_type}
@@ -255,7 +255,7 @@
{foreach from=$part_v['avai_dates'] key=sub_part_k item=sub_part_v}
<tr>
<td class="text-center">
<p>{$sub_part_v['date_from']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$sub_part_v['date_to']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'}</p>
<p>{dateFormat date=date('Y-m-d', strtotime($sub_part_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($sub_part_v['date_to']))}</p>
</td>
<td class="text-left">
{foreach $allotment_types as $allotment_type}
@@ -299,7 +299,7 @@
<table class="table">
{foreach from=$booked_v['detail'] key=rm_dtl_k item=rm_dtl_v}
<tr>
<td class="col-xs-3">{$rm_dtl_v['date_from']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$rm_dtl_v['date_to']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'}</td>
<td class="col-xs-3">{dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_to']))}</td>
<td class="col-xs-3">{$rm_dtl_v['comment']|escape:'htmlall':'UTF-8'}</td>
<td class="col-xs-3">
{if $rm_dtl_v['booking_type'] == HotelBookingDetail::ALLOTMENT_AUTO}{l s='Auto Allotment' mod='hotelreservationsystem'}{elseif $rm_dtl_v['booking_type'] == HotelBookingDetail::ALLOTMENT_MANUAL}{l s='Manual Allotment' mod='hotelreservationsystem'}{/if}
@@ -368,10 +368,10 @@
<table class="table table-responsive addtocart-table">
<thead class="cart-table-thead">
<tr>
<th>{l s='Room No.' mod='hotelreservationsystem'}</th>
<th>{l s='Room Type' mod='hotelreservationsystem'}</th>
<th>{l s='Duration' mod='hotelreservationsystem'}</th>
<th>{l s='Amount (Tax excl.)' mod='hotelreservationsystem'}</th>
<th class="text-center">{l s='Room No.' mod='hotelreservationsystem'}</th>
<th class="text-center">{l s='Room Type' mod='hotelreservationsystem'}</th>
<th class="text-center">{l s='Duration' mod='hotelreservationsystem'}</th>
<th class="text-center">{l s='Amount (Tax excl.)' mod='hotelreservationsystem'}</th>
<th></th>
</tr>
</thead>
@@ -379,13 +379,11 @@
{if isset($cart_bdata)}
{foreach $cart_bdata as $cart_data}
<tr>
<td>{$cart_data['room_num']|escape:'htmlall':'UTF-8'}</td>
<td>{$cart_data['room_type']|escape:'htmlall':'UTF-8'}</td>
<td>
{$cart_data['date_from']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$cart_data['date_to']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'}
</td>
<td>{convertPrice price=$cart_data['amt_with_qty']}</td>
<td><button class="btn btn-default ajax_cart_delete_data" data-id-product="{$cart_data['id_product']|escape:'htmlall':'UTF-8'}" data-id-hotel="{$cart_data['id_hotel']|escape:'htmlall':'UTF-8'}" data-id-cart="{$cart_data['id_cart']|escape:'htmlall':'UTF-8'}" data-id-cart-book-data="{$cart_data['id_cart_book_data']|escape:'htmlall':'UTF-8'}" data-date-from="{$cart_data['date_from']|escape:'htmlall':'UTF-8'}" data-date-to="{$cart_data['date_to']|escape:'htmlall':'UTF-8'}"><i class='icon-trash'></i></button></td>
<td class="text-center">{$cart_data['room_num']|escape:'htmlall':'UTF-8'}</td>
<td class="text-center">{$cart_data['room_type']|escape:'htmlall':'UTF-8'}</td>
<td class="text-center">{dateFormat date=$cart_data['date_from']} - {dateFormat date=$cart_data['date_to']}</td>
<td class="text-center">{convertPrice price=$cart_data['amt_with_qty']}</td>
<td class="text-center"><button class="btn btn-default ajax_cart_delete_data" data-id-product="{$cart_data['id_product']|escape:'htmlall':'UTF-8'}" data-id-hotel="{$cart_data['id_hotel']|escape:'htmlall':'UTF-8'}" data-id-cart="{$cart_data['id_cart']|escape:'htmlall':'UTF-8'}" data-id-cart-book-data="{$cart_data['id_cart_book_data']|escape:'htmlall':'UTF-8'}" data-date-from="{$cart_data['date_from']|escape:'htmlall':'UTF-8'}" data-date-to="{$cart_data['date_to']|escape:'htmlall':'UTF-8'}"><i class='icon-trash'></i></button></td>
</tr>
{/foreach}
{/if}
@@ -395,7 +393,7 @@
<div class="row cart_amt_div">
<table class="table table-responsive">
<tr>
<th colspan="2">{l s='Total Amount' mod='hotelreservationsystem'}</th>
<th colspan="2">{l s='Total Amount (Tax incl.):' mod='hotelreservationsystem'}</th>
<th colspan="2" class="text-right" id="cart_total_amt">
{if isset($cart_tamount)}{convertPrice price=$cart_tamount}{else}0{/if}
</th>
@@ -521,9 +519,6 @@
{addJsDefL name=remove}{l s='Remove' js=1 mod='hotelreservationsystem'}{/addJsDefL}
{addJsDefL name=noRoomTypeAvlTxt}{l s='No room type available.' js=1 mod='hotelreservationsystem'}{/addJsDefL}
{addJsDef currency_prefix = $currency->prefix}
{addJsDef currency_suffix = $currency->suffix}
{addJsDef currency_sign = $currency->sign}
{addJsDef currency_format = $currency->format}
{addJsDef currency_blank = $currency->blank}

View File

@@ -0,0 +1,4 @@
Changelog
v1.0.0
- first release

View File

@@ -0,0 +1,80 @@
1. Definitions
--------------
"Webkul" means Webkul Software Pvt. Ltd.
"Customization" means those services by which functionality / features are added to a product that are not included in the base installation of a product, which are aimed to suit the specific needs of the customer.
"Module" means the custom add-on module to be developed and provided by Webkul to you in accordance with this policy and the Order Form.
"Order Form" means the order form (electronic or hard copy), accepted by Webkul, through which you ordered the Module to be developed and provided by Webkul and which sets out the details, specifications and parameters of the customized Module to be provided.
"Software" means the software licensed by Webkul to you pursuant to the terms and conditions of a Webkul Software License Agreement.
2. Module Development
---------------------
All customization Services and use of the Module are subject to the terms and conditions of Webkul’s Software Licence Agreement, found on Webkul’s website, and are also subject to the terms and conditions set forth in the Order Form, as well as the customization parameters. No other customization services will be provided unless expressly agreed upon by you and Webkul in writing, signed by authorized representatives of you and Webkul.
3. Customization Services
-------------------------
Customization Services will be provided in accordance with the terms of the Order Form and subject to the conditions set forth on the Order Form including full payment of all fees and adherence to all time limits and scheduling restrictions.
If expressly stated on the Order Form, the Customization Services and Module shall be subject to acceptance by you in accordance with the acceptance criteria set forth in the Order Form. Where there is no acceptance criteria set forth on the Order Form, acceptance shall be deemed to occur upon the earliest of:
completion of the acceptance criteria,
Webkul's completion of the Customization Services and written notification to you of such completion,
your use of the Module in other than a test environment.
Notwithstanding the foregoing, if acceptance testing, delivery or completion is delayed by thirty (30) days or more for reasons not related to Webkul’s performance, you must pay the value of any milestone that is contingent on acceptance. Such acceptance does not negate any warranty rights that you may have respecting the Module, as set forth herein. You are solely responsible for preparing your facilities and equipment for installation of the Module, where applicable.
Webkul will make reasonable efforts to accommodate your time and deadline requirements with respect to the performance of Customization Services; however, meeting such requirements is subject to availability of resources, both human and equipment at the time of your request and is dependent on your availability to provide input and to perform necessary actions. Webkul shall not be liable in any way for any delay or damage arising from Webkul’s failure to meet such of your requirements or any deadlines.
Any changes to the Customization Services or Module requirements after execution of the Order Form will be subject to a cost and delivery re-assessment, and a written change order or re-quote that has been mutually agreed upon by you and Webkul in writing. Webkul reserves the right to make changes in the design of its Software without the obligation to make equivalent changes to the Module.
If, pursuant to your request, Webkul reviews drawings and documents prepared by others in connection with the Customization Services, including your personnel and other consultants, contractors, and suppliers, Webkul’s review of such drawings and documents shall be only to confirm general compliance with the intent of the design and information given, and shall not constitute acceptance by Webkul of any responsibility for correctness of specifications or details of such drawings and documentation. Webkul shall be entitled to rely on all information provided, and decisions and approvals made, by you in connection with Webkul’s work hereunder. You agree that Webkul and its personnel shall not be subject to any liability or costs relating to the Customization Services to the extent such liability and costs are attributable to any information provided by you that is not complete, accurate or current in all material respects.
The Module, and all parts thereof, shall at all times be treated as Software licensed to you under the terms and conditions of the Licence Agreement.
4. Term and Termination
-----------------------
The term of the Development Services, if any, shall be as set out on the Order Form.
Customization Services may be terminated by Webkul immediately upon notice for cause if:
you materially breach any agreement entered into between you and Webkul, including Webkul’s Licence Agreement and/or any User / software license agreement relating to Webkul’s products (or you consistently fail to properly perform and observe your obligations under such agreements or any applicable Webkul Software policy), and you fail to rectify the situation within ten (10) calendar days of notice from Webkul; or
you become insolvent, or a receiver or receiver-manager is appointed for any part of your property, or you make an assignment, proposal or arrangement for the benefit of your creditors or you file an assignment in bankruptcy, or any proceedings under any bankruptcy or insolvency laws are commenced against you.
Webkul shall have the right to terminate Customization Services immediately upon notice to you, without penalty or refund, if any agreement relating to the Software is terminated for any reason.
Each party shall have the right to terminate the Development Services for convenience upon ninety (90) days’ notice to the other party.
Termination of the Customization Services or any agreement shall not affect your payment obligation for any Customization Services performed by Webkul prior to the date of termination, regardless of whether you have had, as at the date of termination, any use of the Module or part thereof. In the event that the Customization Services are terminated prior to the delivery of the Module to you, Webkul shall not be obligated to deliver any work-in-progress or any portion of the Module to you, unless otherwise expressly agreed by the parties in writing.
5. Fees
-------
You shall pay fees for the Customization Services and Module license in accordance with the fee schedule set forth in the Order Form. Webkul shall submit invoices to you for all fees and payments due, including applicable expenses, on a monthly basis in arrears. You shall pay to Webkul the full amount of each invoice received from Webkul within seven (7) days of receipt of the invoice. All invoices shall detail the nature of the Customization Services performed, the fees payable, and the basis on which the calculation of the fees has been made.
You are responsible for, and shall pay all taxes relating to the Customization Services and the Module. Unless otherwise indicated, all amounts payable by you under an Order Form are exclusive of any tax, duty, levy, or similar government charge that may be assessed by any jurisdiction, whether based on gross revenue, the delivery, possession or use of the Module, other Software or Customization Services, or otherwise.
If you fail to pay any amount due within thirty (30) days of such payment becoming due and payable, in addition to any other rights and remedies available to Webkul, Webkul shall be entitled to charge interest on all outstanding amounts at the lesser of 18% per annum or the maximum rate permitted by law, such interest commencing as of the due date for such payment. You shall also be responsible for paying for all reasonable fees and costs incurred by Webkul, including legal fees, in collecting any overdue amounts or enforcing any provision of any agreement entered into between you and Webkul.
Pricing is subject to Webkul’s understanding of the project requirements, the terms of this policy and the Order Form. Webkul reserves the right to invoice you for additional Customization Services requested by you, or that are required based on incomplete details or specifications provided by you, that are not specified in the Order Form but are provided by Webkul to you, provided that Webkul provides you with notice that such additional Customization Services are not included in the Order Form and are subject to Webkul’s then current time and materials fee schedule for such Customization Services. Invoices for such additional Customization Services shall be subject to payment in accordance with this Section.
6. Intellectual Property Rights
-------------------------------
Webkul shall own all intellectual property rights (whether or not patentable or registrable under copyright, trade-mark or similar legislation or subject to analogous protection) in and to the Module, and all work conceived, created, invented, produced, designed or reduced to practice by Webkul and its personnel as a result of or with respect to any and all Customization Services provided to you. Your rights and obligations relating to the use of the Module shall be governed by the terms of the applicable Webkul Software License Agreement regardless of whether you may have contributed to any Module in any way. The foregoing shall not be deemed to transfer ownership to Webkul of any pre-existing intellectual property rights that you may have in the materials that you provide to Webkul in order to permit Webkul to perform the Customization Services; however, to the extent that you have provided such materials to Webkul, you hereby grant Webkul a non-exclusive, non-transferable, royalty-free license to use all such materials for the purposes of performing the Customization Services and providing you with the Module.
7. Limited Warranty and Limitation of Liability
-----------------------------------------------
Limited Warranty: Webkul warrants that all services provided by Webkul shall be provided in a competent, professional manner by persons who are fully trained and qualified to perform the Customization Services. Webkul does not represent or warrant that the Customization Services or Module provided hereunder will be capable of achieving a particular result for your business, or that the operation of the Module will be error free or uninterrupted, or that all errors in the Module can be found or corrected, although Webkul shall use commercially reasonable efforts to do so. Without limiting the foregoing, this warranty is valid only for the six (6) months following the acceptance date as set forth in Section 3(b). The above warranty shall not apply to defects or non-conformities resulting from:
improper or inadequate maintenance or installation of the Module
use of the Module in combination with software, interfaces, or other materials that are not supplied or specifically authorized by Webkul,
unauthorized or improper use or modification of the Module, including use that is not contemplated in the Order Form or instructions provided by Webkul,
abuse, negligence, accident, or other damage from external sources, or
improper preparation of your facilities or equipment for installation and use or the Module.
Limitation of Liability:
save as otherwise provided in a written agreement between you and Webkul, and to the maximum extent permitted by applicable law, Webkul makes no warranty or condition, express or implied, statutory or otherwise, with respect to the module or the Customization services, including, without limitation, the implied warranties or conditions of merchantability and fitness for a particular purpose.
in no event shall Webkul be liable to you or any other person for any indirect, special, punitive, exemplary, consequential or incidental damages (including without limitation, damages for loss of revenues or profits, business interruption, loss of business information, and the like) arising out of the use, inability to use or the performance or non-performance of, the module or the provision of the Customization services, even if Webkul has been advised of the possibility of such damage or claim, or it is foreseeable.
in no event shall Webkul’s maximum aggregate liability to you for direct damages exceed the total amount paid by you for the Customization services performed by Webkul within the six (6) months preceding the date on which the claim arose.
8. General Terms and Conditions
-------------------------------
As Webkul is primarily a plugin and app development company and its main focus is on constant plugin development fulfilling various latest requirements and keeping up with the latest trends, Webkul has all the right to release the same customized plugin as a new plugin in future to be available to all its customers. The same may include few or every feature of the customisation. Webkul reserve all the rights to do the same as the customisation done for the client is Intellectual property of Webkul.
The customization undertaken by Webkul would be identical to the discussed requirements, and would not include any sort of additional changes or alterations. Any additional changes or alterations would be considered as a separate project and would be charged separately.
Webkul would be providing customization support for only one month from the delivery of the project. For any further support extended to you, the same shall be charged separately which includes specifically any further help or bug /error fix.
The cost of customization doesn’t include the cost of extension installation or exchange of the extension, if it has not been specifically quoted within the project cost.
During the project customization, you ought not to edit or change any of the files and it is also advisable to have a backup every-time a change is made. If you, on your own, are making certain changes, it is advisable to back up the files, folder and database. Before doing anything on your own, you need to inform Webkul if Webkul is working on the project or your support period is subsisting.
The customization charge will include a single template. Any time during or after the customization if you change the template, you shall be wholly and solely liable for any loss or damage emanating from the same. Webkul will not be responsible for any loss or damage done due to the same.
All the communication will take place through Webkul’s help desk system only. If the need arises, the issues can be discussed via Skype once in week or month. Webkul does not allow screen sharing and remote desktop.
Customization cost will not include any free consulting beyond the scope of the project.
If while making any changes by yourself or by your team, something gets damaged, then Webkul will not be responsible for it. This includes any issues faced by you for your own fault even during the support period of the module or project.
Webkul will not be responsible for any damages during the customization. It is advised that you must have a proper backup management system deployed.
The terms and conditions of this Policy shall be governed by Indian Laws, and the courts in Delhi alone shall only have exclusive jurisdiction to resolve/ adjudicate upon any disputes.
If any dispute arises between webkul and you/Licensee at any time, in connection with the validity, interpretation, implementation or alleged breach of any provision of this Agreement, the same shall be referred to a sole Arbitrator who shall be an independent and neutral third party appointed exclusively by Webkul. You shall not object to the appointment of the Arbitrator so appointed by Webkul. The place of arbitration shall be Delhi, India. The Arbitration & Conciliation Act, 1996 as amended by The Arbitration & Conciliation (Amendment) Act, 2015, shall govern the arbitration proceedings. The arbitration proceedings shall be held in the English language.

View File

@@ -0,0 +1,223 @@
SOFTWARE LICENCE AGREEMENT
===============================
This AGREEMENT is made effective on the date of the purchase of the software between Webkul Software Pvt. Ltd.,Company incorporated under the Companies Act, 1956 (hereinafter referred to as “Licensor"), and the purchaser of the software/ product (hereinafter referred to as "Licensee").
Preamble
==================
Licensor is a web and mobile product based organization engaged in the business of developing and marketing software for enterprise level e-commerce businesses. It is an ISO and NSR (NASSCOM) certified organization having a team of more than 150 creative engineers which come from different backgrounds. It has developed more than 700 web extensions and apps in the past few years for open source platforms which are used and trusted globally. Licensee now wishes to obtain license, and Licensor wishes to grant a license, to allow use of the software so purchased in developing the e-commerce business website/ mobile app of the Licensee, subject to the terms and conditions set forth herein.
THEREFORE, with the intent to be legally bound, the parties hereby agree as follows:
Agreement
================
1.Definitions :
------------------
As used in this Agreement, the following capitalized terms shall have the definitions set forth below:
"Derivative Works" are works developed by Licensee, its officers, agents, contractors or employees, which are based upon, in whole or in part, the Source Code and/or the Documentation and may also be based upon and/or incorporate one or more other preexisting works of the Licensor. Derivative Works may be any improvement, revision, modification, translation (including compilation or recapitulation by computer), abridgment, condensation, expansion, or any other form in which such a preexisting work may be recast, transformed, or adapted. For purposes hereof, a Derivative Work shall also include any compilation that incorporates such a preexisting work.
"Documentation" is written, printed or otherwise recorded or stored (digital or paper) material relating to the Software and/or Source Code, including technical specifications and instructions for its use including Software/ Source Code annotations and other descriptions of the principles of its operation and instructions for its use.
"Improvements" shall mean, with respect to the Software, all modifications and changes made, developed, acquired or conceived after the date hereof and during the entire term of this Agreement.
"Source Code" is the computer programming source code form of the Software in the form maintained by the Licensor, and includes all non-third-party executables, libraries, components, and Documentation created or used in the creation, development, maintenance, and support of the Software as well as all updates, error corrections and revisions thereto provided by Licensor, in whole or in part.
2. Software License.
-------------------------
(a)Grant of License. For the consideration set forth below, Licensor hereby grants to Licensee, and Licensee hereby accepts the worldwide, non-exclusive, perpetual, royalty-free rights and licenses set forth below:
(i)The right and license to use and incorporate the software, in whole or in part, to develop its website/ mobile app (including the integration of all or part of the Licensor’s software into Licensee's own software) on one domain ( Except Joomla modules , listed on store are entitled to be used on unlimited domain as per the standard guidelines ) only, solely for the own personal or business use of the Licensee. However, the License does not authorize the Licensee to compile, copy or distribute the said Software or its Derivative Works.
(ii)The right and license does not authorize the Licensee to make any backup or archival copies of the Software and / or the Source Code and Documentation.
(iii)The right and license does not authorize the Licensee to migrate the domain license to another domain.
(b)Scope; Rights and Responsibilities.
(i)Licensor shall enable the Licensee to download one complete copy of the Software.
(ii)The Software is intended for the sole use of the Licensee in development of its own website/ mobile app.
(iii)Licensee does not have the right to hand over, sell, distribute, sub-license, rent, lease or lend any portion of the Software or Documentation, whether modified or unmodified, to anyone. Licensee should not place the Software on a server so that it becomes accessible via a public network such as the Internet for distribution purposes. In case the Licensee is using any source code management system like github, it can use the code there only when it has paid subscription from such management system.
(iv)Licensee is not authorized to appoint, or work with, third parties to perform any development services using the Source Code, the source code to Derivative Works and/or the Documentation on behalf of, or working with, the Licensee. Release of Source Code, Derivative Work source code and/or Documentation to any third party shall be considered as violation of the Agreement, inter-alia entailing forthwith termination and legal action.
(c)Ownership.
(i)Software and Source Code. All right, title, copyright, and interest in the Software, Source Code, Software Modifications and Error corrections will be and remain the property of Licensor.
(ii)Derivative Works. As creation of Derivative Works by the Licensee is prohibited, thus, all right, title, copyright, and interest in any and/or all Derivative Works and Improvements created by, or on behalf of, Licensee will also be deemed to the property of Licensor. Licensor shall be entitled to protect copyright / intellectual property in all such Derivative Works and Improvements also in any country as it may deem fit including without limitation seeking copyright and/or patent protection.
3.Consideration.
--------------------
(a)Licensee shall pay to Licensor the amount as mentioned on the website from where the order is placed, as one-time, upfront fees in consideration for the licenses and rights granted hereunder (hereinafter referred to as the "License Fee"). The License Fee to be paid by Licensee shall be paid upfront at the time of placing the order, and no credit will be allowed under any circumstances.
(b)Once paid, the License Fees shall be non-refundable. The Licensee has fully satisfied itself about the Software and has seen the demonstration, and only thereafter has placed the order. Thus, the License Fees or any part thereof is non-refundable. No claim for refund of the Licence Fees shall be entertained under any circumstances.
4.Representations and Warranties.
-------------------------------------
(a)Mutual. Each of the parties represents and warrants to the other as follows.
(i)such party is a legal entity duly organized, validly existing and in good standing;
(ii)such party has the power and authority to conduct its business as presently conducted and to enter into, execute, deliver and perform this Agreement.
(iii)This Agreement has been duly and validly accepted by such party and constitutes the legal, valid and binding obligations of such party respectively, enforceable against such party in accordance with their respective terms;
(iv)the acceptance, execution, delivery and performance of this Agreement does not and will not violate such party's charter or by-laws; nor require any consent, authorization, approval, exemption or other action by any third party or governmental entity.
(b)Licensor warrants that, at the time of purchase of the Software:
the Software will function materially as set forth in the website or published functionality provided by Licensor to customers and potential customers describing the Software; and
Software add-ons, if purchased by the Licensee from the Licensor, will not materially diminish the features or functions of or the specifications of the Software as they existed as of the execution of this Agreement.
(c)Title. Licensor represents and warrants that it is the exclusive owner of all copyright/ intellectual property in the Software (including the Source Code) and has good and marketable title to the Software (including the Source Code) free and clear of all liens, claims and encumbrances of any nature whatsoever (collectively, "Liens"). Licensor's grant of license and rights to Licensee hereunder does not, and will not infringe any third party's property, intellectual property or personal rights.
5.Term.
-------------
(a)Subject to Licensee's payment obligations, this Agreement shall commence as on the date of making payment of the Software by the Licensee to the Licensor, and shall continue until terminated by either party.
(b)The Licensor retains the right to terminate the license at any time, if the Licensee is not abiding by any of the terms of the Agreement. The Licensee may terminate the Agreement at any time at its own discretion by uninstalling the Software and /or by destroying the said Software (or any copies thereof). However, the Licensee shall not be entitled to seek any refund of the amount paid by it to the Licensor, under any circumstances.
(c)Survival. In the event this Agreement is terminated for any reason, the provisions set forth in Sections 2(a), 2(b), and 2(c) shall survive.
6. Indemnification
----------------------
The Licensee release the Licensor from, and agree to indemnify, defend and hold harmless the Licensor (and its officers, directors, employees, agents and Affiliates) against, any claim, loss, damage, settlement, cost, taxes, expense or other liability (including, without limitation, attorneys' fees) (each, a "Claim") arising from or related to: (a) any actual or alleged breach of any obligations in this Agreement; (b) any refund, adjustment, or return of Software,(c) any claim for actual or alleged infringement of any Intellectual Property Rights made by any third party or damages related thereto; or (d) Taxes.
7. Limitation of Liability
------------------------------
The Licensor will not be liable for any direct, indirect, incidental, special, consequential or exemplary damages, including but not limited to, damages for loss of profits, goodwill, use, data or other intangible losses arising out of or in connection with the Software, whether in contract, warranty, tort etc. (including negligence, software liability, any type of civil responsibility or other theory or otherwise) to the Licensee or any other person for cost of software, cover, recovery or recoupment of any investment made by the Licensee or its affiliates in connection with this Agreement, or for any other loss of profit, revenue, business, or data or punitive or consequential damages arising out of or relating to this Agreement. Further, the aggregate liability of the Licensor, arising out of or in connection with this Agreement or the transactions contemplated hereby will not exceed at any time, or under any circumstances, the total amounts received by the Licensor from the Licensee in connection with the particular software giving rise to the claim.
8. Force Majeure
---------------------
The Licensor will not be liable for any delay or failure to perform any of its obligations under this Agreement by reasons, events or other matters beyond its reasonable control.
9. Relationship of Parties
------------------------------
The Licensor and Licensee are independent legal entities, and nothing in this Agreement will be construed to create a partnership, joint venture, association of persons, agency, franchise, sales representative, or employment relationship between the parties. The Licensee will have no authority to make or accept any offers or representations on behalf of the Licensor. The relationship between the parties is that of Licensor and Licensee only, and the rights, duties, liabilities of each party shall be governed by this Agreement.
10. Modification
------------------------
The Licensor may amend any of the terms and conditions contained in this Agreement at any time and solely at its discretion. Any changes will be effective upon the posting of such changes on the Portal/ website, and the Licensee is responsible for reviewing these changes and informing itself of all applicable changes or notices. The continued use of a software by the Licensee after posting of any changes by the Licensor, will constitute the acceptance of such changes or modifications by the Licensee.
11.Miscellaneous.
-----------------------
(a)General Provisions. This Agreement: (i) may be amended only by a writing signed by each of the parties; (ii) may be executed in several counterparts, each of which shall be deemed an original but all of which shall constitute one and the same instrument; (iii) contains the entire agreement of the parties with respect to the transactions contemplated hereby and supersedes all prior written and oral agreements, and all contemporaneous oral agreements, relating to such transactions; (iv) shall be governed by, and construed and enforced in accordance with, the laws of India; and (v) shall be binding upon, and inure to the benefit of, the parties and their respective successors and permitted assigns. Each of the parties hereby irrevocably submits to the jurisdiction of the Courts at Delhi, India, for the purposes of any action or proceeding arising out of or relating to this Agreement or the subject matter hereof and brought by any other party.
(b)Assignment. Licensee cannot assign, pledge or otherwise transfer, whether by operation of law or otherwise, this Agreement, or any of its obligations hereunder, without the prior written consent of Licensor, which consent shall not be unreasonably withheld.
(c)Notices. Unless otherwise specifically provided herein, all notices, consents, requests, demands and other communications required or permitted hereunder:
(i)shall be in writing;
(ii)shall be sent by messenger, certified or registered mail/email, or reliable express delivery service, to the appropriate address(es) set forth below; and
(iii)shall be deemed to have been given on the date of receipt by the addressee, as evidenced by a receipt executed by the addressee (or a responsible person in his or her office), the records of the Party delivering such communication or a notice to the effect that such addressee refused to claim or accept such communication, if sent by messenger, mail or express delivery service.
All such communications shall be sent to the following addresses or numbers, or to such other addresses or numbers as any party may inform the others by giving five days' prior notice:
If to Webkul Software Pvt. Ltd.:
Webkul Software Pvt. Ltd.
A-67, Sector 63, NOIDA – 201301,
Uttar Pradesh, India
If to Licensee:
At the address mentioned by the Licensee
(at the time of placing order of generating Invoice)
(d)Severability. It is the intent of the parties that the provisions of this Agreement be enforced to the fullest extent permissible under the laws and public policies of India in which enforcement hereof is sought. In furtherance of the foregoing, each provision hereof shall be severable from each other provision, and any provision hereof which is/ becomes unenforceable shall be subject to the following: (i) if such provision is contrary to or conflicts with any requirement of any statute, rule or regulation in effect, then such requirement shall be incorporated into, or substituted for, such unenforceable provision to the minimum extent necessary to make such provision enforceable; (ii) the court, agency or arbitrator considering the matter is hereby authorized to (or, if such court, agency or arbitrator is unwilling or fails to do so, then the parties shall) amend such provision to the minimum extent necessary to make such provision enforceable, and the parties hereby consent to the entry of an order so amending such provision; and (iii) if any such provision cannot be or is not reformed and made enforceable pursuant to clause (i) or (ii) above, then such provision shall be ineffective to the minimum extent necessary to make the remainder of this Agreement enforceable. Any application of the foregoing provisions to any provision hereof shall not effect the validity or enforceability of any other provision hereof.
(e)By purchasing the Software, the Licensee acknowledge that it has read this Agreement, and that it agrees to the content of the Agreement, its terms and agree to use the Software in compliance with this Agreement.
(f)The Licensor holds the sole copyright of the Software. The Software or any portion thereof is a copyrightable matter and is liable to be protected by the applicable laws. Copyright infringement in any manner can lead to prosecution according to the current law. The Licensor reserves the right to revoke the license of any user who is not holding any license or is holding an invalid license.
(g)This Agreement gives the right to use only one copy of the Software on one domain solely for the own personal or business use of the Licensee, subject to all the terms and conditions of this Agreement. A separate License has to be purchased for each new Software installation. Any distribution of the Software without the written consent of the Licensor (including non-commercial distribution) is regarded as violation of this Agreement, and will entail immediate termination of the Agreement and may invite liability, both civil and criminal, as per applicable laws.
(h)The Licensor reserves the rights to publish a selected list of users/ Licensees of its Software, and no permission of any Licensee is needed in this regard. The Licensee agrees that the Licensor may, in its sole discretion, disclose or make available any information provided or submitted by the Licensee or related to it under this Agreement to any judicial, quasi-judicial, governmental, regulatory or any other authority as may be required by the Licensor to co-operate and / or comply with any of their orders, instructions or directions or to fulfill any requirements under applicable Laws.
(i)If the Licensee continues to use the Software even after the sending of the notice by the Licensor for termination, the Licensee agree to accept an injunction to restrain itself from its further use, and to pay all costs (including but not limited to reasonable attorney fees) to enforce injunction or to revoke the License, and any damages suffered by the Licensor because of the misuse of the Software by the Licensee.
12. Arbitration
-----------------------
If any dispute arises between the Licensor and the Licensee at any time, in connection with the validity, interpretation, implementation or alleged breach of any provision of this Agreement, the same shall be referred to a sole Arbitrator who shall be an independent and neutral third party appointed exclusively by the Licensor. The Licensee shall not object to the appointment of the Arbitrator so appointed by the Licensor. The place of arbitration shall be Delhi, India. The Arbitration & Conciliation Act, 1996 as amended by The Arbitration & Conciliation (Amendment) Act, 2015, shall govern the arbitration proceedings. The arbitration proceedings shall be held in the English language.

View File

@@ -0,0 +1 @@
## QloApps Contact Block v1.0.0

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,158 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class QloBlockContact extends Module
{
public function __construct()
{
$this->name = 'qloblockcontact';
$this->tab = 'front_office_features';
$this->version = '1.0.0';
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6');
$this->author = 'Webkul';
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('QloApps Contact Block');
$this->description = $this->l('Allows admin to add customer service information to website navigation bar.');
$this->confirmUnsinstall = $this->l('Are you sure you want to uninstall?');
}
public function install()
{
if (!parent::install()
|| !Configuration::updateValue('QBC_PHONE', '')
|| !Configuration::updateValue('QBC_EMAIL', '')
|| !$this->registerHook('actionFrontControllerSetMedia')
|| !$this->registerHook('displayNav')
|| !$this->registerHook('displayExternalNavigationHook')
) {
return false;
}
return true;
}
public function getContent()
{
if (Tools::isSubmit('submitModuleConfig')) {
Configuration::updateValue('QBC_PHONE', Tools::getValue('QBC_PHONE'));
Configuration::updateValue('QBC_EMAIL', Tools::getValue('QBC_EMAIL'));
Tools::redirectAdmin(
$this->context->link->getAdminLink('AdminModules').'&configure='.$this->name.'&conf=6'
);
}
return $this->renderForm();
}
public function hookActionFrontControllerSetMedia()
{
$this->context->controller->addCSS($this->getPathUri().'views/css/hook/display-nav.css');
}
public function hookDisplayNav()
{
$this->smarty->assign(array(
'phone' => Configuration::get('QBC_PHONE'),
'email' => Configuration::get('QBC_EMAIL'),
));
return $this->display(__FILE__, 'display-nav.tpl');
}
public function renderForm()
{
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->l('Configuration'),
'icon' => 'icon-cogs',
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Phone'),
'hint' => $this->l('The phone number used for customer service.'),
'name' => 'QBC_PHONE',
'class' => 'fixed-width-xxl',
),
array(
'type' => 'text',
'label' => $this->l('Email'),
'hint' => $this->l('The email used for customer service.'),
'name' => 'QBC_EMAIL',
'class' => 'fixed-width-xxl',
),
),
'submit' => array(
'title' => $this->l('Save'),
)
),
);
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$this->fields_form = array();
$helper->identifier = $this->identifier;
$helper->submit_action = 'submitModuleConfig';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $this->getConfigFieldsValues(),
'languages' => $this->context->controller->getLanguages(),
'id_language' => $this->context->language->id
);
return $helper->generateForm(array($fields_form));
}
public function hookDisplayExternalNavigationHook()
{
$this->smarty->assign(array(
'phone' => Configuration::get('QBC_PHONE'),
'email' => Configuration::get('QBC_EMAIL'),
));
return $this->display(__FILE__, 'external-navigation-hook.tpl');
}
public function getConfigFieldsValues()
{
return array(
'QBC_PHONE' => Tools::getValue('QBC_PHONE', Configuration::get('QBC_PHONE')),
'QBC_EMAIL' => Tools::getValue('QBC_EMAIL', Configuration::get('QBC_EMAIL')),
);
}
public function uninstall()
{
if (!parent::uninstall()
|| !Configuration::deleteByName('QBC_PHONE')
|| !Configuration::deleteByName('QBC_EMAIL')
) {
return false;
}
return true;
}
}

View File

@@ -0,0 +1,43 @@
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
#nav-main .contact-item a {
color: #fff;
}
#nav-main .contact-item {
margin-right: 24px;
}
#nav-main .contact-item i {
font-size: 14px;
padding-right: 2px;
position: relative;
top: 1px;
}
@media (max-width: 767px) {
#nav-main .contact-item {
display: none;
}
}
#nav-main i.icon-phone {
font-size: 15px;
}

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,29 @@
<?php
/*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

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