diff --git a/Gruntfile.js b/Gruntfile.js index 0faaf5e888..e43a5bf25e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,8 @@ module.exports = function(grunt) { sourceMapRootpath: '../../' }, files: { - '<%= dirs.css %>/style.css': '<%= dirs.devLessSrc %>/style.less' + '<%= dirs.css %>/style.css': '<%= dirs.devLessSrc %>/style.less', + '<%= dirs.css %>/rtl.css': '<%= dirs.devLessSrc %>/rtl.less' } }, diff --git a/assets/css/rtl.css b/assets/css/rtl.css new file mode 100644 index 0000000000..4e2fbf494b --- /dev/null +++ b/assets/css/rtl.css @@ -0,0 +1,210 @@ +.dokan-right { + float: left !important; +} +.dokan-left { + float: right !important; +} +.dokan-w1, +.dokan-w2, +.dokan-w3, +.dokan-w4, +.dokan-w5, +.dokan-w6, +.dokan-w7, +.dokan-w8, +.dokan-w9, +.dokan-w10, +.dokan-w11, +.dokan-w12 { + float: right; +} +.dokan-form-horizontal .dokan-control-label { + text-align: left; + padding-left: 15px; +} +.dokan-form-group .checkbox input[type="checkbox"] { + float: right; + margin-left: 10px; +} +.dokan-form-group .ajax_prev { + margin-right: 23% !important; +} +.dokan-text-left { + text-align: right; +} +#dokan-comments-table td.col-author .dokan-author-img, +#dokan-comments-table th.col-author .dokan-author-img { + float: right !important; + margin-left: 5px !important; +} +#dokan-comments-table td.col-author .dokan-author-meta, +#dokan-comments-table th.col-author .dokan-author-meta { + float: right !important; +} +.dokan-dashboard .dokan-dashboard-content { + padding: 0 25px 0 0; +} +.dokan-dashboard .dokan-dashboard-content article.dashboard-content-area .dokan-dash-left { + padding-right: 0px; + padding-left: 15px; +} +.dokan-dashboard .dokan-dashboard-content article.dashboard-content-area .dashboard-widget .list-count .count { + float: left; +} +.dokan-dashboard .dokan-dashboard-content article.dashboard-content-area .dashboard-widget.orders .content-half-part { + float: right; +} +.dokan-dashboard .dokan-dashboard-content article.dokan-orders-area .dokan-order-left-content { + margin-right: 0; + margin-left: 3%; +} +.dokan-dashboard .dokan-dashboard-content article.dokan-orders-area .dokan-order-left-content .dokan-order-billing-address { + min-width: 49%; + margin-right: 0; + margin-left: 2%; +} +.dokan-dashboard .dokan-dashboard-content article.dokan-orders-area .dokan-order-left-content .dokan-order-shipping-address { + min-width: 49%; +} +.dokan-dashboard .dokan-dashboard-content .dokan-product-listing-area .product-listing-top .dokan-listing-filter { + float: right !important; +} +.dokan-dashboard .dokan-dashboard-content .dokan-product-listing-area .product-listing-top span.dokan-add-product-link a { + float: left !important; +} +.dokan-dashboard .dokan-dashboard-content .dokan-product-listing-area button[name="product_listing_search"] { + float: left !important; + margin-right: 5px; +} +.dokan-dashboard .dokan-dashboard-content .dokan-product-listing-area .dokan-product-date-filter .dokan-form-group { + float: right; +} +.dokan-dashboard .dokan-dashboard-content .dokan-product-listing-area .dokan-product-date-filter button { + float: right; + margin-right: 5px; +} +.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active:after { + left: 0px; + right: 93%; + border-width: 16px 0px 16px 16px; +} +.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.back a { + padding-left: 0px; + padding-right: 16px; +} +.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.back a i { + float: left; +} +.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i { + margin-top: 5px; +} +.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i.fa-angle-right { + padding-top: 0px; + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.dokan-common-links a { + padding: 5% 5%; +} +.dokan-dashboard .product-edit-new-container .dokan-edit-row .dokan-section-heading h2 { + float: right; +} +.dokan-dashboard .product-edit-new-container .dokan-edit-row .dokan-section-heading p { + float: right; + margin-right: 8px; +} +.dokan-dashboard .product-edit-new-container .dokan-edit-row .dokan-section-toggle { + float: left; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-attribute-wrapper ul { + padding-right: 0px; + margin-right: 0px; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-attribute-wrapper ul li.product-attribute-list .dokan-product-attribute-heading a.dokan-product-remove-attribute { + position: relative; + float: left; + right: 0px; + top: 0px; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-attribute-wrapper ul li.product-attribute-list .dokan-product-attribute-heading a.dokan-product-toggle-attribute { + left: 50px; + right: auto; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-attribute-type select { + margin-right: 0px; + margin-left: 10px; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-variation-wrapper .dokan-variations-container .dokan-product-variation-itmes h3.variation-topbar-heading strong { + float: right; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-variation-wrapper .dokan-variations-container .dokan-product-variation-itmes h3.variation-topbar-heading select { + float: right; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-variation-wrapper .dokan-variations-container .dokan-product-variation-itmes .actions { + left: 15px; + right: auto; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-variation-wrapper .dokan-variations-container .dokan-product-variation-itmes .dokan-variable-attributes .thumbnail-checkbox-options .upload_image { + float: right; +} +.dokan-dashboard .product-edit-new-container .dokan-attribute-variation-options .dokan-product-variation-wrapper .dokan-variations-container .dokan-product-variation-itmes .dokan-variable-attributes .thumbnail-checkbox-options .options { + float: right; + margin-right: 24px; +} +#dokan-seller-listing-wrap ul.dokan-seller-wrap li .store-footer .seller-avatar { + left: 20px; + right: auto; +} +.dokan-store-sidebar { + margin-right: 0 !important; + margin-left: 3%; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper .profile-info-summery .profile-info-head { + float: right; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper .profile-info-summery .profile-info { + float: right; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper .profile-info-summery .profile-info .store-name { + margin: 10px 15px 25px 15px; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout3 .profile-info-summery-wrapper .profile-info-summery .profile-info-head { + float: right; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout3 .profile-info-summery-wrapper .profile-info-summery .profile-info { + float: right; + width: 80%; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout3 .profile-info-summery-wrapper .profile-info-summery .profile-info .dokan-store-info li { + float: right; + margin-left: 40px; + margin-right: 0px; +} +.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout3 .profile-info-summery-wrapper .profile-info-summery .profile-info .dokan-store-info li.dokan-store-rating { + float: none !important; +} +.dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper .profile-info-summery .profile-info-head .profile-img img { + float: none; +} +.dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper .profile-info-summery .profile-info i { + float: right; + margin-right: -25px; + margin-left: 0; +} +@media (min-width: 1200px) { + .dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper .profile-info-summery .profile-info .store-social-wrapper { + left: 20px !important; + right: auto !important; + } +} +@media (max-width: 1199px) { + .dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper .profile-info-summery .profile-info .dokan-store-info { + padding-right: 40px; + } + .dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper .profile-info-summery .profile-info .dokan-store-info li { + text-align: right !important; + } +} diff --git a/assets/css/style.css b/assets/css/style.css index c25e925a79..fd7bda3c1d 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1732,6 +1732,66 @@ span.error { font-size: 2em; color: rgba(0, 0, 0, 0.75); } +.dokan-category-menu { + padding: 0; + border: 1px solid #ece7e7; +} +.dokan-category-menu h3.widget-title { + margin: 0; + padding: 10px 10px 10px 15px; + background: #eee; + border: 1px solid #eee; + color: #444; +} +.dokan-category-menu ul li { + border-bottom: none; +} +.dokan-category-menu #cat-drop-stack ul .children { + display: none; +} +.dokan-category-menu #cat-drop-stack ul li:last-child a { + border-bottom: none !important; +} +.dokan-category-menu #cat-drop-stack ul li:last-child.has-children a { + border-bottom: 1px solid #eee !important; +} +.dokan-category-menu #cat-drop-stack > ul { + padding: 0px; + margin: 0px; +} +.dokan-category-menu #cat-drop-stack > ul li { + padding: 0; +} +.dokan-category-menu #cat-drop-stack > ul li.parent-cat-wrap { + background: #fff; +} +.dokan-category-menu #cat-drop-stack > ul li.parent-cat-wrap a { + border-bottom: 1px solid #eee; + margin: 0px 15px; + text-decoration: none; +} +.dokan-category-menu #cat-drop-stack > ul li.parent-cat-wrap ul.level-0 { + background: #fafafa; +} +.dokan-category-menu #cat-drop-stack > ul li.parent-cat-wrap ul.level-0 li.has-children { + border-bottom: none; +} +.dokan-category-menu #cat-drop-stack > ul li a { + padding: 9px 0px; + display: block; + color: #3C3C3C; + position: relative; + font-size: 13px; + text-decoration: none; +} +.dokan-category-menu #cat-drop-stack > ul li a .caret-icon { + position: absolute; + right: -2px; + display: inline-block; + width: 20px; + vertical-align: middle; + text-align: center; +} .dokan-announcement-wrapper .dokan-no-announcement .annoument-no-wrapper { height: 100%; margin: 70px auto; @@ -2126,6 +2186,16 @@ div.media-sidebar a.edit-attachment { .dokan-dashboard .dokan-dashboard-content .dokan-page-help p { margin-bottom: 10px; } +.dokan-orders-content .dokan-orders-area .dokan-order-left-content { + margin-right: 3%; +} +.dokan-orders-content .dokan-orders-area .dokan-order-left-content .dokan-order-billing-address { + min-width: 49%; + margin-right: 2%; +} +.dokan-orders-content .dokan-orders-area .dokan-order-left-content .dokan-order-shipping-address { + min-width: 49%; +} .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach { padding: 10px 7px; } @@ -2278,6 +2348,12 @@ div.media-sidebar a.edit-attachment { .dokan-product-listing .dokan-product-listing-area .product-listing-top span.dokan-add-product-link { width: 30%; } +.dokan-product-listing .dokan-product-listing-area form.dokan-product-search-form button[name="product_listing_search"] { + float: right; +} +.dokan-product-listing .dokan-product-listing-area form.dokan-product-search-form .dokan-form-group { + float: right; +} .dokan-product-listing .dokan-product-listing-area table.product-listing-table span.product-type:before { font-family: FontAwesome; content: "\f133"; @@ -3686,6 +3762,7 @@ div.media-sidebar a.edit-attachment { float: left; padding: 0 25px; color: #444; + width: 80%; } .dokan-single-store .profile-frame.profile-frame-no-banner .profile-layout-layout3 .profile-info-summery-wrapper .profile-info-summery .profile-info .store-name { margin-top: 5px; diff --git a/assets/js/dokan.js b/assets/js/dokan.js index 6208044197..b3edb9e7bf 100644 --- a/assets/js/dokan.js +++ b/assets/js/dokan.js @@ -1937,4 +1937,30 @@ jQuery(function($) { resize_dummy_image(); }); -})(jQuery); \ No newline at end of file +})(jQuery); + +;( function ( $ ) { + + $( '#cat-drop-stack li.has-children' ).on( 'click', '> a span.caret-icon', function ( e ) { + e.preventDefault(); + var self = $( this ), + liHasChildren = self.closest( 'li.has-children' ); + + if ( !liHasChildren.find( '> ul.children' ).is( ':visible' ) ) { + self.find( 'i.fa' ).addClass( 'fa-rotate-90' ); + if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) { + self.closest( 'a' ).css( { 'borderBottom': 'none' } ); + } + } + + liHasChildren.find( '> ul.children' ).slideToggle( 'fast', function () { + if ( !$( this ).is( ':visible' ) ) { + self.find( 'i.fa' ).removeClass( 'fa-rotate-90' ); + + if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) { + self.closest( 'a' ).css( { 'borderBottom': '1px solid #eee' } ); + } + } + } ); + } ); +} )( jQuery ); \ No newline at end of file diff --git a/assets/src/js/script.js b/assets/src/js/script.js index dace9168b6..30e46d027c 100755 --- a/assets/src/js/script.js +++ b/assets/src/js/script.js @@ -683,4 +683,30 @@ jQuery(function($) { resize_dummy_image(); }); -})(jQuery); \ No newline at end of file +})(jQuery); + +;( function ( $ ) { + + $( '#cat-drop-stack li.has-children' ).on( 'click', '> a span.caret-icon', function ( e ) { + e.preventDefault(); + var self = $( this ), + liHasChildren = self.closest( 'li.has-children' ); + + if ( !liHasChildren.find( '> ul.children' ).is( ':visible' ) ) { + self.find( 'i.fa' ).addClass( 'fa-rotate-90' ); + if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) { + self.closest( 'a' ).css( { 'borderBottom': 'none' } ); + } + } + + liHasChildren.find( '> ul.children' ).slideToggle( 'fast', function () { + if ( !$( this ).is( ':visible' ) ) { + self.find( 'i.fa' ).removeClass( 'fa-rotate-90' ); + + if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) { + self.closest( 'a' ).css( { 'borderBottom': '1px solid #eee' } ); + } + } + } ); + } ); +} )( jQuery ); \ No newline at end of file diff --git a/assets/src/less/general.less b/assets/src/less/general.less index 0bc4cdeb8b..2b43241264 100644 --- a/assets/src/less/general.less +++ b/assets/src/less/general.less @@ -172,3 +172,91 @@ span.error { font-size: 2em; color: rgba(0, 0, 0, .75) } + +.dokan-category-menu { + padding: 0; + border: 1px solid #ece7e7; + + h3.widget-title { + margin: 0; + padding: 10px 10px 10px 15px; + background: #eee; + border: 1px solid #eee; + color: #444; + } + + ul li { + border-bottom: none; + } + + #cat-drop-stack { + ul { + .children { + display: none; + } + + li { + &:last-child { + a { + border-bottom: none !important; + } + + &.has-children { + a { + border-bottom: 1px solid #eee !important; + } + } + } + } + } + + > ul { + padding: 0px; + margin: 0px; + + li { + padding:0; + + &.parent-cat-wrap { + background: #fff; + + a { + border-bottom: 1px solid #eee; + margin: 0px 15px; + text-decoration: none; + + } + + ul { + &.level-0 { + background: #fafafa; + li { + &.has-children { + border-bottom: none; + } + } + } + } + } + + a { + padding: 9px 0px; + display: block; + color: #3C3C3C; + position: relative; + font-size: 13px; + text-decoration: none; + + .caret-icon { + position: absolute; + right: -2px; + display: inline-block; + width: 20px; + vertical-align: middle; + text-align: center; + } + } + } + } + } +} \ No newline at end of file diff --git a/assets/src/less/orders.less b/assets/src/less/orders.less index 1fc437281d..73fdb409dc 100644 --- a/assets/src/less/orders.less +++ b/assets/src/less/orders.less @@ -2,6 +2,19 @@ .dokan-orders-area { + .dokan-order-left-content { + margin-right: 3%; + + .dokan-order-billing-address { + min-width: 49%; + margin-right:2%; + } + + .dokan-order-shipping-address { + min-width: 49%; + } + } + .dokan-order-filter-serach { padding:10px 7px; } diff --git a/assets/src/less/products.less b/assets/src/less/products.less index 9fd9998b42..3eb8912ec7 100644 --- a/assets/src/less/products.less +++ b/assets/src/less/products.less @@ -46,6 +46,16 @@ } } + form.dokan-product-search-form { + button[name="product_listing_search"] { + float: right; + } + + .dokan-form-group { + float: right; + } + } + table.product-listing-table { span.product-type:before { font-family: FontAwesome; diff --git a/assets/src/less/rtl.less b/assets/src/less/rtl.less new file mode 100644 index 0000000000..7402d9cb82 --- /dev/null +++ b/assets/src/less/rtl.less @@ -0,0 +1,389 @@ +.dokan-right { + float: left !important; +} + +.dokan-left { + float: right !important; +} + +.dokan-w1, .dokan-w2, .dokan-w3, .dokan-w4, .dokan-w5, .dokan-w6, .dokan-w7, .dokan-w8, .dokan-w9, .dokan-w10, .dokan-w11, .dokan-w12 { + float:right; +} + +.dokan-form-horizontal { + .dokan-control-label { + text-align: left; + padding-left: 15px; + } +} + +.dokan-form-group { + .checkbox { + input[type="checkbox"] { + float:right; + margin-left: 10px; + } + } + + .ajax_prev { + margin-right: 23% !important; + } +} + +.dokan-text-left { + text-align: right; +} + +#dokan-comments-table { + td.col-author, + th.col-author { + .dokan-author-img { + float: right !important; + margin-left: 5px !important; + } + + .dokan-author-meta { + float: right !important; + } + } + +} + +.dokan-dashboard { + + .dokan-dashboard-content { + padding: 0 25px 0 0; + + article.dashboard-content-area { + .dokan-dash-left { + padding-right: 0px; + padding-left: 15px; + } + .dashboard-widget { + .list-count { + .count { + float:left; + } + } + &.orders { + .content-half-part { + float: right; + } + } + } + } + + article.dokan-orders-area { + .dokan-order-left-content { + margin-right: 0; + margin-left: 3%; + + .dokan-order-billing-address { + min-width: 49%; + margin-right:0; + margin-left:2%; + } + + .dokan-order-shipping-address { + min-width: 49%; + } + } + } + + .dokan-product-listing-area { + .product-listing-top { + .dokan-listing-filter { + float: right !important; + } + + span.dokan-add-product-link { + a { + float: left !important; + } + } + } + + button[name="product_listing_search"] { + float: left !important; + margin-right: 5px; + } + + .dokan-product-date-filter { + .dokan-form-group { + float: right; + } + + button { + float: right; + margin-right: 5px; + } + } + } + } + + .dokan-dash-sidebar { + ul.dokan-dashboard-menu { + li { + &.active { + &:after { + left: 0px; + right: 93%; + border-width: 16px 0px 16px 16px; + } + } + + &.back { + a { + padding-left: 0px; + padding-right: 16px; + + i { + float: left; + } + } + } + + a { + i { + margin-top: 5px; + + &.fa-angle-right { + padding-top: 0px; + -webkit-transform: rotate( 180deg ); + -moz-transform: rotate( 180deg ); + -o-transform: rotate( 180deg ); + -ms-transform: rotate( 180deg ); + transform: rotate( 180deg ); + } + } + } + + &.dokan-common-links { + a { + padding: 5% 5%; + } + } + } + } + } + + .product-edit-new-container { + .dokan-edit-row { + .dokan-section-heading { + h2 { + float: right; + } + + p { + float: right; + margin-right: 8px; + } + } + + .dokan-section-toggle { + float: left; + } + } + .dokan-attribute-variation-options { + .dokan-product-attribute-wrapper { + ul { + padding-right: 0px; + margin-right: 0px; + + li.product-attribute-list { + .dokan-product-attribute-heading { + a.dokan-product-remove-attribute { + position: relative; + float: left; + right: 0px; + top:0px + } + + a.dokan-product-toggle-attribute { + left: 50px; + right: auto; + } + } + } + } + } + + .dokan-attribute-type { + select { + margin-right: 0px; + margin-left: 10px; + } + } + + .dokan-product-variation-wrapper { + .dokan-variations-container { + .dokan-product-variation-itmes { + h3.variation-topbar-heading { + strong { + float: right; + } + + select { + float: right; + } + } + + .actions { + left: 15px; + right: auto; + } + + .dokan-variable-attributes { + .thumbnail-checkbox-options { + .upload_image { + float: right; + } + .options { + float: right; + margin-right: 24px; + } + } + } + } + } + } + } + } +} + +#dokan-seller-listing-wrap { + ul.dokan-seller-wrap { + li { + .store-footer { + .seller-avatar { + left: 20px; + right: auto; + } + } + } + } +} + +.dokan-store-sidebar { + margin-right: 0 !important; + margin-left: 3%; +} + +.dokan-single-store { + .profile-frame { + .profile-info-box { + &.profile-layout-layout1 { + .profile-info-summery-wrapper { + .profile-info-summery { + .profile-info-head { + float:right; + } + .profile-info { + float:right; + .store-name { + margin: 10px 15px 25px 15px; + } + } + } + } + } + + &.profile-layout-layout3 { + .profile-info-summery-wrapper { + .profile-info-summery { + .profile-info-head { + float:right; + } + .profile-info { + float:right; + width: 80%; + + .dokan-store-info { + li { + float: right; + margin-left: 40px; + margin-right: 0px; + + &.dokan-store-rating { + float: none !important; + } + } + } + } + } + } + } + + .profile-info-summery-wrapper { + .profile-info-summery { + .profile-info-head { + .profile-img { + img { + float:none; + } + } + } + + .profile-info { + i { + float: right; + margin-right: -25px; + margin-left: 0; + } + } + } + } + } + } +} + +@media (min-width: 1200px) { + .dokan-single-store { + .profile-frame { + + .profile-info-box { + + .profile-info-summery-wrapper { + + .profile-info-summery { + + .profile-info { + + .store-social-wrapper { + left: 20px !important; + right: auto !important; + } + } + } + } + } + } + } +} + +@media (max-width: 1199px) { + .dokan-single-store { + .profile-frame { + + .profile-info-box { + + .profile-info-summery-wrapper { + + .profile-info-summery { + + .profile-info { + .dokan-store-info { + padding-right: 40px; + li { + text-align: right !important; + } + } + } + } + } + } + } + } +} + + diff --git a/assets/src/less/store.less b/assets/src/less/store.less index 5f24577647..8ac4693af4 100644 --- a/assets/src/less/store.less +++ b/assets/src/less/store.less @@ -258,6 +258,7 @@ float: left; padding: 0 25px; color: #444; + width: 80%; .store-name { margin-top: 5px; diff --git a/changelog.txt b/changelog.txt index 68d869eef9..d8d899d7bb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,17 @@ +v2.6.5 -> July 16, 2017 +--------------------- +- [new] Added IBAN and Routing number fields for vendor's Bank info section +- [new] Added settings in admin panel to disable Vendor Welcome Wizard +- [new] Added filter `dokan_seller_registration_required_fields` +- [new] Store Category widget design updated +- [new] Added Dokan logo as menu icon in admin dashboard +- [new] Dokan Store Sidebar widget area now available for all themes +- [fix] Store categories are not updating properly +- [fix] Showing store location widget if location is not set +- [fix] Withdraw not working for IP address with port number +- [tweak] Enahanced RTL support +- [tweak] Profile Completion progress filter args updated + v2.6.4 -> June 22, 2017 --------------------- - [fix] Store page product loop pagination not showing diff --git a/classes/email.php b/classes/email.php index f7608c157b..399ed08d70 100755 --- a/classes/email.php +++ b/classes/email.php @@ -146,7 +146,7 @@ function dokan_refund_seller_mail( $seller_mail, $order_id, $status, $amount, $r $order_id, $amount, $refund_reason, - home_url() . '?page=dokan-refund&status=pending', + dokan_get_navigation_url() . 'orders/?order_status=wc-refunded', $this->get_from_name(), home_url(), ); diff --git a/classes/installer.php b/classes/installer.php index 84a135aea3..b0dc3d441c 100755 --- a/classes/installer.php +++ b/classes/installer.php @@ -256,7 +256,7 @@ function create_withdraw_table() { `status` int(1) NOT NULL, `method` varchar(30) NOT NULL, `note` text NOT NULL, - `ip` varchar(15) NOT NULL, + `ip` varchar(25) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;"; diff --git a/classes/seller-setup-wizard.php b/classes/seller-setup-wizard.php index a9d227d03a..a969b68b3c 100644 --- a/classes/seller-setup-wizard.php +++ b/classes/seller-setup-wizard.php @@ -26,7 +26,12 @@ public function filter_woocommerce_registration_redirect( $var ) { $user = wp_get_current_user(); if ( in_array( 'seller', $user->roles ) ) { - $url = apply_filters( 'dokan_seller_setup_wizard_url', site_url( '?page=dokan-seller-setup' ) ); + + $url = dokan_get_navigation_url(); + + if ( dokan_get_option( 'disable_welcome_wizard', 'dokan_selling', 'off' ) === 'off' ) { + $url = apply_filters( 'dokan_seller_setup_wizard_url', site_url( '?page=dokan-seller-setup' ) ); + } } return $url; } @@ -443,11 +448,13 @@ public function dokan_setup_payment_save() { $bank = $_POST['settings']['bank']; $dokan_settings['payment']['bank'] = array( - 'ac_name' => sanitize_text_field( $bank['ac_name'] ), - 'ac_number' => sanitize_text_field( $bank['ac_number'] ), - 'bank_name' => sanitize_text_field( $bank['bank_name'] ), - 'bank_addr' => sanitize_text_field( $bank['bank_addr'] ), - 'swift' => sanitize_text_field( $bank['swift'] ), + 'ac_name' => sanitize_text_field( $bank['ac_name'] ), + 'ac_number' => sanitize_text_field( $bank['ac_number'] ), + 'bank_name' => sanitize_text_field( $bank['bank_name'] ), + 'bank_addr' => sanitize_text_field( $bank['bank_addr'] ), + 'routing_number' => sanitize_text_field( $bank['routing_number'] ), + 'iban' => sanitize_text_field( $bank['iban'] ), + 'swift' => sanitize_text_field( $bank['swift'] ), ); } diff --git a/classes/template-settings.php b/classes/template-settings.php index c8676d9a54..de39e2fce1 100755 --- a/classes/template-settings.php +++ b/classes/template-settings.php @@ -482,11 +482,13 @@ function insert_settings_info() { $bank = $_POST['settings']['bank']; $dokan_settings['payment']['bank'] = array( - 'ac_name' => sanitize_text_field( $bank['ac_name'] ), - 'ac_number' => sanitize_text_field( $bank['ac_number'] ), - 'bank_name' => sanitize_text_field( $bank['bank_name'] ), - 'bank_addr' => sanitize_text_field( $bank['bank_addr'] ), - 'swift' => sanitize_text_field( $bank['swift'] ), + 'ac_name' => sanitize_text_field( $bank['ac_name'] ), + 'ac_number' => sanitize_text_field( $bank['ac_number'] ), + 'bank_name' => sanitize_text_field( $bank['bank_name'] ), + 'bank_addr' => sanitize_text_field( $bank['bank_addr'] ), + 'routing_number' => sanitize_text_field( $bank['routing_number'] ), + 'iban' => sanitize_text_field( $bank['iban'] ), + 'swift' => sanitize_text_field( $bank['swift'] ), ); } @@ -694,8 +696,9 @@ function calculate_profile_completeness_value( $dokan_settings ) { } } - $track_val['next_todo'] = $next_add; - $track_val['progress'] = $profile_val; + $track_val['next_todo'] = $next_add; + $track_val['progress'] = $profile_val; + $track_val['progress_vals'] = $progress_values; return apply_filters( 'dokan_profile_completion_progress_value', $track_val ) ; } diff --git a/dokan.php b/dokan.php index e787964b57..cd29458438 100755 --- a/dokan.php +++ b/dokan.php @@ -1,11 +1,11 @@ ' ); + var isRtl = ''; var series = [ { label: "", @@ -434,7 +435,9 @@ function dokan_admin_report( $group_by = 'day', $year = '' ) { minTickSize: [1, ""], font: { color: "#aaa" - } + }, + transform: function (v) { return ( isRtl == '1' ) ? -v : v; }, + inverseTransform: function (v) { return ( isRtl == '1' ) ? -v : v; } }, yaxes: [ { diff --git a/includes/admin/admin.php b/includes/admin/admin.php index fabe978afd..0ec2e8e39f 100755 --- a/includes/admin/admin.php +++ b/includes/admin/admin.php @@ -226,7 +226,7 @@ function admin_menu() { $withdraw_text = sprintf( __( 'Withdraw %s', 'dokan-lite' ), '' . $withdraw['pending'] . '' ); } - $dashboard = add_menu_page( __( 'Dokan', 'dokan-lite' ), __( 'Dokan', 'dokan-lite' ), $capability, 'dokan', array( $this, 'dashboard'), 'dashicons-vault', $menu_position ); + $dashboard = add_menu_page( __( 'Dokan', 'dokan-lite' ), __( 'Dokan', 'dokan-lite' ), $capability, 'dokan', array( $this, 'dashboard'), 'data:image/svg+xml;base64,' . base64_encode( '' ), $menu_position ); add_submenu_page( 'dokan', __( 'Dokan Dashboard', 'dokan-lite' ), __( 'Dashboard', 'dokan-lite' ), $capability, 'dokan', array( $this, 'dashboard' ) ); add_submenu_page( 'dokan', __( 'Withdraw', 'dokan-lite' ), $withdraw_text, $capability, 'dokan-withdraw', array( $this, 'withdraw_page' ) ); add_submenu_page( 'dokan', __( 'PRO Features', 'dokan-lite' ), __( 'PRO Features', 'dokan-lite' ), $capability, 'dokan-pro-features', array( $this, 'pro_features' ) ); @@ -379,6 +379,13 @@ function get_settings_fields() { 'type' => 'checkbox', 'default' => 'off' ), + 'disable_welcome_wizard' => array( + 'name' => 'disable_welcome_wizard', + 'label' => __( 'Disable Welcome Wizard', 'dokan-lite' ), + 'desc' => __( 'Disable welcome wizard for newly registered vendors', 'dokan-lite' ), + 'type' => 'checkbox', + 'default' => 'off' + ), ), 'dokan_withdraw' => array( 'withdraw_methods' => array( diff --git a/includes/functions.php b/includes/functions.php index ee1b6e8b8b..9071f1e25c 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -1033,15 +1033,27 @@ function dokan_get_seller_bank_details( $seller_id ) { if ( isset( $payment['ac_name'] ) ) { $details[] = sprintf( __( 'Account Name: %s', 'dokan-lite' ), $payment['ac_name'] ); } + if ( isset( $payment['ac_number'] ) ) { $details[] = sprintf( __( 'Account Number: %s', 'dokan-lite' ), $payment['ac_number'] ); } + if ( isset( $payment['bank_name'] ) ) { $details[] = sprintf( __( 'Bank Name: %s', 'dokan-lite' ), $payment['bank_name'] ); } + if ( isset( $payment['bank_addr'] ) ) { $details[] = sprintf( __( 'Address: %s', 'dokan-lite' ), $payment['bank_addr'] ); } + + if ( isset( $payment['routing_number'] ) ) { + $details[] = sprintf( __( 'Routing Number: %s', 'dokan-lite' ), $payment['routing_number'] ); + } + + if ( isset( $payment['iban'] ) ) { + $details[] = sprintf( __( 'IBAN: %s', 'dokan-lite' ), $payment['iban'] ); + } + if ( isset( $payment['swift'] ) ) { $details[] = sprintf( __( 'SWIFT: %s', 'dokan-lite' ), $payment['swift'] ); } @@ -1830,3 +1842,5 @@ function dokan_set_is_home_false_on_store() { $wp_query->is_home = false; } } + +register_sidebar( array( 'name' => __( 'Dokan Store Sidebar', 'dokan-lite' ), 'id' => 'sidebar-store' ) ); \ No newline at end of file diff --git a/includes/reports.php b/includes/reports.php index ab0fad9d3a..2bcc94f4f0 100644 --- a/includes/reports.php +++ b/includes/reports.php @@ -331,6 +331,7 @@ function dokan_sales_overview_chart_data( $start_date, $end_date, $group_by ) { jQuery(function($) { var order_data = jQuery.parseJSON( '' ); + var isRtl = ''; var series = [ { label: "", @@ -385,7 +386,9 @@ function dokan_sales_overview_chart_data( $start_date, $end_date, $group_by ) { minTickSize: [1, ""], font: { color: "#aaa" - } + }, + transform: function (v) { return ( isRtl == '1' ) ? -v : v; }, + inverseTransform: function (v) { return ( isRtl == '1' ) ? -v : v; } }, yaxes: [ { diff --git a/includes/wc-functions.php b/includes/wc-functions.php index bc4f1597d3..ce106612f5 100755 --- a/includes/wc-functions.php +++ b/includes/wc-functions.php @@ -453,34 +453,35 @@ function dokan_sub_order_get_total_coupon( $order_id ) { * @param WP_Error $error * @return \WP_Error */ -function dokan_seller_registration_errors( $error ) { - $allowed_roles = apply_filters( 'dokan_register_user_role', array( 'customer', 'seller' ) ); +if ( !function_exists( 'dokan_seller_registration_errors' ) ) { - // is the role name allowed or user is trying to manipulate? - if ( isset( $_POST['role'] ) && !in_array( $_POST['role'], $allowed_roles ) ) { - return new WP_Error( 'role-error', __( 'Cheating, eh?', 'dokan-lite' ) ); - } + function dokan_seller_registration_errors( $error ) { + $allowed_roles = apply_filters( 'dokan_register_user_role', array( 'customer', 'seller' ) ); - $role = $_POST['role']; + // is the role name allowed or user is trying to manipulate? + if ( isset( $_POST['role'] ) && !in_array( $_POST['role'], $allowed_roles ) ) { + return new WP_Error( 'role-error', __( 'Cheating, eh?', 'dokan-lite' ) ); + } - if ( $role == 'seller' ) { + $role = $_POST['role']; - $first_name = trim( $_POST['fname'] ); - if ( empty( $first_name ) ) { - return new WP_Error( 'fname-error', __( 'Please enter your first name.', 'dokan-lite' ) ); - } + $required_fields = apply_filters( 'dokan_seller_registration_required_fields', array( + 'fname' => __( 'Please enter your first name.', 'dokan-lite' ), + 'lname' => __( 'Please enter your last name.', 'dokan-lite' ), + 'phone' => __( 'Please enter your phone number.', 'dokan-lite' ), + ) ); - $last_name = trim( $_POST['lname'] ); - if ( empty( $last_name ) ) { - return new WP_Error( 'lname-error', __( 'Please enter your last name.', 'dokan-lite' ) ); - } - $phone = trim( $_POST['phone'] ); - if ( empty( $phone ) ) { - return new WP_Error( 'phone-error', __( 'Please enter your phone number.', 'dokan-lite' ) ); + if ( $role == 'seller' ) { + foreach ( $required_fields as $field => $msg ) { + if ( empty( trim( $_POST[$field] ) ) ) { + return new WP_Error( "$field-error", $msg ); + } + } } - } - return $error; + return $error; + } + } add_filter( 'woocommerce_process_registration_errors', 'dokan_seller_registration_errors' ); @@ -1134,3 +1135,21 @@ function dokan_save_account_details(){ } add_action( 'template_redirect', 'dokan_save_account_details' ); + +add_action( 'trashed_post', 'dokan_clear_product_category_cache' ); +add_action( 'deleted_post', 'dokan_clear_product_category_cache' ); +add_action( 'dokan_new_product_added', 'dokan_clear_product_category_cache' ); +add_action( 'dokan_product_updated', 'dokan_clear_product_category_cache' ); + +function dokan_clear_product_category_cache( $post_id ) { + + $product = wc_get_product( $post_id ); + + if ( !$product ) { + return; + } + + $seller_id = get_post_field( 'post_author', $post_id ); + + delete_transient( 'dokan-store-category-' . $seller_id ); +} diff --git a/includes/widgets/menu-category.php b/includes/widgets/menu-category.php index 1792f25c6a..7d74dabeee 100755 --- a/includes/widgets/menu-category.php +++ b/includes/widgets/menu-category.php @@ -12,9 +12,9 @@ function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat( "\t", $depth ); if ( $depth == 0 ) { - $output .= $indent . '