0?this.dragOffset=Math.sqrt(this.resistanceCoef*this.dragOffset):this.offset==this.maxOffset&&this.dragOffset<0&&(this.dragOffset=-Math.sqrt(-this.resistanceCoef*this.dragOffset)):o<0?this.dragOffset=-Math.sqrt(-this.resistanceCoef*this.dragOffset):o>this.maxOffset&&(this.dragOffset=Math.sqrt(this.resistanceCoef*this.dragOffset))}},onResize:function(){var t=this;this.computeCarouselWidth(),this.computeCarouselHeight(),this.dragging=!0,this.render(),setTimeout((function(){t.dragging=!1}),this.refreshRate)},render:function(){this.rtl?this.offset-=Math.max(1-this.currentPerPage,Math.min(Math.round(this.dragMomentum),this.currentPerPage-1))*this.slideWidth:this.offset+=Math.max(1-this.currentPerPage,Math.min(Math.round(this.dragMomentum),this.currentPerPage-1))*this.slideWidth;var t=this.scrollPerPage?this.slideWidth*this.currentPerPage:this.slideWidth,e=t*Math.floor(this.slideCount/(this.currentPerPage-1)),n=e+this.slideWidth*(this.slideCount%this.currentPerPage);this.offset>(e+n)/2?this.offset=n:this.offset=t*Math.round(this.offset/t),this.offset=Math.max(0,Math.min(this.offset,this.maxOffset)),this.currentPage=this.scrollPerPage?Math.round(this.offset/this.slideWidth/this.currentPerPage):Math.round(this.offset/this.slideWidth)},computeCarouselWidth:function(){this.getSlideCount(),this.getBrowserWidth(),this.getCarouselWidth(),this.setCurrentPageInBounds()},computeCarouselHeight:function(){this.getCarouselHeight()},setCurrentPageInBounds:function(){if(!this.canAdvanceForward&&this.scrollPerPage){var t=this.pageCount-1;this.currentPage=t>=0?t:0,this.offset=Math.max(0,Math.min(this.offset,this.maxOffset))}},handleTransitionStart:function(){this.$emit("transitionStart"),this.$emit("transition-start")},handleTransitionEnd:function(){this.$emit("transitionEnd"),this.$emit("transition-end")}},mounted:function(){window.addEventListener("resize",function(t,e,n){var r;return function(){clearTimeout(r),r=setTimeout((function(){r=null,t.apply(void 0)}),e)}}(this.onResize,this.refreshRate)),(this.isTouch&&this.touchDrag||this.mouseDrag)&&this.$refs["VueCarousel-wrapper"].addEventListener(this.isTouch?"touchstart":"mousedown",this.onStart),this.attachMutationObserver(),this.computeCarouselWidth(),this.computeCarouselHeight(),this.transitionstart=P(),this.$refs["VueCarousel-inner"].addEventListener(this.transitionstart,this.handleTransitionStart),this.transitionend=P(),this.$refs["VueCarousel-inner"].addEventListener(this.transitionend,this.handleTransitionEnd),this.$emit("mounted"),"backward"===this.autoplayDirection&&this.goToLastSlide()},beforeDestroy:function(){this.detachMutationObserver(),window.removeEventListener("resize",this.getBrowserWidth),this.$refs["VueCarousel-inner"].removeEventListener(this.transitionstart,this.handleTransitionStart),this.$refs["VueCarousel-inner"].removeEventListener(this.transitionend,this.handleTransitionEnd),this.$refs["VueCarousel-wrapper"].removeEventListener(this.isTouch?"touchstart":"mousedown",this.onStart)}},C=(n(101),s(S,r,[],!1,null,null,null));C.options.__file="src/Carousel.vue";var O=C.exports;n.d(e,"Carousel",(function(){return O})),n.d(e,"Slide",(function(){return y})),e.default={install:function(t){t.component("carousel",O),t.component("slide",y)}}}])},EnHS:function(t,e,n){"use strict";n.r(e);var r={},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement;this._self._c;return this._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("button",[this._v("dsjfn")])])}],!1,null,null,null);e.default=o.exports},"KHd+":function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=u):i&&(u=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}n.d(e,"a",(function(){return r}))},Uqe6:function(t,e){t.exports=function(t,e){var n=null;return function(){clearTimeout(n);var r=arguments,i=this;n=setTimeout((function(){t.apply(i,r)}),e)}}},WyvX:function(t,e){},jTz4:function(t,e){},uPOf:function(t,e,n){"use strict";n.r(e);var r=n("CmN8"),i=n.n(r);Vue.directive("debounce",n("z5QJ")),Vue.use(i.a),Vue.component("seller-category",n("EnHS"))},y62a:function(t,e){},z5QJ:function(t,e,n){"use strict";n.r(e);var r=n("Uqe6"),i={bind:function(t,e,n){e.value!==e.oldValue&&(t.oninput=r((function(e){t.dispatchEvent(new Event("change"))}),parseInt(e.value)||500))}},o=n("KHd+"),a=Object(o.a)(i,void 0,void 0,!1,null,null,null);e.default=a.exports}});
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/publishable/assets/js/marketplace.js.LICENSE.txt b/packages/Webkul/Marketplace/publishable/assets/js/marketplace.js.LICENSE.txt
new file mode 100644
index 000000000..cc317d620
--- /dev/null
+++ b/packages/Webkul/Marketplace/publishable/assets/js/marketplace.js.LICENSE.txt
@@ -0,0 +1,5 @@
+/*!
+ * vue-carousel v0.18.0-alpha
+ * (c) 2019 todd.beauchamp@ssense.com
+ * https://github.com/ssense/vue-carousel#readme
+ */
diff --git a/packages/Webkul/Marketplace/publishable/assets/mix-manifest.json b/packages/Webkul/Marketplace/publishable/assets/mix-manifest.json
new file mode 100644
index 000000000..9b3f2478a
--- /dev/null
+++ b/packages/Webkul/Marketplace/publishable/assets/mix-manifest.json
@@ -0,0 +1,6 @@
+{
+ "/js/marketplace.js": "/js/marketplace.js?id=298166815707d1644437",
+ "/css/marketplace-default.css": "/css/marketplace-default.css?id=0f8bcb1e81e7f8f1e84b",
+ "/css/marketplace-velocity.css": "/css/marketplace-velocity.css?id=7095ec0e128ac9c20312",
+ "/css/marketplace-admin.css": "/css/marketplace-admin.css?id=e8f88fc258a16d8cdd87"
+}
diff --git a/packages/Webkul/Marketplace/src/Config/acl.php b/packages/Webkul/Marketplace/src/Config/acl.php
new file mode 100644
index 000000000..2942c0b1c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Config/acl.php
@@ -0,0 +1,25 @@
+ 'marketplace',
+ 'name' => 'marketplace::app.admin.acl.marketplace',
+ 'route' => 'admin.marketplace.sellers.index',
+ 'sort' => 2
+ ], [
+ 'key' => 'marketplace.sellers',
+ 'name' => 'marketplace::app.admin.acl.sellers',
+ 'route' => 'admin.marketplace.sellers.index',
+ 'sort' => 1
+ ], [
+ 'key' => 'marketplace.products',
+ 'name' => 'marketplace::app.admin.acl.products',
+ 'route' => 'admin.marketplace.products.index',
+ 'sort' => 2
+ ], [
+ 'key' => 'marketplace.reviews',
+ 'name' => 'marketplace::app.admin.acl.reviews',
+ 'route' => 'admin.marketplace.reviews.index',
+ 'sort' => 3
+ ]
+];
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Config/admin-menu.php b/packages/Webkul/Marketplace/src/Config/admin-menu.php
new file mode 100644
index 000000000..3f9b2c06d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Config/admin-menu.php
@@ -0,0 +1,56 @@
+ 'marketplace',
+ 'name' => 'marketplace::app.admin.layouts.marketplace',
+ 'route' => 'admin.marketplace.sellers.index',
+ 'sort' => 2,
+ 'icon-class' => 'marketplace-icon',
+ ], [
+ 'key' => 'marketplace.sellers',
+ 'name' => 'marketplace::app.admin.layouts.sellers',
+ 'route' => 'admin.marketplace.sellers.index',
+ 'sort' => 1
+ ], [
+ 'key' => 'marketplace.products',
+ 'name' => 'marketplace::app.admin.layouts.products',
+ 'route' => 'admin.marketplace.products.index',
+ 'sort' => 2
+ ], [
+ 'key' => 'marketplace.reviews',
+ 'name' => 'marketplace::app.admin.layouts.seller-reviews',
+ 'route' => 'admin.marketplace.reviews.index',
+ 'sort' => 3
+ ], [
+ 'key' => 'marketplace.orders',
+ 'name' => 'marketplace::app.admin.layouts.orders',
+ 'route' => 'admin.marketplace.orders.index',
+ 'sort' => 3
+ ], [
+ 'key' => 'marketplace.transactions',
+ 'name' => 'marketplace::app.admin.layouts.transactions',
+ 'route' => 'admin.marketplace.transactions.index',
+ 'sort' => 3
+ ],[
+ 'key' => 'marketplace.sellerFlag',
+ 'name' => 'marketplace::app.shop.layouts.sellerFlag',
+ 'route' => 'marketplace.admin.seller.flag.reason.index',
+ 'sort' => 8
+ ],[
+ 'key' => 'marketplace.productFlag',
+ 'name' => 'marketplace::app.shop.layouts.productFlag',
+ 'route' => 'marketplace.admin.product.flag.reason.index',
+ 'sort' => 9
+ ],[
+ 'key' => 'marketplace.sellerCategory',
+ 'name' => 'marketplace::app.shop.layouts.seller-category',
+ 'route' => 'admin.marketplace.seller.category.index',
+ 'sort' => 10
+ ],[
+ 'key' => 'marketplace.paymentRequest',
+ 'name' => 'marketplace::app.admin.layouts.payment-requests',
+ 'route' => 'marketplace.admin.payment.request.index',
+ 'sort' => 11
+ ]
+];
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Config/menu.php b/packages/Webkul/Marketplace/src/Config/menu.php
new file mode 100644
index 000000000..516f3779d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Config/menu.php
@@ -0,0 +1,55 @@
+ 'marketplace',
+ 'name' => 'marketplace::app.shop.layouts.marketplace',
+ 'route' => 'marketplace.account.seller.edit',
+ 'sort' => 2
+ ], [
+ 'key' => 'marketplace.seller',
+ 'name' => 'marketplace::app.shop.layouts.profile',
+ 'route' => 'marketplace.account.seller.edit',
+ 'sort' => 1
+ ], [
+ 'key' => 'marketplace.dashboard',
+ 'name' => 'marketplace::app.shop.layouts.dashboard',
+ 'route' => 'marketplace.account.dashboard.index',
+ 'sort' => 2
+ ], [
+ 'key' => 'marketplace.products',
+ 'name' => 'marketplace::app.shop.layouts.products',
+ 'route' => 'marketplace.account.products.index',
+ 'sort' => 3
+ ], [
+ 'key' => 'marketplace.orders',
+ 'name' => 'marketplace::app.shop.layouts.orders',
+ 'route' => 'marketplace.account.orders.index',
+ 'sort' => 4
+ ], [
+ 'key' => 'marketplace.transactions',
+ 'name' => 'marketplace::app.shop.layouts.transactions',
+ 'route' => 'marketplace.account.transactions.index',
+ 'sort' => 6
+ ], [
+ 'key' => 'marketplace.reviews',
+ 'name' => 'marketplace::app.shop.layouts.reviews',
+ 'route' => 'marketplace.account.reviews.index',
+ 'sort' => 7
+ ], [
+ 'key' => 'marketplace.earnings',
+ 'name' => 'marketplace::app.shop.layouts.earnings',
+ 'route' => 'marketplace.account.earning.index',
+ 'sort' => 2
+ ],[
+ 'key' => 'marketplace.customers',
+ 'name' => 'marketplace::app.shop.layouts.customers',
+ 'route' => 'marketplace.account.customers.index',
+ 'sort' => 8
+ ],[
+ 'key' => 'marketplace.paymentRequest',
+ 'name' => 'marketplace::app.shop.layouts.paymentRequest',
+ 'route' => 'marketplace.account.payment.request.index',
+ 'sort' => 9
+ ]
+];
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Config/system.php b/packages/Webkul/Marketplace/src/Config/system.php
new file mode 100644
index 000000000..f0d83cbb7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Config/system.php
@@ -0,0 +1,962 @@
+ 'marketplace',
+ 'name' => 'marketplace::app.admin.system.marketplace',
+ 'sort' => 1
+ ], [
+ 'key' => 'marketplace.settings',
+ 'name' => 'marketplace::app.admin.system.settings',
+ 'sort' => 1,
+ ], [
+ 'key' => 'marketplace.settings.general',
+ 'name' => 'marketplace::app.admin.system.general',
+ 'sort' => 1,
+ 'fields' => [
+ [
+ 'name' => 'status',
+ 'title' => 'marketplace::app.admin.system.status',
+ 'type' => 'boolean'
+ ], [
+ 'name' => 'featured',
+ 'title' => 'marketplace::app.admin.system.featured',
+ 'type' => 'boolean'
+ ], [
+ 'name' => 'new',
+ 'title' => 'marketplace::app.admin.system.new',
+ 'type' => 'boolean'
+ ],[
+ 'name' => 'commission_per_unit',
+ 'title' => 'marketplace::app.admin.system.commission-per-unit',
+ 'type' => 'text',
+ 'validation' => 'required|min_value:0|max_value:100',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'seller_approval_required',
+ 'title' => 'marketplace::app.admin.system.seller-approval-required',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'product_approval_required',
+ 'title' => 'marketplace::app.admin.system.product-approval-required',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'can_create_invoice',
+ 'title' => 'marketplace::app.admin.system.can-create-invoice',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'can_create_shipment',
+ 'title' => 'marketplace::app.admin.system.can-create-shipment',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'can_cancel_order',
+ 'title' => 'marketplace::app.admin.system.can_cancel_order',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ]
+ ]
+ ], [
+ 'key' => 'marketplace.settings.landing_page',
+ 'name' => 'marketplace::app.admin.system.landing-page',
+ 'sort' => 1,
+ 'fields' => [
+ [
+ 'name' => 'page_title',
+ 'title' => 'marketplace::app.admin.system.page-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_banner',
+ 'title' => 'marketplace::app.admin.system.show-banner',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ],[
+ 'name' => 'layout',
+ 'title' => 'marketplace::app.admin.system.layout',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.layout1',
+ 'value' => 'layout1'
+ ], [
+ 'title' => 'marketplace::app.admin.system.layout2',
+ 'value' => 'layout2'
+ ],[
+ 'title' => 'marketplace::app.admin.system.layout3',
+ 'value' => 'layout3'
+ ]
+ ]
+ ],[
+ 'name' => 'banner',
+ 'title' => 'marketplace::app.admin.system.banner',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'banner_content',
+ 'title' => 'marketplace::app.admin.system.banner-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_features',
+ 'title' => 'marketplace::app.admin.system.show-features',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'feature_heading',
+ 'title' => 'marketplace::app.admin.system.feature-heading',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_info',
+ 'title' => 'marketplace::app.admin.system.feature-info',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_1',
+ 'title' => 'marketplace::app.admin.system.feature-icon-1',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_1',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-1',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_2',
+ 'title' => 'marketplace::app.admin.system.feature-icon-2',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_2',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-2',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_3',
+ 'title' => 'marketplace::app.admin.system.feature-icon-3',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_3',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-3',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_4',
+ 'title' => 'marketplace::app.admin.system.feature-icon-4',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_4',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-4',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_5',
+ 'title' => 'marketplace::app.admin.system.feature-icon-5',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_5',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-5',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_6',
+ 'title' => 'marketplace::app.admin.system.feature-icon-6',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_6',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-6',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_7',
+ 'title' => 'marketplace::app.admin.system.feature-icon-7',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_7',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-7',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_8',
+ 'title' => 'marketplace::app.admin.system.feature-icon-8',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_8',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-8',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_popular_sellers',
+ 'title' => 'marketplace::app.admin.system.show-popular-sellers',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'open_shop_button_label',
+ 'title' => 'marketplace::app.admin.system.open-shop-button-label',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'about_marketplace',
+ 'title' => 'marketplace::app.admin.system.about-marketplace',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_open_shop_block',
+ 'title' => 'marketplace::app.admin.system.show-open-shop-block',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'open_shop_info',
+ 'title' => 'marketplace::app.admin.system.open-shop-info',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ]
+ ]
+ ],
+ // [
+ // 'key' => 'marketplace.settings.layout1',
+ // 'name' => 'marketplace::app.admin.system.layout1',
+ // 'sort' => 1,
+ // 'fields' => [
+ // [
+ // 'name' => 'page_title',
+ // 'title' => 'marketplace::app.admin.system.page-title',
+ // 'type' => 'text',
+ // 'channel_based' => true,
+ // 'locale_based' => true
+ // ],
+ // ]
+ // ],
+ [
+ 'key' => 'marketplace.settings.layout2',
+ 'name' => 'marketplace::app.admin.system.layout2',
+ 'sort' => 1,
+ 'fields' => [
+ [
+ 'name' => 'page_title',
+ 'title' => 'marketplace::app.admin.system.page-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'banner_content',
+ 'title' => 'marketplace::app.admin.system.banner-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'step_one_image',
+ 'title' => 'marketplace::app.admin.system.layout-2.step-1',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ],[
+ 'name' => 'step_two_image',
+ 'title' => 'marketplace::app.admin.system.layout-2.step-2',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ],[
+ 'name' => 'step_three_image',
+ 'title' => 'marketplace::app.admin.system.layout-2.step-3',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ],[
+ 'name' => 'step_four_image',
+ 'title' => 'marketplace::app.admin.system.layout-2.step-4',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ],[
+ 'name' => 'feature_icon_1_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-1-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_2_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-2-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_3_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-3-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_4_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-4-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_5_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-5-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_6_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-6-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_7_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-7-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_8_content',
+ 'title' => 'marketplace::app.admin.system.layout-2.feature-icon-8-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],
+ ]
+ ],[
+ 'key' => 'marketplace.settings.layout3',
+ 'name' => 'marketplace::app.admin.system.layout3',
+ 'sort' => 1,
+ 'fields' => [
+ [
+ 'name' => 'page_title',
+ 'title' => 'marketplace::app.admin.system.page-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'banner_content',
+ 'title' => 'marketplace::app.admin.system.banner-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_1_title',
+ 'title' => 'marketplace::app.admin.system.layout-3.feature-icon-1-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_1_content',
+ 'title' => 'marketplace::app.admin.system.layout-3.feature-icon-1-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_2_title',
+ 'title' => 'marketplace::app.admin.system.layout-3.feature-icon-2-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_2_content',
+ 'title' => 'marketplace::app.admin.system.layout-3.feature-icon-2-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_3_title',
+ 'title' => 'marketplace::app.admin.system.layout-3.feature-icon-3-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],[
+ 'name' => 'feature_icon_3_content',
+ 'title' => 'marketplace::app.admin.system.layout-3.feature-icon-3-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],
+ ]
+ ], [
+ 'key' => 'marketplace.settings.velocity',
+ 'name' => 'marketplace::app.velocity.system.velocity-content',
+ 'sort' => 2,
+ 'fields' => [
+ [
+ 'name' => 'page_title',
+ 'title' => 'marketplace::app.admin.system.page-title',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_banner',
+ 'title' => 'marketplace::app.admin.system.show-banner',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'banner',
+ 'title' => 'marketplace::app.admin.system.banner',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'banner_content',
+ 'title' => 'marketplace::app.admin.system.banner-content',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_features',
+ 'title' => 'marketplace::app.admin.system.show-features',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'feature_heading',
+ 'title' => 'marketplace::app.admin.system.feature-heading',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_info',
+ 'title' => 'marketplace::app.admin.system.feature-info',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_1',
+ 'title' => 'marketplace::app.admin.system.feature-icon-1',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_1',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-1',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_2',
+ 'title' => 'marketplace::app.admin.system.feature-icon-2',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_2',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-2',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_3',
+ 'title' => 'marketplace::app.admin.system.feature-icon-3',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_3',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-3',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_4',
+ 'title' => 'marketplace::app.admin.system.feature-icon-4',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_4',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-4',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_5',
+ 'title' => 'marketplace::app.admin.system.feature-icon-5',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_5',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-5',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_6',
+ 'title' => 'marketplace::app.admin.system.feature-icon-6',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_6',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-6',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_7',
+ 'title' => 'marketplace::app.admin.system.feature-icon-7',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_7',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-7',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'feature_icon_8',
+ 'title' => 'marketplace::app.admin.system.feature-icon-8',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'feature_icon_label_8',
+ 'title' => 'marketplace::app.admin.system.feature-icon-label-8',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_popular_sellers',
+ 'title' => 'marketplace::app.admin.system.show-popular-sellers',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'open_shop_button_label',
+ 'title' => 'marketplace::app.admin.system.open-shop-button-label',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'about_marketplace',
+ 'title' => 'marketplace::app.admin.system.about-marketplace',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'show_open_shop_block',
+ 'title' => 'marketplace::app.admin.system.show-open-shop-block',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'open_shop_info',
+ 'title' => 'marketplace::app.admin.system.open-shop-info',
+ 'type' => 'textarea',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'setup_icon_1',
+ 'title' => 'marketplace::app.admin.system.setup-icon-1',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'setup_icon_2',
+ 'title' => 'marketplace::app.admin.system.setup-icon-2',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'setup_icon_3',
+ 'title' => 'marketplace::app.admin.system.setup-icon-3',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'setup_icon_4',
+ 'title' => 'marketplace::app.admin.system.setup-icon-4',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ], [
+ 'name' => 'setup_icon_5',
+ 'title' => 'marketplace::app.admin.system.setup-icon-5',
+ 'type' => 'image',
+ 'validation' => 'mimes:jpeg,bmp,png,jpg',
+ 'channel_based' => true,
+ 'locale_based' => false
+ ]
+ ]
+ ], [
+ 'key' => 'marketplace.settings.seller_flag',
+ 'name' => 'marketplace::app.admin.system.seller-flag',
+ 'sort' => 2,
+ 'fields' => [
+ [
+ 'name' => 'enable',
+ 'title' => 'marketplace::app.admin.system.enable',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'text',
+ 'title' => 'marketplace::app.admin.system.text',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'guest_can',
+ 'title' => 'marketplace::app.admin.system.guest-can',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ],[
+ 'name' => 'reason',
+ 'title' => 'marketplace::app.admin.system.reason',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ],[
+ 'name' => 'other_reason',
+ 'title' => 'marketplace::app.admin.system.other-reason',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'other_placeholder',
+ 'title' => 'marketplace::app.admin.system.other-placeholder',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],
+ ]
+ ],[
+ 'key' => 'marketplace.settings.product_flag',
+ 'name' => 'marketplace::app.admin.system.product-flag',
+ 'sort' => 2,
+ 'fields' => [
+ [
+ 'name' => 'enable',
+ 'title' => 'marketplace::app.admin.system.enable',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'text',
+ 'title' => 'marketplace::app.admin.system.text',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ], [
+ 'name' => 'guest_can',
+ 'title' => 'marketplace::app.admin.system.guest-can',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ],[
+ 'name' => 'reason',
+ 'title' => 'marketplace::app.admin.system.reason',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ],[
+ 'name' => 'other_reason',
+ 'title' => 'marketplace::app.admin.system.other-reason',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'other_placeholder',
+ 'title' => 'marketplace::app.admin.system.other-placeholder',
+ 'type' => 'text',
+ 'channel_based' => true,
+ 'locale_based' => true
+ ],
+ ]
+ ], [
+ 'key' => 'marketplace.settings.minimum_order_amount',
+ 'name' => 'marketplace::app.admin.system.minimum-order-amount',
+ 'sort' => 2,
+ 'fields' => [
+ [
+ 'name' => 'enable',
+ 'title' => 'marketplace::app.admin.system.enable',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ], [
+ 'name' => 'min_amount',
+ 'title' => 'marketplace::app.admin.system.min-amount',
+ 'type' => 'text',
+ 'channel_based' => true,
+ ], [
+ 'name' => 'seller_min_amount',
+ 'title' => 'marketplace::app.admin.system.seller-min-amount',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ]
+ ]
+ ],[
+ 'key' => 'marketplace.settings.google_analytics',
+ 'name' => 'marketplace::app.admin.system.google-analytics',
+ 'sort' => 2,
+ 'fields' => [
+ [
+ 'name' => 'enable',
+ 'title' => 'marketplace::app.admin.system.enable',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ],[
+ 'name' => 'google_analytics_id',
+ 'title' => 'marketplace::app.admin.system.google-analytics-id',
+ 'type' => 'text',
+ 'channel_based' => true,
+ ], [
+ 'name' => 'seller_google_analytics',
+ 'title' => 'marketplace::app.admin.system.seller-google-analytics',
+ 'type' => 'select',
+ 'options' => [
+ [
+ 'title' => 'marketplace::app.admin.system.yes',
+ 'value' => true
+ ], [
+ 'title' => 'marketplace::app.admin.system.no',
+ 'value' => false
+ ]
+ ]
+ ]
+ ]
+ ]
+];
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Contracts/Invoice.php b/packages/Webkul/Marketplace/src/Contracts/Invoice.php
new file mode 100644
index 000000000..2be5a9f2e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Contracts/Invoice.php
@@ -0,0 +1,7 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class OrderDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'order_id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Seller object
+ *
+ * @var Object
+ */
+ protected $seller;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_orders')
+ ->leftJoin('orders', 'marketplace_orders.order_id', '=', 'orders.id')
+ ->leftJoin('marketplace_transactions', 'marketplace_orders.id', '=', 'marketplace_transactions.marketplace_order_id')
+ ->select('orders.id', 'marketplace_orders.order_id', 'marketplace_orders.base_sub_total', 'marketplace_orders.base_grand_total', 'marketplace_orders.base_commission', 'marketplace_orders.base_seller_total', 'marketplace_orders.base_seller_total_invoiced', 'marketplace_orders.created_at', 'marketplace_orders.status', 'is_withdrawal_requested', 'seller_payout_status', 'marketplace_orders.marketplace_seller_id', 'marketplace_orders.base_discount_amount')
+ ->addSelect(DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_name'), 'orders.increment_id')
+ ->addSelect(DB::raw('SUM(marketplace_transactions.base_total) as total_paid'))
+ ->groupBy('marketplace_orders.id');
+
+
+ if (request()->id) {
+ $this->seller = $this->sellerRepository->find(request()->id);
+
+ $queryBuilder->where('marketplace_orders.marketplace_seller_id', $this->seller->id);
+ } else {
+ $queryBuilder->leftJoin('marketplace_sellers', 'marketplace_orders.marketplace_seller_id', '=', 'marketplace_sellers.id')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')
+ ->addSelect(DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as seller_name'));
+
+ $this->addFilter('seller_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ }
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name)'));
+ $this->addFilter('base_grand_total', 'marketplace_orders.base_grand_total');
+ $this->addFilter('status', 'marketplace_orders.status');
+ $this->addFilter('created_at', 'marketplace_orders.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'increment_id',
+ 'label' => trans('marketplace::app.admin.orders.order-id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_grand_total',
+ 'label' => trans('marketplace::app.admin.orders.grand-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans('marketplace::app.admin.orders.billed-to'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.admin.orders.status'),
+ 'type' => 'string',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'closure' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($row) {
+ if ($row->status == 'processing')
+ return '' . trans("marketplace::app.admin.orders.processing") . ' ';
+ else if ($row->status == 'completed')
+ return '' . trans("marketplace::app.admin.orders.completed") . ' ';
+ else if ($row->status == "canceled")
+ return '' . trans("marketplace::app.admin.orders.canceled") . ' ';
+ else if ($row->status == "closed")
+ return '' . trans("marketplace::app.admin.orders.closed") . ' ';
+ else if ($row->status == "pending")
+ return '' . trans("marketplace::app.admin.orders.pending") . ' ';
+ else if ($row->status == "pending_payment")
+ return '' . trans("marketplace::app.admin.orders.pending-payment") . ' ';
+ else if ($row->status == "fraud")
+ return '' . trans("marketplace::app.admin.orders.fraud") . ' ';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'created_at',
+ 'label' => trans('marketplace::app.admin.orders.order-date'),
+ 'type' => 'datetime',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+
+ if (!request()->id) {
+ $this->addColumn([
+ 'index' => 'seller_name',
+ 'label' => trans('marketplace::app.admin.orders.seller-name'),
+ 'type' => 'string',
+ 'sortable' => true,
+ 'searchable' => true,
+ 'filterable' => true
+ ]);
+ }
+
+ $this->addColumn([
+ 'index' => 'base_commission',
+ 'label' => trans('marketplace::app.admin.orders.commission'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_discount_amount',
+ 'label' => trans('marketplace::app.admin.orders.discount'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_seller_total',
+ 'label' => trans('marketplace::app.admin.orders.seller-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_seller_total_invoiced',
+ 'label' => trans('marketplace::app.admin.orders.seller-total-invoiced'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'total_paid',
+ 'label' => trans('marketplace::app.admin.orders.total-paid'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_remaining_total',
+ 'label' => trans('marketplace::app.admin.orders.remaining-total'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'wrapper' => function($row) {
+ if (! is_null($row->total_paid))
+ return core()->formatBasePrice($row->base_seller_total_invoiced - $row->total_paid);
+
+ return core()->formatBasePrice($row->base_seller_total_invoiced);
+ }
+ ]);
+
+ // $this->addColumn([
+ // 'index' => 'is_withdrawal_requested',
+ // 'label' => trans('marketplace::app.admin.orders.withdrawal-requested'),
+ // 'type' => 'string',
+ // 'searchable' => false,
+ // 'sortable' => true,
+ // 'wrapper' => function($row) {
+ // if ($row->is_withdrawal_requested)
+ // return trans('marketplace::app.admin.orders.yes');
+ // else
+ // return trans('marketplace::app.admin.orders.no');
+ // }
+ // ]);
+
+ $this->addColumn([
+ 'index' => 'pay',
+ 'label' => trans('marketplace::app.admin.orders.pay'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ if ($row->seller_payout_status == 'paid') {
+ return trans('marketplace::app.admin.orders.already-paid');
+ } else if ($row->seller_payout_status == 'refunded') {
+ return trans('marketplace::app.admin.orders.refunded');
+ } else {
+ $remaining = ! is_null($row->total_paid) ? $row->base_seller_total_invoiced - $row->total_paid : $row->base_seller_total_invoiced;
+
+ if ((float) $remaining) {
+ return '' . trans('marketplace::app.admin.orders.pay') . ' ';
+ } else {
+ return trans('marketplace::app.admin.orders.invoice-pending');
+ }
+ }
+ }
+
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'View',
+ 'route' => 'admin.sales.orders.view',
+ 'icon' => 'icon eye-icon',
+ 'method' => 'GET',
+ 'title' => 'View'
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/PaymentRequestDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/PaymentRequestDataGrid.php
new file mode 100644
index 000000000..9c42fb208
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/PaymentRequestDataGrid.php
@@ -0,0 +1,195 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class PaymentRequestDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'order_id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Seller object
+ *
+ * @var Object
+ */
+ protected $seller;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_orders')
+ ->leftJoin('orders', 'marketplace_orders.order_id', '=', 'orders.id')
+ ->leftJoin('marketplace_transactions', 'marketplace_orders.id', '=', 'marketplace_transactions.marketplace_order_id')
+ ->select('orders.id', 'marketplace_orders.order_id', 'marketplace_orders.base_sub_total', 'marketplace_orders.base_grand_total', 'marketplace_orders.base_commission', 'marketplace_orders.base_seller_total', 'marketplace_orders.base_seller_total_invoiced', 'marketplace_orders.created_at', 'marketplace_orders.status', 'is_withdrawal_requested', 'seller_payout_status', 'marketplace_orders.marketplace_seller_id', 'marketplace_orders.base_discount_amount')
+ ->addSelect(DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_name'), 'orders.increment_id')
+ ->addSelect(DB::raw('SUM(marketplace_transactions.base_total) as total_paid'))
+ ->groupBy('marketplace_orders.id')->where('marketplace_orders.seller_payout_status', 'requested');
+
+
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name)'));
+ $this->addFilter('base_grand_total', 'marketplace_orders.base_grand_total');
+ $this->addFilter('status', 'marketplace_orders.status');
+ $this->addFilter('created_at', 'marketplace_orders.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'increment_id',
+ 'label' => trans('marketplace::app.admin.orders.order-id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans('marketplace::app.admin.orders.billed-to'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.admin.orders.status'),
+ 'type' => 'string',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'closure' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($row) {
+ if ($row->status == 'processing')
+ return '' . trans("marketplace::app.admin.orders.processing") . ' ';
+ else if ($row->status == 'completed')
+ return '' . trans("marketplace::app.admin.orders.completed") . ' ';
+ else if ($row->status == "canceled")
+ return '' . trans("marketplace::app.admin.orders.canceled") . ' ';
+ else if ($row->status == "closed")
+ return '' . trans("marketplace::app.admin.orders.closed") . ' ';
+ else if ($row->status == "pending")
+ return '' . trans("marketplace::app.admin.orders.pending") . ' ';
+ else if ($row->status == "pending_payment")
+ return '' . trans("marketplace::app.admin.orders.pending-payment") . ' ';
+ else if ($row->status == "fraud")
+ return '' . trans("marketplace::app.admin.orders.fraud") . ' ';
+ }
+ ]);
+
+
+ $this->addColumn([
+ 'index' => 'base_seller_total_invoiced',
+ 'label' => trans('marketplace::app.admin.orders.seller-total-invoiced'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'total_paid',
+ 'label' => trans('marketplace::app.admin.orders.total-paid'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_remaining_total',
+ 'label' => trans('marketplace::app.admin.orders.remaining-total'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'wrapper' => function($row) {
+ if (! is_null($row->total_paid))
+ return core()->formatBasePrice($row->base_seller_total_invoiced - $row->total_paid);
+
+ return core()->formatBasePrice($row->base_seller_total_invoiced);
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'pay',
+ 'label' => trans('marketplace::app.admin.orders.pay'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ if ($row->seller_payout_status == 'paid') {
+ return trans('marketplace::app.admin.orders.already-paid');
+ } else if ($row->seller_payout_status == 'refunded') {
+ return trans('marketplace::app.admin.orders.refunded');
+ } else if ($row->seller_payout_status == 'requested') {
+
+ $remaining = ! is_null($row->total_paid) ? $row->base_seller_total_invoiced - $row->total_paid : $row->base_seller_total_invoiced;
+
+ if ((float) $remaining) {
+ return '' . trans('marketplace::app.admin.orders.pay') . ' ';
+ } else {
+ return trans('marketplace::app.admin.orders.invoice-pending');
+ }
+
+ }else {
+ $remaining = ! is_null($row->total_paid) ? $row->base_seller_total_invoiced - $row->total_paid : $row->base_seller_total_invoiced;
+
+ if ((float) $remaining) {
+ return 'id ).' class="btn btn-sm btn-primary" data-id="' . $row->id . '" seller-id="' . $row->marketplace_seller_id .'">' . trans('marketplace::app.shop.sellers.account.sales.payment-request.request-payment') . ' ';
+ } else {
+ return trans('marketplace::app.admin.orders.invoice-pending');
+ }
+ }
+ }
+
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'View',
+ 'route' => 'admin.sales.orders.view',
+ 'icon' => 'icon eye-icon',
+ 'method' => 'GET',
+ 'title' => 'View'
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php
new file mode 100644
index 000000000..95c4cd479
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php
@@ -0,0 +1,205 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'marketplace_product_id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+
+ $queryBuilder = DB::table('marketplace_products')
+ ->leftJoin('product_flat', 'marketplace_products.product_id', '=', 'product_flat.id')
+ ->leftJoin('marketplace_product_flags', 'product_flat.product_id', '=', 'marketplace_product_flags.product_id')
+ ->leftJoin('marketplace_sellers', 'marketplace_products.marketplace_seller_id', '=', 'marketplace_sellers.id')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')
+ ->leftJoin('product_inventories', 'marketplace_sellers.id', '=', 'product_inventories.vendor_id')
+ ->addSelect('product_inventories.qty as quantity')->groupBy('marketplace_products.id')
+ ->addSelect(
+ 'marketplace_products.id as marketplace_product_id',
+ 'product_flat.product_id',
+ 'product_flat.sku',
+ 'product_flat.url_key',
+ 'product_flat.name',
+ 'marketplace_products.price',
+ 'product_flat.product_number',
+ 'product_flat.price as product_flat_price',
+ 'marketplace_products.is_owner',
+ 'marketplace_products.is_approved',
+ DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as seller_name'),
+ DB::raw('COUNT(marketplace_product_flags.id) as flags')
+ )
+
+ ->where('channel', core()->getCurrentChannelCode())
+ ->where('locale', app()->getLocale());
+
+
+ $this->addFilter('seller_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ $this->addFilter('sku', 'product_flat.sku');
+ $this->addFilter('product_id', 'product_flat.product_id');
+ $this->addFilter('product_number', 'product_flat.product_number');
+ $this->addFilter('price', 'product_flat.price');
+ $this->addFilter('is_approved', 'marketplace_products.is_approved');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'product_id',
+ 'label' => trans('marketplace::app.admin.products.product-id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'product_number',
+ 'label' => trans('marketplace::app.admin.products.product-number'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'seller_name',
+ 'label' => trans('marketplace::app.admin.sellers.seller-name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'sku',
+ 'label' => trans('marketplace::app.admin.products.sku'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('marketplace::app.admin.products.name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ if ($row->url_key) {
+ return '' . $row->name . ' ';
+ } else {
+ return $row->name;
+ }
+ }
+ ]);
+
+ if ( (core()->getConfigData('marketplace.settings.product_flag.enable'))) {
+ $this->addColumn([
+ 'index' => 'flags',
+ 'label' => trans('marketplace::app.admin.flag.title'),
+ 'type' => 'integer',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => false,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ return '' . $row->flags . ' ';
+ }
+ ]);
+ }
+
+ $this->addColumn([
+ 'index' => 'price',
+ 'label' => trans('marketplace::app.admin.products.price'),
+ 'type' => 'price',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if ($row->is_owner == 1)
+ return number_format($row->product_flat_price, 2);
+ else
+ return number_format($row->price, 2);
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'quantity',
+ 'label' => trans('marketplace::app.admin.products.quantity'),
+ 'type' => 'number',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => false
+ ]);
+
+ $this->addColumn([
+ 'index' => 'is_approved',
+ 'label' => trans('marketplace::app.admin.products.status'),
+ 'type' => 'boolean',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if ($row->is_approved == 1)
+ return trans('marketplace::app.admin.products.approved');
+ else
+ return trans('marketplace::app.admin.products.un-approved');
+ }
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'delete',
+ 'method' => 'POST',
+ 'route' => 'admin.marketplace.products.delete',
+ 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
+ 'icon' => 'icon trash-icon',
+ 'title' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product'])
+ ]);
+ }
+
+ public function prepareMassActions()
+ {
+ $this->addMassAction([
+ 'type' => 'delete',
+ 'label' => trans('marketplace::app.admin.products.delete'),
+ 'action' => route('admin.marketplace.products.massdelete'),
+ 'method' => 'POST'
+ ]);
+
+ $this->addMassAction([
+ 'type' => 'update',
+ 'label' => trans('marketplace::app.admin.products.update'),
+ 'action' => route('admin.marketplace.products.massupdate'),
+ 'method' => 'POST',
+ 'options' => [
+ trans('marketplace::app.admin.sellers.approve') => 1,
+ trans('marketplace::app.admin.sellers.unapprove') => 0
+ ]
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductFlagDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductFlagDataGrid.php
new file mode 100644
index 000000000..8577dd3e2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductFlagDataGrid.php
@@ -0,0 +1,79 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductFlagDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_product_flags')
+
+ ->select('marketplace_product_flags.id', 'marketplace_product_flags.reason', 'marketplace_product_flags.name', 'marketplace_product_flags.email');
+
+ $this->addFilter('reason', 'marketplace_product_flags.reason' );
+ $this->addFilter('email', 'marketplace_product_flags.email' );
+ $this->addFilter('name', 'marketplace_product_flags.name' );
+ $this->addFilter('id', 'marketplace_product_flags.id');
+ $this->addFilter('created_at', 'marketplace_product_flags.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.sellers.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => false
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('marketplace::app.admin.flag.name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => false
+ ]);
+
+ $this->addColumn([
+ 'index' => 'email',
+ 'label' => trans('marketplace::app.admin.flag.email'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => false
+ ]);
+
+ $this->addColumn([
+ 'index' => 'reason',
+ 'label' => trans('marketplace::app.admin.products.flag.reason'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => false,
+ 'closure' => true,
+ ]);
+
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductFlagReasonDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductFlagReasonDataGrid.php
new file mode 100644
index 000000000..e6a0a3520
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductFlagReasonDataGrid.php
@@ -0,0 +1,111 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductFlagReasonDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_product_flag_reasons')
+
+ ->select('marketplace_product_flag_reasons.id', 'marketplace_product_flag_reasons.reason', 'marketplace_product_flag_reasons.status');
+
+ $this->addFilter('reason', 'marketplace_product_flag_reasons.reason' );
+ $this->addFilter('status', 'marketplace_product_flag_reasons.status' );
+ $this->addFilter('id', 'marketplace_product_flag_reasons.id');
+ $this->addFilter('created_at', 'marketplace_product_flag_reasons.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.sellers.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'reason',
+ 'label' => trans('marketplace::app.admin.products.flag.reason'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.admin.products.flag.status'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'Edit',
+ 'method' => 'GET',
+ 'route' => 'marketplace.admin.product.flag.reason.edit',
+ 'icon' => 'icon pencil-lg-icon',
+ 'title' => ''
+ ]);
+
+ $this->addAction([
+ 'type' => 'Delete',
+ 'method' => 'POST',
+ 'route' => 'marketplace.admin.product.flag.reason.delete',
+ 'confirm_text' => trans('ui::app.datagrid.massaction.delete'),
+ 'icon' => 'icon trash-icon',
+ 'title' => ''
+ ]);
+
+ }
+
+ public function prepareMassActions()
+ {
+ $this->addMassAction([
+ 'type' => 'delete',
+ 'label' => trans('marketplace::app.admin.sellers.delete'),
+ 'action' => route('marketplace.admin.product.flag.reason.mass-delete'),
+ 'method' => 'POST',
+ 'title' => 'delete'
+ ]);
+
+ // $this->addMassAction([
+ // 'type' => 'update',
+ // 'label' => trans('marketplace::app.admin.sellers.update'),
+ // 'action' => route('admin.marketplace.sellers.massupdate'),
+ // 'method' => 'PUT',
+ // 'options' => [
+ // trans('marketplace::app.admin.sellers.approve') => 1,
+ // trans('marketplace::app.admin.sellers.unapprove') => 0
+ // ]
+ // ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/ReviewDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/ReviewDataGrid.php
new file mode 100644
index 000000000..4dda77655
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/ReviewDataGrid.php
@@ -0,0 +1,119 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReviewDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_seller_reviews')
+ ->leftJoin('customers', 'marketplace_seller_reviews.customer_id', '=', 'customers.id')
+ ->leftJoin('marketplace_sellers', 'marketplace_seller_reviews.marketplace_seller_id', '=', 'marketplace_sellers.id')
+ ->leftJoin('customers as seller_customers', 'marketplace_sellers.customer_id', '=', 'seller_customers.id')
+ ->select('marketplace_seller_reviews.id', 'rating', 'marketplace_seller_reviews.status', 'comment')
+ ->addSelect(DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as customer_name'))
+ ->addSelect(DB::raw('CONCAT(seller_customers.first_name, " ", seller_customers.last_name) as seller_name'));
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ $this->addFilter('seller_name', DB::raw('CONCAT(seller_customers.first_name, " ", seller_customers.last_name)'));
+ $this->addFilter('id', 'marketplace_seller_reviews.id');
+ $this->addFilter('status', 'marketplace_seller_reviews.status');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.reviews.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans('marketplace::app.admin.reviews.customer-name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'seller_name',
+ 'label' => trans('marketplace::app.admin.reviews.seller-name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'rating',
+ 'label' => trans('marketplace::app.admin.reviews.rating'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.admin.reviews.status'),
+ 'type' => 'boolean',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'wrapper' => function($row) {
+ if ($row->status == 'approved')
+ return trans('marketplace::app.admin.reviews.approved');
+ else
+ return trans('marketplace::app.admin.reviews.un-approved');
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'comment',
+ 'label' => trans('marketplace::app.admin.reviews.comment'),
+ 'type' => 'string',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+ }
+
+ public function prepareMassActions()
+ {
+ $this->addMassAction([
+ 'type' => 'update',
+ 'title' => trans('marketplace::app.admin.reviews.update'),
+ 'label' => trans('marketplace::app.admin.reviews.update'),
+ 'action' => route('admin.marketplace.reviews.massupdate'),
+ 'method' => 'POST',
+ 'options' => [
+ trans('marketplace::app.admin.reviews.approve') => 'approved',
+ trans('marketplace::app.admin.reviews.unapprove') => 'unapproved'
+ ]
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerCategoryDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerCategoryDataGrid.php
new file mode 100644
index 000000000..3f0f2ff30
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerCategoryDataGrid.php
@@ -0,0 +1,95 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerCategoryDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ protected $enableFilterMap = true;
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('seller_categories')
+ ->leftJoin('marketplace_sellers', 'seller_categories.seller_id', 'marketplace_sellers.id')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', 'customers.id')
+
+ ->select(DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as name'),
+ 'seller_categories.categories',
+ 'seller_categories.id'
+ );
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.sellers.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('marketplace::app.admin.flag.name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'edit',
+ 'method' => 'GET',
+ 'route' => 'admin.marketplace.seller.category.edit',
+ 'icon' => 'icon pencil-lg-icon',
+ 'title' => ''
+ ], true);
+
+ $this->addAction([
+ 'type' => 'Delete',
+ 'method' => 'delete',
+ 'route' => 'admin.marketplace.seller.category.delete',
+ 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
+ 'icon' => 'icon trash-icon',
+ 'title' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product'])
+ ], true);
+ }
+
+ public function prepareMassActions()
+ {
+ $this->addMassAction([
+ 'type' => 'delete',
+ 'label' => trans('marketplace::app.admin.sellers.delete'),
+ 'action' => route('admin.marketplace.sellers.massdelete'),
+ 'method' => 'POST',
+ 'title' => ''
+ ], true) ;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerDataGrid.php
new file mode 100644
index 000000000..679906de0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerDataGrid.php
@@ -0,0 +1,189 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ if ( (core()->getConfigData('marketplace.settings.seller_flag.enable'))) {
+ $queryBuilder = DB::table('marketplace_sellers')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')
+ ->leftJoin('marketplace_seller_flags', 'marketplace_sellers.id', '=', 'marketplace_seller_flags.seller_id')
+
+ ->select('marketplace_sellers.id', 'marketplace_sellers.created_at', 'customers.email', 'marketplace_sellers.is_approved', 'marketplace_sellers.customer_id', DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as customer_name'), 'marketplace_sellers.url' )->selectRaw('count(marketplace_seller_flags.id) as flags')
+ ->groupBy('marketplace_sellers.id');
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ $this->addFilter('id', 'marketplace_sellers.id');
+ $this->addFilter('created_at', 'marketplace_sellers.created_at');
+ } else {
+ $queryBuilder = DB::table('marketplace_sellers')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')
+
+ ->select('marketplace_sellers.id', 'marketplace_sellers.created_at', 'customers.email', 'marketplace_sellers.is_approved', 'marketplace_sellers.customer_id', DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as customer_name') , 'marketplace_sellers.url' );
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ $this->addFilter('id', 'marketplace_sellers.id');
+ $this->addFilter('created_at', 'marketplace_sellers.created_at');
+ }
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.sellers.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans('marketplace::app.admin.sellers.seller-name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ return '' . $row->customer_name . ' ';
+ }
+ ]);
+
+ if ( (core()->getConfigData('marketplace.settings.seller_flag.enable'))) {
+ $this->addColumn([
+ 'index' => 'flags',
+ 'label' => trans('marketplace::app.admin.flag.title'),
+ 'type' => 'integer',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ return '' . $row->flags . ' ';
+ }
+ ]);
+ }
+
+ $this->addColumn([
+ 'index' => 'email',
+ 'label' => trans('marketplace::app.admin.sellers.seller-email'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'url',
+ 'label' => trans('marketplace::app.admin.sellers.seller-profile'),
+ 'type' => 'integer',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ return '' . trans('marketplace::app.admin.sellers.view-seller-profile') . ' ';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'created_at',
+ 'label' => trans('marketplace::app.admin.sellers.created-at'),
+ 'type' => 'datetime',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'product',
+ 'label' => trans('marketplace::app.admin.sellers.product'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ return '' . trans('marketplace::app.admin.sellers.add-product') . ' ';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'is_approved',
+ 'label' => trans('marketplace::app.admin.sellers.is-approved'),
+ 'type' => 'boolean',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if ($row->is_approved == 1)
+ return trans('marketplace::app.admin.sellers.approved');
+ else
+ return trans('marketplace::app.admin.sellers.un-approved');
+ }
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'edit',
+ 'method' => 'GET',
+ 'route' => 'admin.marketplace.seller.edit',
+ 'icon' => 'icon pencil-lg-icon',
+ 'title' => ''
+ ]);
+
+ $this->addAction([
+ 'type' => 'Delete',
+ 'method' => 'POST',
+ 'route' => 'admin.marketplace.sellers.delete',
+ 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
+ 'icon' => 'icon trash-icon',
+ 'title' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product'])
+ ]);
+ }
+
+ public function prepareMassActions()
+ {
+ $this->addMassAction([
+ 'type' => 'delete',
+ 'label' => trans('marketplace::app.admin.sellers.delete'),
+ 'action' => route('admin.marketplace.sellers.massdelete'),
+ 'method' => 'POST'
+ ]);
+
+ $this->addMassAction([
+ 'type' => 'update',
+ 'label' => trans('marketplace::app.admin.sellers.update'),
+ 'action' => route('admin.marketplace.sellers.massupdate'),
+ 'method' => 'POST',
+ 'options' => [
+ trans('marketplace::app.admin.sellers.approve') => 1,
+ trans('marketplace::app.admin.sellers.unapprove') => 0
+ ]
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerFlagDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerFlagDataGrid.php
new file mode 100644
index 000000000..07aded409
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerFlagDataGrid.php
@@ -0,0 +1,81 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerFlagDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ protected $enableFilterMap = false;
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_seller_flags')
+
+ ->select('marketplace_seller_flags.id', 'marketplace_seller_flags.reason', 'marketplace_seller_flags.name', 'marketplace_seller_flags.email');
+
+ $this->addFilter('reason', 'marketplace_seller_flags.reason' );
+ $this->addFilter('email', 'marketplace_seller_flags.email' );
+ $this->addFilter('name', 'marketplace_seller_flags.name' );
+ $this->addFilter('id', 'marketplace_seller_flags.id');
+ $this->addFilter('created_at', 'marketplace_seller_flags.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.sellers.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('marketplace::app.admin.flag.name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'email',
+ 'label' => trans('marketplace::app.admin.flag.email'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'reason',
+ 'label' => trans('marketplace::app.admin.products.flag.reason'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'closure' => true,
+ ]);
+
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerFlagReasonDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerFlagReasonDataGrid.php
new file mode 100644
index 000000000..c36f1be96
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/SellerFlagReasonDataGrid.php
@@ -0,0 +1,119 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerFlagReasonDataGrid extends DataGrid
+{
+ /**
+ *
+ * @var integer
+ */
+ public $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_seller_flag_reasons')
+
+ ->select('marketplace_seller_flag_reasons.id', 'marketplace_seller_flag_reasons.reason', 'marketplace_seller_flag_reasons.status');
+
+ $this->addFilter('reason', 'marketplace_seller_flag_reasons.reason' );
+ $this->addFilter('status', 'marketplace_seller_flag_reasons.status' );
+ $this->addFilter('id', 'marketplace_seller_flag_reasons.id');
+ $this->addFilter('created_at', 'marketplace_seller_flag_reasons.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.sellers.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'reason',
+ 'label' => trans('marketplace::app.admin.products.flag.reason'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'closure' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('admin::app.datagrid.status'),
+ 'type' => 'boolean',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => false,
+ 'wrapper' => function ($value) {
+ if ($value->status == 1) {
+ return trans('admin::app.datagrid.active');
+ } else {
+ return trans('admin::app.datagrid.inactive');
+ }
+ },
+ ]);
+
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'Edit',
+ 'method' => 'GET',
+ 'route' => 'marketplace.admin.seller.flag.reason.edit',
+ 'icon' => 'icon pencil-lg-icon',
+ 'title' => ''
+ ]);
+
+ $this->addAction([
+ 'type' => 'Delete',
+ 'method' => 'GET',
+ 'route' => 'marketplace.admin.seller.flag.reason.delete',
+ 'confirm_text' => trans('ui::app.datagrid.massaction.delete'),
+ 'icon' => 'icon trash-icon',
+ 'title' => ''
+ ]);
+
+ }
+
+ public function prepareMassActions()
+ {
+ $this->addMassAction([
+ 'type' => 'delete',
+ 'label' => trans('marketplace::app.admin.sellers.delete'),
+ 'action' => route('marketplace.admin.seller.flag.reason.mass-delete'),
+ 'method' => 'GET',
+ 'title' => 'delete'
+ ]);
+
+ // $this->addMassAction([
+ // 'type' => 'update',
+ // 'label' => trans('marketplace::app.admin.sellers.update'),
+ // 'action' => route('admin.marketplace.sellers.massupdate'),
+ // 'method' => 'PUT',
+ // 'options' => [
+ // trans('marketplace::app.admin.sellers.approve') => 1,
+ // trans('marketplace::app.admin.sellers.unapprove') => 0
+ // ]
+ // ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/TransactionDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/TransactionDataGrid.php
new file mode 100644
index 000000000..e5d5b9b91
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/TransactionDataGrid.php
@@ -0,0 +1,93 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class TransactionDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_transactions')
+ ->leftJoin('marketplace_sellers', 'marketplace_transactions.marketplace_seller_id', '=', 'marketplace_sellers.id')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')
+ ->select('marketplace_transactions.id', 'transaction_id', 'comment', 'base_total', 'marketplace_seller_id')
+ ->addSelect(DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as seller_name'));
+
+ $this->addFilter('seller_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ $this->addFilter('id', 'marketplace_transactions.id');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.admin.transactions.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'seller_name',
+ 'label' => trans('marketplace::app.admin.transactions.seller-name'),
+ 'type' => 'string',
+ 'sortable' => true,
+ 'searchable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'marketplace_seller_id',
+ 'label' => trans('marketplace::app.admin.transactions.seller-id'),
+ 'type' => 'number',
+ 'sortable' => true,
+ 'searchable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'transaction_id',
+ 'label' => trans('marketplace::app.admin.transactions.transaction-id'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'comment',
+ 'label' => trans('marketplace::app.admin.transactions.comment'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_total',
+ 'label' => trans('marketplace::app.admin.transactions.total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/CustomerDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/CustomerDataGrid.php
new file mode 100644
index 000000000..92ae369e1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/CustomerDataGrid.php
@@ -0,0 +1,135 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CustomerDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $queryBuilder = DB::table('marketplace_orders')
+ ->leftJoin('orders', 'marketplace_orders.order_id', '=', 'orders.id')
+ ->rightJoin('addresses', 'marketplace_orders.order_id', 'addresses.order_id')
+ ->select('orders.id', 'orders.customer_id', 'marketplace_orders.order_id', DB::raw('sum(marketplace_orders.base_grand_total) as base_grand_total'), 'marketplace_orders.grand_total', 'marketplace_orders.created_at', 'channel_name', 'marketplace_orders.status', 'orders.order_currency_code')
+ ->addSelect(DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_name'), 'orders.increment_id','orders.customer_email', DB::raw('CONCAT(addresses. address1, " " ,addresses.state, " " , addresses.country, " ", addresses.postcode ) as address'), 'addresses.gender', 'addresses.phone', DB::raw('count(*) as order_count') )
+ ->where('addresses.address_type', 'order_billing')
+ ->where('marketplace_orders.marketplace_seller_id', $seller->id)
+ ->groupBy('orders.customer_email');
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name)'));
+ $this->addFilter('base_grand_total', 'marketplace_orders.base_grand_total');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.customer-name"),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_email',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.email"),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'phone',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.phone"),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'gender',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.gender"),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'address',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.address"),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'filterable' => false
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_grand_total',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.base-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'order_count',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.order-count'),
+ 'type' => 'integer',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => false,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ return '' . $row->order_count. ' ';
+ }
+ ]);
+
+ }
+
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/CustomerOrderDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/CustomerOrderDataGrid.php
new file mode 100644
index 000000000..cfbfbf547
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/CustomerOrderDataGrid.php
@@ -0,0 +1,154 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CustomerOrderDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'order_id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+ $customerId = decrypt(Str::afterLast(url()->current(), '/' ));
+
+ $queryBuilder = DB::table('marketplace_orders')
+ ->leftJoin('orders', 'marketplace_orders.order_id', '=', 'orders.id')
+ ->select('orders.id', 'marketplace_orders.order_id', 'marketplace_orders.base_grand_total', 'marketplace_orders.grand_total', 'marketplace_orders.created_at', 'channel_name', 'marketplace_orders.status', 'orders.order_currency_code')
+ ->addSelect(DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_name'), 'orders.increment_id')
+ ->where('marketplace_orders.marketplace_seller_id', $seller->id)->where('orders.customer_email', $customerId);
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name)'));
+ $this->addFilter('id', 'orders.id');
+ $this->addFilter('base_grand_total', 'marketplace_orders.base_grand_total');
+ $this->addFilter('grand_total', 'marketplace_orders.grand_total');
+ $this->addFilter('created_at', 'marketplace_orders.created_at');
+ $this->addFilter('status', 'marketplace_orders.status');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'increment_id',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_grand_total',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.base-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'grand_total',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.grand-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if (! is_null($row->grand_total))
+ return core()->formatPrice($row->grand_total, $row->order_currency_code);
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'created_at',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.order-date'),
+ 'type' => 'datetime',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.status'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => false,
+ 'closure' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($row) {
+ if ($row->status == 'processing')
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.processing") . ' ';
+ else if ($row->status == 'completed')
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.completed") . ' ';
+ else if ($row->status == "canceled")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.canceled") . ' ';
+ else if ($row->status == "closed")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.closed") . ' ';
+ else if ($row->status == "pending")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.pending") . ' ';
+ else if ($row->status == "pending_payment")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.pending-payment") . ' ';
+ else if ($row->status == "fraud")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.fraud") . ' ';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.billed-to"),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'View',
+ 'route' => 'marketplace.account.orders.view',
+ 'icon' => 'icon eye-icon',
+ 'method' => 'GET',
+ 'title' => 'View'
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/OrderDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/OrderDataGrid.php
new file mode 100644
index 000000000..e4b1e62d0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/OrderDataGrid.php
@@ -0,0 +1,160 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class OrderDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'order_id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $queryBuilder = DB::table('marketplace_orders')
+ ->leftJoin('orders', 'marketplace_orders.order_id', '=', 'orders.id')
+ ->select('orders.id', 'marketplace_orders.order_id', 'marketplace_orders.base_grand_total', 'marketplace_orders.grand_total', 'marketplace_orders.created_at', 'channel_name', 'marketplace_orders.status', 'orders.order_currency_code')
+ ->addSelect(DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_name'), 'orders.increment_id')
+ ->where('marketplace_orders.marketplace_seller_id', $seller->id);
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name)'));
+ $this->addFilter('id', 'orders.id');
+ $this->addFilter('base_grand_total', 'marketplace_orders.base_grand_total');
+ $this->addFilter('grand_total', 'marketplace_orders.grand_total');
+ $this->addFilter('created_at', 'marketplace_orders.created_at');
+ $this->addFilter('status', 'marketplace_orders.status');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'increment_id',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_grand_total',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.base-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if (! is_null($row->base_grand_total)) {
+
+ $baseGrandPrice = core()->convertPrice($row->base_grand_total, $row->order_currency_code);
+ return core()->formatPrice($baseGrandPrice, $row->order_currency_code);
+ }
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'grand_total',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.grand-total'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if (! is_null($row->grand_total))
+ return core()->formatPrice($row->grand_total, $row->order_currency_code);
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'created_at',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.order-date'),
+ 'type' => 'datetime',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.orders.status'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => false,
+ 'closure' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($row) {
+ if ($row->status == 'processing')
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.processing") . ' ';
+ else if ($row->status == 'completed')
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.completed") . ' ';
+ else if ($row->status == "canceled")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.canceled") . ' ';
+ else if ($row->status == "closed")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.closed") . ' ';
+ else if ($row->status == "pending")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.pending") . ' ';
+ else if ($row->status == "pending_payment")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.pending-payment") . ' ';
+ else if ($row->status == "fraud")
+ return '' . trans("marketplace::app.shop.sellers.account.sales.orders.fraud") . ' ';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans("marketplace::app.shop.sellers.account.sales.orders.billed-to"),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'View',
+ 'route' => 'marketplace.account.orders.view',
+ 'icon' => 'icon eye-icon',
+ 'method' => 'GET',
+ 'title' => 'View'
+ ], true);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/PaymentRequestDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/PaymentRequestDataGrid.php
new file mode 100644
index 000000000..2479d40e0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/PaymentRequestDataGrid.php
@@ -0,0 +1,189 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class PaymentRequestDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'order_id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Seller object
+ *
+ * @var Object
+ */
+ protected $seller;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('marketplace_orders')
+ ->leftJoin('orders', 'marketplace_orders.order_id', '=', 'orders.id')
+ ->leftJoin('marketplace_transactions', 'marketplace_orders.id', '=', 'marketplace_transactions.marketplace_order_id')
+ ->select('orders.id', 'marketplace_orders.order_id', 'marketplace_orders.base_sub_total', 'marketplace_orders.base_grand_total', 'marketplace_orders.base_commission', 'marketplace_orders.base_seller_total', 'marketplace_orders.base_seller_total_invoiced', 'marketplace_orders.created_at', 'marketplace_orders.status', 'is_withdrawal_requested', 'seller_payout_status', 'marketplace_orders.marketplace_seller_id', 'marketplace_orders.base_discount_amount')
+ ->addSelect(DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_name'), 'orders.increment_id')
+ ->addSelect(DB::raw('SUM(marketplace_transactions.base_total) as total_paid'))
+ ->groupBy('marketplace_orders.id');
+
+ $this->seller = $this->sellerRepository->findOneWhere(['customer_id' => auth()->guard('customer')->user()->id]);
+
+ $queryBuilder->where('marketplace_orders.marketplace_seller_id', $this->seller->id);
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name)'));
+ $this->addFilter('base_grand_total', 'marketplace_orders.base_grand_total');
+ $this->addFilter('status', 'marketplace_orders.status');
+ $this->addFilter('created_at', 'marketplace_orders.created_at');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'increment_id',
+ 'label' => trans('marketplace::app.admin.orders.order-id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans('marketplace::app.admin.orders.billed-to'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.admin.orders.status'),
+ 'type' => 'string',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'closure' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($row) {
+ if ($row->status == 'processing')
+ return '' . trans("marketplace::app.admin.orders.processing") . ' ';
+ else if ($row->status == 'completed')
+ return '' . trans("marketplace::app.admin.orders.completed") . ' ';
+ else if ($row->status == "canceled")
+ return '' . trans("marketplace::app.admin.orders.canceled") . ' ';
+ else if ($row->status == "closed")
+ return '' . trans("marketplace::app.admin.orders.closed") . ' ';
+ else if ($row->status == "pending")
+ return '' . trans("marketplace::app.admin.orders.pending") . ' ';
+ else if ($row->status == "pending_payment")
+ return '' . trans("marketplace::app.admin.orders.pending-payment") . ' ';
+ else if ($row->status == "fraud")
+ return '' . trans("marketplace::app.admin.orders.fraud") . ' ';
+ }
+ ]);
+
+
+ $this->addColumn([
+ 'index' => 'base_seller_total_invoiced',
+ 'label' => trans('marketplace::app.admin.orders.seller-total-invoiced'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'total_paid',
+ 'label' => trans('marketplace::app.admin.orders.total-paid'),
+ 'type' => 'price',
+ 'searchable' => false,
+ 'sortable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_remaining_total',
+ 'label' => trans('marketplace::app.admin.orders.remaining-total'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'wrapper' => function($row) {
+ if (! is_null($row->total_paid))
+ return core()->formatBasePrice($row->base_seller_total_invoiced - $row->total_paid);
+
+ return core()->formatBasePrice($row->base_seller_total_invoiced);
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'pay',
+ 'label' => trans('marketplace::app.admin.orders.pay'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'closure' => true,
+ 'wrapper' => function($row) {
+ if ($row->seller_payout_status == 'paid') {
+ return trans('marketplace::app.admin.orders.already-paid');
+ } else if ($row->seller_payout_status == 'refunded') {
+ return trans('marketplace::app.admin.orders.refunded');
+ } else if ($row->seller_payout_status == 'requested') {
+ return trans('marketplace::app.admin.orders.requested');
+ }else {
+ $remaining = ! is_null($row->total_paid) ? $row->base_seller_total_invoiced - $row->total_paid : $row->base_seller_total_invoiced;
+
+ if ((float) $remaining) {
+ return 'id ).' class="btn btn-sm btn-primary" data-id="' . $row->id . '" seller-id="' . $row->marketplace_seller_id .'">' . trans('marketplace::app.shop.sellers.account.sales.payment-request.request-payment') . ' ';
+ } else {
+ return trans('marketplace::app.admin.orders.invoice-pending');
+ }
+ }
+ }
+
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'View',
+ 'route' => 'admin.sales.orders.view',
+ 'icon' => 'icon eye-icon',
+ 'method' => 'GET',
+ 'title' => 'View'
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/ProductDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/ProductDataGrid.php
new file mode 100644
index 000000000..4f622b803
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/ProductDataGrid.php
@@ -0,0 +1,197 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'product_id';
+
+ /**
+ * @var string
+ */
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $queryBuilder = DB::table('product_flat')
+ ->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
+ ->join('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id')
+ ->leftJoin('marketplace_sellers', 'marketplace_products.marketplace_seller_id', '=', 'marketplace_sellers.id')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')
+ // ->select('product_flat.product_id')
+ ->addSelect('marketplace_products.id as marketplace_product_id', 'product_flat.product_id', 'product_flat.sku', 'product_flat.name', 'product_flat.product_number', 'marketplace_products.price', 'product_flat.price as product_flat_price', 'marketplace_products.is_owner', 'marketplace_products.is_approved', DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as seller_name'))
+ ->where('marketplace_products.marketplace_seller_id', $seller->id)
+ ->where('channel', core()->getCurrentChannelCode())
+ ->where('locale', app()->getLocale())
+ ->distinct();
+
+ $queryBuilder = $queryBuilder->leftJoin('product_inventories', function($qb) {
+
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $qb->on('product_flat.product_id', 'product_inventories.product_id')
+ ->where('product_inventories.vendor_id', '=', $seller->id);
+ });
+
+
+ $queryBuilder
+ ->groupBy('product_flat.product_id')
+ ->addSelect(DB::raw('SUM(product_inventories.qty) as quantity'));
+
+ $this->addFilter('sku', 'product_flat.sku');
+ $this->addFilter('product_id', 'product_flat.product_id');
+ $this->addFilter('product_number', 'product_flat.product_number');
+ $this->addFilter('price', 'product_flat.price');
+ $this->addFilter('is_approved', 'marketplace_products.is_approved');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'product_id',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'product_number',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.product-number'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'sku',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.sku'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'price',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.price'),
+ 'type' => 'price',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if ($row->is_owner == 1)
+ return number_format($row->product_flat_price, 2);
+ else
+ return number_format($row->price, 2);
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'quantity',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.quantity'),
+ 'type' => 'number',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => false
+ ]);
+
+ $this->addColumn([
+ 'index' => 'is_approved',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.is-approved'),
+ 'type' => 'boolean',
+ 'sortable' => true,
+ 'searchable' => false,
+ 'filterable' => true,
+ 'wrapper' => function($row) {
+ if ($row->is_approved == 1)
+ return trans('marketplace::app.shop.sellers.account.catalog.products.yes');
+ else
+ return trans('marketplace::app.shop.sellers.account.catalog.products.no');
+ }
+ ]);
+ }
+
+ public function prepareActions() {
+ $this->addAction([
+ 'type' => 'Edit',
+ 'method' => 'GET',
+ 'route' => 'marketplace.account.products.edit',
+ 'icon' => 'icon pencil-lg-icon',
+ 'title' => trans('ui::app.datagrid.edit')
+ ], true);
+
+ $this->addAction([
+ 'method' => 'POST',
+ 'route' => 'marketplace.account.products.delete',
+ 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
+ 'icon' => 'icon trash-icon',
+ 'title' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
+ ], true);
+ }
+
+ public function prepareMassActions() {
+
+ $this->addAction([
+ 'title' => trans('admin::app.datagrid.copy'),
+ 'method' => 'GET',
+ 'route' => 'seller.catalog.products.copy',
+ 'icon' => 'icon copy-icon',
+ ], true);
+
+ $this->addMassAction([
+ 'type' => 'delete',
+ 'label' => trans('marketplace::app.shop.sellers.account.catalog.products.delete'),
+ 'action' => route('marketplace.account.products.massdelete'),
+ 'method' => 'POST'
+ ], true);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/ReviewDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/ReviewDataGrid.php
new file mode 100644
index 000000000..9e0068bed
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/ReviewDataGrid.php
@@ -0,0 +1,108 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReviewDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $queryBuilder = DB::table('marketplace_seller_reviews')
+ ->select('marketplace_seller_reviews.id', 'rating', 'comment', 'marketplace_seller_reviews.status')
+ ->addSelect(DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as customer_name'))
+ ->leftJoin('customers', 'marketplace_seller_reviews.customer_id', '=', 'customers.id')
+ ->where('marketplace_seller_reviews.marketplace_seller_id', $seller->id);
+
+ $this->addFilter('customer_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
+ $this->addFilter('id', 'marketplace_seller_reviews.id');
+ $this->addFilter('status', 'marketplace_seller_reviews.status');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.shop.sellers.account.reviews.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'customer_name',
+ 'label' => trans('marketplace::app.shop.sellers.account.reviews.customer-name'),
+ 'type' => 'string',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'rating',
+ 'label' => trans('marketplace::app.shop.sellers.account.reviews.rating'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'comment',
+ 'label' => trans('marketplace::app.shop.sellers.account.reviews.comment'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('marketplace::app.shop.sellers.account.reviews.status'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => false,
+ 'filterable' => true
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/DataGrids/Shop/TransactionDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Shop/TransactionDataGrid.php
new file mode 100644
index 000000000..5327c3e47
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/DataGrids/Shop/TransactionDataGrid.php
@@ -0,0 +1,104 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class TransactionDataGrid extends DataGrid
+{
+ /**
+ * @var integer
+ */
+ protected $index = 'id';
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository)
+ {
+ parent::__construct();
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+ public function prepareQueryBuilder()
+ {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $queryBuilder = DB::table('marketplace_transactions')
+ ->select('id', 'transaction_id', 'comment', 'base_total')
+ ->where('marketplace_transactions.marketplace_seller_id', $seller->id);
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.transactions.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'transaction_id',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.transactions.transaction-id'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'comment',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.transactions.comment'),
+ 'type' => 'string',
+ 'sortable' => false,
+ 'searchable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'base_total',
+ 'label' => trans('marketplace::app.shop.sellers.account.sales.transactions.total'),
+ 'type' => 'price',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'View',
+ 'route' => 'marketplace.account.transactions.view',
+ 'icon' => 'icon eye-icon',
+ 'method' => 'GET',
+ 'title' => 'View'
+ ], true);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_07_164618_create_marketplace_sellers_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_07_164618_create_marketplace_sellers_table.php
new file mode 100644
index 000000000..b66467a01
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_07_164618_create_marketplace_sellers_table.php
@@ -0,0 +1,65 @@
+increments('id');
+ $table->string('url')->unique();
+ $table->boolean('is_approved')->default(0);
+ $table->string('shop_title')->nullable();
+ $table->text('description')->nullable();
+ $table->string('banner')->nullable();
+ $table->string('logo')->nullable();
+ $table->string('tax_vat')->nullable();
+
+ $table->text('meta_title')->nullable();
+ $table->text('meta_description')->nullable();
+ $table->text('meta_keywords')->nullable();
+
+ $table->string('address1')->nullable();
+ $table->string('address2')->nullable();
+ $table->string('phone')->nullable();
+ $table->string('state')->nullable();
+ $table->string('city')->nullable();
+ $table->string('country')->nullable();
+ $table->string('postcode')->nullable();
+
+ $table->text('return_policy')->nullable();
+ $table->text('shipping_policy')->nullable();
+ $table->text('privacy_policy')->nullable();
+
+ $table->string('twitter')->nullable();
+ $table->string('facebook')->nullable();
+ $table->string('youtube')->nullable();
+ $table->string('instagram')->nullable();
+ $table->string('skype')->nullable();
+ $table->string('linked_in')->nullable();
+ $table->string('pinterest')->nullable();
+
+ $table->integer('customer_id')->unsigned()->nullable()->unique();
+ $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_sellers');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_19_103208_create_marketplace_products_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_19_103208_create_marketplace_products_table.php
new file mode 100644
index 000000000..bd24980a4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_19_103208_create_marketplace_products_table.php
@@ -0,0 +1,50 @@
+increments('id');
+ $table->string('condition')->nullable();
+ $table->double('price')->default(0);
+ $table->text('description')->nullable();
+
+ $table->boolean('is_approved')->nullable();
+ $table->boolean('is_owner')->default(0);
+ $table->integer('parent_id')->unsigned()->nullable();
+
+ $table->integer('product_id')->unsigned();
+ $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
+
+ $table->integer('marketplace_seller_id')->unsigned();
+ $table->foreign('marketplace_seller_id')->references('id')->on('marketplace_sellers')->onDelete('cascade');
+ $table->unique(['marketplace_seller_id', 'product_id']);
+
+ $table->timestamps();
+ });
+
+ Schema::table('marketplace_products', function (Blueprint $table) {
+ $table->foreign('parent_id')->references('id')->on('marketplace_products')->onDelete('cascade');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_products');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_19_130903_create_marketplace_seller_reviews_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_19_130903_create_marketplace_seller_reviews_table.php
new file mode 100644
index 000000000..f52e4c6f8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_19_130903_create_marketplace_seller_reviews_table.php
@@ -0,0 +1,40 @@
+increments('id');
+ $table->integer('rating');
+ $table->text('comment')->nullable();
+ $table->string('status');
+
+ $table->integer('marketplace_seller_id')->unsigned();
+ $table->foreign('marketplace_seller_id')->references('id')->on('marketplace_sellers')->onDelete('cascade');
+
+ $table->integer('customer_id')->unsigned();
+ $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_seller_reviews');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_31_152453_create_marketplace_product_images_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_31_152453_create_marketplace_product_images_table.php
new file mode 100644
index 000000000..c6cdfaddd
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2018_12_31_152453_create_marketplace_product_images_table.php
@@ -0,0 +1,36 @@
+increments('id');
+ $table->string('type')->nullable();
+ $table->string('path');
+
+ $table->integer('marketplace_product_id')->unsigned();
+ $table->foreign('marketplace_product_id')->references('id')->on('marketplace_products')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_product_images');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_07_180846_create_marketplace_orders_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_07_180846_create_marketplace_orders_table.php
new file mode 100644
index 000000000..9de05e6a6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_07_180846_create_marketplace_orders_table.php
@@ -0,0 +1,90 @@
+increments('id');
+ $table->string('status')->nullable();
+ $table->boolean('is_withdrawal_requested')->default(0);
+ $table->string('seller_payout_status')->nullable();
+
+ $table->decimal('commission_percentage', 12, 4)->default(0)->nullable();
+ $table->decimal('commission', 12, 4)->default(0)->nullable();
+ $table->decimal('base_commission', 12, 4)->default(0)->nullable();
+ $table->decimal('commission_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_commission_invoiced', 12, 4)->default(0)->nullable();
+
+ $table->decimal('seller_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_seller_total', 12, 4)->default(0)->nullable();
+ $table->decimal('seller_total_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_seller_total_invoiced', 12, 4)->default(0)->nullable();
+
+ $table->integer('total_item_count')->nullable();
+ $table->integer('total_qty_ordered')->nullable();
+
+ $table->decimal('grand_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_grand_total', 12, 4)->default(0)->nullable();
+ $table->decimal('grand_total_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_grand_total_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('grand_total_refunded', 12, 4)->default(0)->nullable();
+ $table->decimal('base_grand_total_refunded', 12, 4)->default(0)->nullable();
+
+ $table->decimal('sub_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_sub_total', 12, 4)->default(0)->nullable();
+ $table->decimal('sub_total_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_sub_total_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('sub_total_refunded', 12, 4)->default(0)->nullable();
+ $table->decimal('base_sub_total_refunded', 12, 4)->default(0)->nullable();
+
+ $table->decimal('discount_percent', 12, 4)->default(0)->nullable();
+ $table->decimal('discount_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_discount_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('discount_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_discount_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('discount_refunded', 12, 4)->default(0)->nullable();
+ $table->decimal('base_discount_refunded', 12, 4)->default(0)->nullable();
+
+ $table->decimal('tax_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_tax_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('tax_amount_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_tax_amount_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('tax_amount_refunded', 12, 4)->default(0)->nullable();
+ $table->decimal('base_tax_amount_refunded', 12, 4)->default(0)->nullable();
+
+ $table->decimal('shipping_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_shipping_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('shipping_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_shipping_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('shipping_refunded', 12, 4)->default(0)->nullable();
+ $table->decimal('base_shipping_refunded', 12, 4)->default(0)->nullable();
+
+ $table->integer('marketplace_seller_id')->unsigned();
+ $table->integer('order_id')->unsigned();
+ $table->foreign('marketplace_seller_id')->references('id')->on('marketplace_sellers')->onDelete('cascade');
+ $table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade');
+ $table->unique(['marketplace_seller_id', 'order_id']);
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_orders');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_07_185328_create_marketplace_order_items_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_07_185328_create_marketplace_order_items_table.php
new file mode 100644
index 000000000..43a196fe6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_07_185328_create_marketplace_order_items_table.php
@@ -0,0 +1,52 @@
+increments('id');
+
+ $table->decimal('commission', 12, 4)->default(0)->nullable();
+ $table->decimal('base_commission', 12, 4)->default(0)->nullable();
+
+ $table->decimal('commission_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_commission_invoiced', 12, 4)->default(0)->nullable();
+
+ $table->decimal('seller_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_seller_total', 12, 4)->default(0)->nullable();
+
+ $table->decimal('seller_total_invoiced', 12, 4)->default(0)->nullable();
+ $table->decimal('base_seller_total_invoiced', 12, 4)->default(0)->nullable();
+
+ $table->integer('order_item_id')->unsigned();
+ $table->integer('marketplace_product_id')->nullable()->unsigned();
+ $table->integer('marketplace_order_id')->unsigned();
+ $table->integer('parent_id')->unsigned()->nullable();
+
+ $table->foreign('order_item_id')->references('id')->on('order_items')->onDelete('cascade');
+ $table->foreign('marketplace_product_id')->references('id')->on('marketplace_products')->onDelete('set null');
+ $table->foreign('marketplace_order_id')->references('id')->on('marketplace_orders')->onDelete('cascade');
+ $table->foreign('parent_id')->references('id')->on('marketplace_order_items')->onDelete('cascade');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_order_items');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_163303_create_marketplace_shipments_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_163303_create_marketplace_shipments_table.php
new file mode 100644
index 000000000..2cf2ecf8f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_163303_create_marketplace_shipments_table.php
@@ -0,0 +1,39 @@
+increments('id');
+
+ $table->integer('total_qty')->nullable();
+
+ $table->integer('shipment_id')->unsigned();
+ $table->foreign('shipment_id')->references('id')->on('shipments')->onDelete('cascade');
+
+ $table->integer('marketplace_order_id')->unsigned();
+ $table->foreign('marketplace_order_id')->references('id')->on('marketplace_orders')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_shipments');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_163341_create_marketplace_shipment_items_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_163341_create_marketplace_shipment_items_table.php
new file mode 100644
index 000000000..2cbc990da
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_163341_create_marketplace_shipment_items_table.php
@@ -0,0 +1,36 @@
+increments('id');
+
+ $table->integer('marketplace_shipment_id')->unsigned();
+ $table->foreign('marketplace_shipment_id')->references('id')->on('marketplace_shipments')->onDelete('cascade');
+
+ $table->integer('shipment_item_id')->unsigned();
+ $table->foreign('shipment_item_id')->references('id')->on('shipment_items')->onDelete('cascade');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_shipment_items');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_182037_create_marketplace_invoices_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_182037_create_marketplace_invoices_table.php
new file mode 100644
index 000000000..2db07d611
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_182037_create_marketplace_invoices_table.php
@@ -0,0 +1,57 @@
+increments('id');
+
+ $table->string('state')->nullable();
+ $table->boolean('email_sent')->default(0);
+
+ $table->integer('total_qty')->nullable();
+
+ $table->decimal('sub_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_sub_total', 12, 4)->default(0)->nullable();
+
+ $table->decimal('grand_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_grand_total', 12, 4)->default(0)->nullable();
+
+ $table->decimal('shipping_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_shipping_amount', 12, 4)->default(0)->nullable();
+
+ $table->decimal('tax_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_tax_amount', 12, 4)->default(0)->nullable();
+
+ $table->decimal('discount_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_discount_amount', 12, 4)->default(0)->nullable();
+
+ $table->integer('invoice_id')->unsigned();
+ $table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
+
+ $table->integer('marketplace_order_id')->unsigned();
+ $table->foreign('marketplace_order_id')->references('id')->on('marketplace_orders')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_invoices');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_182104_create_marketplace_invoice_items_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_182104_create_marketplace_invoice_items_table.php
new file mode 100644
index 000000000..12cbccaa7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_11_182104_create_marketplace_invoice_items_table.php
@@ -0,0 +1,36 @@
+increments('id');
+
+ $table->integer('marketplace_invoice_id')->unsigned();
+ $table->foreign('marketplace_invoice_id')->references('id')->on('marketplace_invoices')->onDelete('cascade');
+
+ $table->integer('invoice_item_id')->unsigned();
+ $table->foreign('invoice_item_id')->references('id')->on('invoice_items')->onDelete('cascade');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_invoice_items');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_16_130617_create_marketplace_transactions_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_16_130617_create_marketplace_transactions_table.php
new file mode 100644
index 000000000..186346832
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_01_16_130617_create_marketplace_transactions_table.php
@@ -0,0 +1,42 @@
+increments('id');
+ $table->string('type')->nullable();
+ $table->string('transaction_id')->unique();
+ $table->string('method')->nullable();
+ $table->text('comment')->nullable();
+
+ $table->decimal('base_total', 12, 4)->default(0)->nullable();
+
+ $table->integer('marketplace_seller_id')->unsigned();
+ $table->integer('marketplace_order_id')->unsigned();
+ $table->foreign('marketplace_seller_id')->references('id')->on('marketplace_sellers')->onDelete('cascade');
+ $table->foreign('marketplace_order_id')->references('id')->on('marketplace_orders')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_transactions');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_05_24_184029_rename_discount_invoiced_columns_in_marketplace_orders_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_05_24_184029_rename_discount_invoiced_columns_in_marketplace_orders_table.php
new file mode 100644
index 000000000..f81615530
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_05_24_184029_rename_discount_invoiced_columns_in_marketplace_orders_table.php
@@ -0,0 +1,33 @@
+renameColumn('discount_invoiced', 'discount_amount_invoiced');
+ $table->renameColumn('base_discount_invoiced', 'base_discount_amount_invoiced');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('marketplace_orders', function (Blueprint $table) {
+ //
+ });
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_10_24_105250_create_marketplace_refunds_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_10_24_105250_create_marketplace_refunds_table.php
new file mode 100644
index 000000000..3f221f93d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_10_24_105250_create_marketplace_refunds_table.php
@@ -0,0 +1,66 @@
+increments('id');
+
+ $table->string('increment_id')->nullable();
+ $table->string('state')->nullable();
+ $table->boolean('email_sent')->default(0);
+
+ $table->integer('total_qty')->nullable();
+
+ $table->decimal('adjustment_refund', 12, 4)->default(0)->nullable();
+ $table->decimal('base_adjustment_refund', 12, 4)->default(0)->nullable();
+
+ $table->decimal('adjustment_fee', 12, 4)->default(0)->nullable();
+ $table->decimal('base_adjustment_fee', 12, 4)->default(0)->nullable();
+
+ $table->decimal('sub_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_sub_total', 12, 4)->default(0)->nullable();
+
+ $table->decimal('grand_total', 12, 4)->default(0)->nullable();
+ $table->decimal('base_grand_total', 12, 4)->default(0)->nullable();
+
+ $table->decimal('shipping_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_shipping_amount', 12, 4)->default(0)->nullable();
+
+ $table->decimal('tax_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_tax_amount', 12, 4)->default(0)->nullable();
+
+ $table->decimal('discount_percent', 12, 4)->default(0)->nullable();
+ $table->decimal('discount_amount', 12, 4)->default(0)->nullable();
+ $table->decimal('base_discount_amount', 12, 4)->default(0)->nullable();
+
+ $table->integer('refund_id')->unsigned()->nullable();
+ $table->foreign('refund_id')->references('id')->on('refunds')->onDelete('cascade');
+
+ $table->integer('marketplace_order_id')->unsigned()->nullable();
+ $table->foreign('marketplace_order_id')->references('id')->on('marketplace_orders')->onDelete('cascade');
+
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_refunds');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_10_24_105315_create_marketplace_refund_items_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_10_24_105315_create_marketplace_refund_items_table.php
new file mode 100644
index 000000000..736ac228e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_10_24_105315_create_marketplace_refund_items_table.php
@@ -0,0 +1,38 @@
+increments('id');
+
+ $table->integer('marketplace_refund_id')->unsigned();
+ $table->foreign('marketplace_refund_id')->references('id')->on('marketplace_refunds')->onDelete('cascade');
+
+ $table->integer('refund_item_id')->unsigned();
+ $table->foreign('refund_item_id')->references('id')->on('refund_items')->onDelete('cascade');
+
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_refund_items');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2019_11_18_125848_add_commission_enable_and_commission_percentage_to_marketplace_sellers_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2019_11_18_125848_add_commission_enable_and_commission_percentage_to_marketplace_sellers_table.php
new file mode 100644
index 000000000..39f1c396f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2019_11_18_125848_add_commission_enable_and_commission_percentage_to_marketplace_sellers_table.php
@@ -0,0 +1,30 @@
+boolean('commission_enable')->default(0);
+ $table->decimal('commission_percentage', 12, 4)->default(0)->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_16_174016_create_marketplace_product_flag_reasons.php b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_16_174016_create_marketplace_product_flag_reasons.php
new file mode 100644
index 000000000..819bd2b10
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_16_174016_create_marketplace_product_flag_reasons.php
@@ -0,0 +1,33 @@
+id();
+ $table->string('reason')->nullable();
+ $table->boolean('status')->nullable()->default(true);
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_product_flag_reasons');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_16_174036_create_marketplace_seller_flag_reasons.php b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_16_174036_create_marketplace_seller_flag_reasons.php
new file mode 100644
index 000000000..efdd3bc54
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_16_174036_create_marketplace_seller_flag_reasons.php
@@ -0,0 +1,33 @@
+id();
+ $table->string('reason')->nullable();
+ $table->boolean('status')->nullable()->default(true);
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_seller_flag_reasons');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_23_160706_create_marketplace_product_flags_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_23_160706_create_marketplace_product_flags_table.php
new file mode 100644
index 000000000..dbeb88401
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_23_160706_create_marketplace_product_flags_table.php
@@ -0,0 +1,36 @@
+id();
+ $table->string('name');
+ $table->string('email');
+ $table->text('reason');
+ $table->integer('product_id')->unsigned();
+ $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('product_flags');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_23_160718_create_marketplace_seller_flags_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_23_160718_create_marketplace_seller_flags_table.php
new file mode 100644
index 000000000..a9520d3b8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2020_10_23_160718_create_marketplace_seller_flags_table.php
@@ -0,0 +1,36 @@
+id();
+ $table->string('name');
+ $table->string('email');
+ $table->text('reason');
+ $table->integer('seller_id')->unsigned();
+ $table->foreign('seller_id')->references('id')->on('marketplace_sellers')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('seller_flags');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2020_11_20_111012_add_min_order_amount_to_marketplace_sellers.php b/packages/Webkul/Marketplace/src/Database/Migrations/2020_11_20_111012_add_min_order_amount_to_marketplace_sellers.php
new file mode 100644
index 000000000..5396297ac
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2020_11_20_111012_add_min_order_amount_to_marketplace_sellers.php
@@ -0,0 +1,32 @@
+string('min_order_amount')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('marketplace_sellers', function (Blueprint $table) {
+ //
+ });
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2020_11_24_164714_add_google_analytics_to_marketplace_sellers.php b/packages/Webkul/Marketplace/src/Database/Migrations/2020_11_24_164714_add_google_analytics_to_marketplace_sellers.php
new file mode 100644
index 000000000..249ecbf51
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2020_11_24_164714_add_google_analytics_to_marketplace_sellers.php
@@ -0,0 +1,32 @@
+string('google_analytics_id')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('marketplace_sellers', function (Blueprint $table) {
+ //
+ });
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_02_25_181228_create_marketplace_product_videos_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_02_25_181228_create_marketplace_product_videos_table.php
new file mode 100644
index 000000000..4e314806f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_02_25_181228_create_marketplace_product_videos_table.php
@@ -0,0 +1,35 @@
+increments('id');
+ $table->string('type')->nullable();
+ $table->string('path');
+ $table->integer('marketplace_product_id')->unsigned();
+ $table->foreign('marketplace_product_id', 'mp_products_video_foreign')->references('id')->on('marketplace_products')->onDelete('cascade');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('marketplace_product_videos');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180258_create_mp_product_downloadable_samples_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180258_create_mp_product_downloadable_samples_table.php
new file mode 100644
index 000000000..7c009ef33
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180258_create_mp_product_downloadable_samples_table.php
@@ -0,0 +1,40 @@
+increments('id');
+ $table->string('url')->nullable();
+ $table->string('file')->nullable();
+ $table->string('file_name')->nullable();
+ $table->string('type');
+ $table->integer('sort_order')->nullable();
+
+ $table->integer('product_id')->unsigned();
+ $table->foreign('product_id')->references('id')->on('marketplace_products')->onDelete('cascade');
+
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('product_downloadable_samples');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180314_create_mp_product_downloadable_sample_translations_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180314_create_mp_product_downloadable_sample_translations_table.php
new file mode 100644
index 000000000..56b9dd045
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180314_create_mp_product_downloadable_sample_translations_table.php
@@ -0,0 +1,35 @@
+increments('id');
+ $table->string('locale');
+ $table->text('title')->nullable();
+
+ $table->integer('mp_product_downloadable_sample_id')->unsigned();
+ $table->foreign('mp_product_downloadable_sample_id', 'mp_sample_translations_sample_id_foreign')->references('id')->on('mp_product_downloadable_samples')->onDelete('cascade');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('product_downloadable_sample_translations');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180325_create_mp_product_downloadable_links_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180325_create_mp_product_downloadable_links_table.php
new file mode 100644
index 000000000..1c7ffaa2f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180325_create_mp_product_downloadable_links_table.php
@@ -0,0 +1,46 @@
+increments('id');
+ $table->string('url')->nullable();
+ $table->string('file')->nullable();
+ $table->string('file_name')->nullable();
+ $table->string('type');
+ $table->decimal('price', 12, 4)->default(0);
+ $table->string('sample_url')->nullable();
+ $table->string('sample_file')->nullable();
+ $table->string('sample_file_name')->nullable();
+ $table->string('sample_type')->nullable();
+ $table->integer('downloads')->default(0);
+ $table->integer('sort_order')->nullable();
+
+ $table->integer('product_id')->unsigned();
+ $table->foreign('product_id')->references('id')->on('marketplace_products')->onDelete('cascade');
+
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('product_downloadable_links');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180346_create_mp_product_downloadable_link_translations_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180346_create_mp_product_downloadable_link_translations_table.php
new file mode 100644
index 000000000..38b46f79f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_08_31_180346_create_mp_product_downloadable_link_translations_table.php
@@ -0,0 +1,35 @@
+increments('id');
+ $table->string('locale');
+ $table->text('title')->nullable();
+
+ $table->integer('mp_product_downloadable_link_id')->unsigned();
+ $table->foreign('mp_product_downloadable_link_id', 'mp_link_translations_link_id_foreign')->references('id')->on('mp_product_downloadable_links')->onDelete('cascade');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('mp_product_downloadable_link_translations');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_07_111018_add_seller_profile_backgroud_to_marketplace_sellers.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_07_111018_add_seller_profile_backgroud_to_marketplace_sellers.php
new file mode 100644
index 000000000..08676912a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_07_111018_add_seller_profile_backgroud_to_marketplace_sellers.php
@@ -0,0 +1,32 @@
+string('profile_background')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('marketplace_sellers', function (Blueprint $table) {
+
+ });
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_08_170638_create_seller_categories_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_08_170638_create_seller_categories_table.php
new file mode 100644
index 000000000..240159905
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_08_170638_create_seller_categories_table.php
@@ -0,0 +1,33 @@
+id();
+ $table->integer('seller_id')->unsigned();
+ $table->json('categories')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('seller_categories');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_15_125334_create_payment_requests_table.php b/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_15_125334_create_payment_requests_table.php
new file mode 100644
index 000000000..40c507d24
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Migrations/2021_09_15_125334_create_payment_requests_table.php
@@ -0,0 +1,36 @@
+id();
+ $table->double('payment_amount')->nullable();
+ $table->string('seller_name')->nullable();
+ $table->integer('seller_id')->unsigned()->nullable();
+ $table->json('order_id')->nullable();
+ $table->boolean('status')->nullable()->default(false);
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('payment_requests');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Seeders/.gitkeep b/packages/Webkul/Marketplace/src/Database/Seeders/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/packages/Webkul/Marketplace/src/Database/Seeders/ConfigTableSeeder.php b/packages/Webkul/Marketplace/src/Database/Seeders/ConfigTableSeeder.php
new file mode 100644
index 000000000..96ccd1f8a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Seeders/ConfigTableSeeder.php
@@ -0,0 +1,102 @@
+insert([
+ ['code' => 'marketplace.settings.general.status','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.featured','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.new','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.seller_approval_required','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.seller_approval_required','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.product_approval_required','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.commission_per_unit','value' => '10','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.can_create_invoice','value' => '0','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.general.can_create_shipment','value' => '0','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.page_title','value' => 'Turn Your Passion Into a Business','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.show_banner','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.layout','value' => 'layout1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.banner_content','value' => 'Shake hand with the most reported company known for eCommerce and the marketplace. We reached around all the corners of the world. We serve the customer with our best service experiences.','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.show_features','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_heading','value' => 'Attracting Features','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_info','value' => 'Want to start an online business? Before any decision, please check our unbeatable features.','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_1','value' => 'Generate Revenue','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_2','value' => 'Sell Unlimited Products','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_3','value' => 'Offer for Sellers','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_4','value' => 'Seller Dashboard','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_5','value' => 'Seller Order Managment','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_6','value' => 'Seller Branding','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_7','value' => 'Connect with Social','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_label_8','value' => 'Buyer Seller Communication','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.show_popular_sellers','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.open_shop_button_label','value' => 'Open Shop Now','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.show_open_shop_block','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.open_shop_info','value' => 'Open your online shop with us and get explore the new world with more then millions of shoppers.','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.landing_page.banner','value' => 'configuration/9OGztMGb6nKUCBbF58xpNA1EShskKjoj9iUvJCrD.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_1','value' => 'configuration/3npLBJCCEnvjtescuelWsENPEm0FzhvElzmFRWIe.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_2','value' => 'configuration/sGtL2WxTxjFypyRMioRth0y4FRJUW6pZEYKfQXq2.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_3','value' => 'configuration/kZZ5OSziGW3aQNVGkq4r4GL2VNTsQhVWLt62C0wb.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_4','value' => 'configuration/cN1NGisKLyVpsn1AldCEQg8ZZCJtSbbd5zTjZGwX.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_5','value' => 'configuration/eSHFNPfIWrw7gLffadeR4FgOgBMeQtxWWxfmB45o.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_6','value' => 'configuration/9Iggsyrd6OElGvYHg27LKfgvgLHx3hBKTXgESxYC.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_7','value' => 'configuration/YvJHOSJLldKpgi0MrgDNy0ookuAyXbYuAtQQI9am.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.feature_icon_8','value' => 'configuration/i7dgjt2Hw5xhUdmploHWMoV0aNml3W4GjEAyZm5e.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.landing_page.about_marketplace','value' => 'Why to sell with us Easily Customize your seller profile Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Add Unlimited Products Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Connect to your social profile Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Buyer can ask you a question Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
','channel_code' => 'default','locale_code' => 'en'],
+
+ // velocity configuartipon content
+
+ ['code' => 'marketplace.settings.velocity.page_title','value' => 'Turn Your Passion Into a Business','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.show_banner','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.banner_content','value' => 'Shake hand with the most reported company known for eCommerce and the marketplace. We reached around all the corners of the world. We serve the customer with our best service experiences.','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.show_features','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_heading','value' => 'Attracting Features','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_info','value' => 'Want to start an online business? Before any decision, please check our unbeatable features.','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_1','value' => 'Generate Revenue','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_2','value' => 'Sell Unlimited Products','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_3','value' => 'Offer for Sellers','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_4','value' => 'Seller Dashboard','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_5','value' => 'Seller Order Managment','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_6','value' => 'Seller Branding','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_7','value' => 'Connect with Social','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.feature_icon_label_8','value' => 'Buyer Seller Communication','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.show_popular_sellers','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.open_shop_button_label','value' => 'Open Shop Now','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.show_open_shop_block','value' => '1','channel_code' => NULL,'locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.open_shop_info','value' => 'Open your online shop with us and get explore the new world with more then millions of shoppers.','channel_code' => 'default','locale_code' => 'en'],
+
+ ['code' => 'marketplace.settings.velocity.banner','value' => 'configuration/ftpR2CDQNERkQHzY90Rty5B66WIIQyAkRIZLaxPh.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_1','value' => 'configuration/JKms7R5AeMr4xMpdYMFh6lY97O1c8uJxrOOYrJh2.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_2','value' => 'configuration/EiPYH1PP8tjqHZJAGqXwePS8sqrgQu44BAnLw7Hr.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_3','value' => 'configuration/XqCFcOKK5R7ldPWPUPaXYluQKYA63yXd9GXOAT8B.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_4','value' => 'configuration/PiAzZru2AJ31ahCPQUBmC0ubiBijVDqPLC4agxX0.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_5','value' => 'configuration/tY9AYRKXZaKyE1VMCpWlBALKcdzia7nCHcl3D7U0.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_6','value' => 'configuration/gDQelR5VoHfRL4WWznGYz4ppU2rgF6UWsNhCQGsi.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_7','value' => 'configuration/YdfbYPo8aIdup1UWaNBrQHwtOYupvknPM4UuhRDM.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.feature_icon_8','value' => 'configuration/ji3oMmcj5xenj5EKyCgmiUrkRwPkF5JG3oCrNqde.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.about_marketplace','value' => 'Why to sell with us Easily Customize your seller profile Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Add Unlimited Products Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Connect to your social profile Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Buyer can ask you a question Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.velocity.setup_icon_1','value' => 'configuration/HcNKzA9bPzfMtnN31ku98lvo42ijDfPGGkauO1Uv.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.setup_icon_2','value' => 'configuration/LoxpyCBvnFold4XeD8c4JGScwIGtxLwOjfiyyXxU.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.setup_icon_3','value' => 'configuration/7HOB5iER96qFtCpdP8JmWy6lw3QoeCY2jRKAzC6U.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.setup_icon_4','value' => 'configuration/KU4TBnxTcbME3ZAwfmVRSqM1mQWuMmIdyhS17toX.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.velocity.setup_icon_5','value' => 'configuration/lgj6ftKJCeCceXtjwK7k668CTnkjshKka0K5mO3w.png','channel_code' => 'default','locale_code' => NULL],
+ ['code' => 'marketplace.settings.product_flag.enable','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.product_flag.text','value' => 'Report Product','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.product_flag.guest_can','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.product_flag.reason','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.product_flag.other_reason','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.product_flag.other_placeholder','value' => 'Other','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.seller_flag.enable','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.seller_flag.text','value' => 'Report Seller','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.seller_flag.guest_can','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.seller_flag.reason','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.seller_flag.other_reason','value' => '1','channel_code' => 'default','locale_code' => 'en'],
+ ['code' => 'marketplace.settings.seller_flag.other_placeholder','value' => 'Other','channel_code' => 'default','locale_code' => 'en'],
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Database/Seeders/DatabaseSeeder.php b/packages/Webkul/Marketplace/src/Database/Seeders/DatabaseSeeder.php
new file mode 100644
index 000000000..9445f5696
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Seeders/DatabaseSeeder.php
@@ -0,0 +1,20 @@
+call(ConfigTableSeeder::class);
+ $this->call(ProductFlagReasonTableSeeder::class);
+ $this->call(SellerFlagReasonTableSeeder::class);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Database/Seeders/ProductFlagReasonTableSeeder.php b/packages/Webkul/Marketplace/src/Database/Seeders/ProductFlagReasonTableSeeder.php
new file mode 100644
index 000000000..3daa15612
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Seeders/ProductFlagReasonTableSeeder.php
@@ -0,0 +1,47 @@
+delete();
+
+ DB::table('marketplace_product_flag_reasons')->insert([
+ [
+ 'id' => 1,
+ 'reason' => 'duplicate product',
+ 'status' => true
+ ],
+ [
+ 'id' => 2,
+ 'reason' => 'damaged product',
+ 'status' => true
+ ],
+ [
+ 'id' => 3,
+ 'reason' => 'poor product quality',
+ 'status' => true
+ ],
+ [
+ 'id' => 4,
+ 'reason' => 'over price product',
+ 'status' => true
+ ],
+ [
+ 'id' => 5,
+ 'reason' => 'missing product parts',
+ 'status' => true
+ ],
+ [
+ 'id' => 6,
+ 'reason' => 'recieve wrong product',
+ 'status' => true
+ ]
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Database/Seeders/SellerFlagReasonTableSeeder.php b/packages/Webkul/Marketplace/src/Database/Seeders/SellerFlagReasonTableSeeder.php
new file mode 100644
index 000000000..14fbc0dbe
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Database/Seeders/SellerFlagReasonTableSeeder.php
@@ -0,0 +1,42 @@
+delete();
+
+ DB::table('marketplace_seller_flag_reasons')->insert([
+ [
+ 'id' => 1,
+ 'reason' => 'duplicate product sold by seller',
+ 'status' => true
+ ],
+ [
+ 'id' => 2,
+ 'reason' => 'damaged product sold by seller',
+ 'status' => true
+ ],
+ [
+ 'id' => 3,
+ 'reason' => 'poor product quality sold by seller',
+ 'status' => true
+ ],
+ [
+ 'id' => 4,
+ 'reason' => 'over price product sold by seller',
+ 'status' => true
+ ],
+ [
+ 'id' => 5,
+ 'reason' => 'wrong product sold by seller',
+ 'status' => true
+ ]
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Helpers/Helper.php b/packages/Webkul/Marketplace/src/Helpers/Helper.php
new file mode 100644
index 000000000..f753a744f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Helpers/Helper.php
@@ -0,0 +1,294 @@
+mpProduct = $mpProduct;
+
+ $this->productModel = $productModel;
+
+ $this->attributeOptionRepository = $attributeOptionRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->productFlatRepository = $productFlatRepository;
+
+ $this->orderBrandsRepository = $orderBrandsRepository;
+
+ $this->productReviewRepository = $productReviewRepository;
+
+ $this->velocityMetadataRepository = $velocityMetadataRepository;
+
+ $this->productInventoryRepository = $productInventoryRepository;
+ }
+
+ /**
+ * @param \Webkul\Product\Contracts\Product $product
+ * @param bool $list
+ * @param array $metaInformation
+ *
+ * @return array
+ */
+ public function formatProduct($product, $list = false, $metaInformation = [])
+ {
+ $reviewHelper = app('Webkul\Product\Helpers\Review');
+
+ $galleryImages = ProductImage::getGalleryImages($product);
+ $productImage = ProductImage::getProductBaseImage($product, $galleryImages)['medium_image_url'];
+
+ $largeProductImageName = "large-product-placeholder.png";
+ $mediumProductImageName = "meduim-product-placeholder.png";
+
+ if (strpos($productImage, $mediumProductImageName) > -1) {
+ $productImageNameCollection = explode('/', $productImage);
+ $productImageName = $productImageNameCollection[sizeof($productImageNameCollection) - 1];
+
+ if ($productImageName == $mediumProductImageName) {
+ $productImage = str_replace($mediumProductImageName, $largeProductImageName, $productImage);
+ }
+ }
+
+ $priceHTML = view('shop::products.price', ['product' => $product])->render();
+
+ $isProductNew = ($product->new && ! strpos($priceHTML, 'sticker sale') > 0) ? __('shop::app.products.new') : false;
+
+ return [
+ 'priceHTML' => $priceHTML,
+ 'avgRating' => ceil($reviewHelper->getAverageRating($product)),
+ 'totalReviews' => $reviewHelper->getTotalReviews($product),
+ 'image' => $productImage,
+ 'new' => $isProductNew,
+ 'galleryImages' => $galleryImages,
+ 'name' => $product->name,
+ 'slug' => $product->url_key,
+ 'description' => $product->description,
+ 'shortDescription' => $product->short_description,
+ 'firstReviewText' => trans('velocity::app.products.be-first-review'),
+ 'addToCartHtml' => view('shop::products.add-to-cart', [
+ 'product' => $product,
+ 'addWishlistClass' => ! (isset($list) && $list) ? '' : '',
+
+ 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
+ ? true : false,
+
+ 'btnText' => (isset($metaInformation['btnText']) && $metaInformation['btnText'])
+ ? $metaInformation['btnText'] : null,
+
+ 'moveToCart' => (isset($metaInformation['moveToCart']) && $metaInformation['moveToCart'])
+ ? $metaInformation['moveToCart'] : null,
+
+ 'addToCartBtnClass' => ! (isset($list) && $list) ? 'small-padding' : '',
+ ])->render(),
+ ];
+ }
+
+ /**
+ * @param object $product
+ *
+ * @return boolean
+ */
+ public function isSaleable($product)
+ {
+ if (isset($product->variants) && count($product->variants) > 0) {
+ foreach ($product->variants as $variant) {
+ if ($this->haveSufficientQuantity(1, $variant)) {
+ return true;
+ }
+ }
+ } else {
+ if (! $product->status) {
+ return false;
+ }
+
+ if (is_callable(config('products.isSaleable')) &&
+ call_user_func(config('products.isSaleable'), $product) === false) {
+ return false;
+ }
+
+
+ if ($this->haveSufficientQuantity(1, $product)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @param int $qty
+ * @return bool
+ */
+ public function haveSufficientQuantity(int $qty, $product): bool
+ {
+ $backorders = core()->getConfigData('catalog.inventory.stock_options.backorders');
+
+ $backorders = ! is_null ($backorders) ? $backorders : false;
+
+ return $qty <= $this->totalQuantity($product) ? true : $backorders;
+ }
+
+ /**
+ * @return int
+ */
+ public function totalQuantity($product)
+ {
+ $total = 0;
+
+ $channelInventorySourceIds = app(InventorySourceRepository::class)->getChannelInventorySourceIds();
+
+ $seller = $this->mpProduct->getSellerByProductId($product->product_id);
+
+ if ( isset($seller)) {
+ $vendorId = $seller->id;
+ } else {
+ $vendorId = 0;
+ }
+
+ $product = $this->productRepository->find($product->product_id);
+
+ $productInventories = $this->productInventoryRepository->checkInLoadedProductInventories($product);
+
+ foreach ($productInventories as $inventory) {
+
+ if (is_numeric($channelInventorySourceIds->search($inventory->inventory_source_id) ) && $inventory->vendor_id == $vendorId) {
+ $total += $inventory->qty;
+ }
+ }
+
+ $orderedInventory = $product->ordered_inventories()
+ ->where('channel_id', core()->getCurrentChannel()->id)->first();
+
+
+ if ($orderedInventory) {
+ $total -= $orderedInventory->qty;
+ }
+
+ return $total;
+ }
+
+ /**
+ * @param object $product
+ * @return bool
+ */
+ public function stockHaveSufficientQuantity($product) {
+
+ $backorders = core()->getConfigData('catalog.inventory.stock_options.backorders');
+
+ $backorders = ! is_null ($backorders) ? $backorders : false;
+
+ if (isset($product->variants) && count($product->variants)) {
+ foreach ($product->variants as $variant) {
+ if ($this->haveSufficientQuantity(1, $variant)) {
+ return true;
+ }
+ }
+ } else {
+ if ($this->haveSufficientQuantity(1, $product)) {
+ return true;
+ }
+ }
+
+
+ return $backorders;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Helpers/Price.php b/packages/Webkul/Marketplace/src/Helpers/Price.php
new file mode 100644
index 000000000..5e77f2d92
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Helpers/Price.php
@@ -0,0 +1,206 @@
+customerGroupRepository = $customerGroupRepository;
+
+ $this->catalogRuleProductPriceRepository = $catalogRuleProductPriceRepository;
+
+ $this->catalogRuleProductPriceHelper = $catalogRuleProductPriceHelper;
+ }
+
+ /**
+ * Returns the product's minimal price
+ *
+ * @param Product $product
+ * @return float
+ */
+ public function getMinimalPrice($product)
+ {
+ static $price = [];
+
+ if(array_key_exists($product->id, $price))
+ return $price[$product->id];
+
+ if ($product->type == 'configurable') {
+ return $price[$product->id] = $this->getVariantMinPrice($product);
+ } else {
+ if ($this->haveSpecialPrice($product))
+ return $price[$product->id] = $product->special_price;
+
+ return $price[$product->id] = $product->price;
+ }
+ }
+
+ /**
+ * Returns the product's minimal price
+ *
+ * @param Product $product
+ * @return float
+ */
+ public function getVariantMinPrice($product)
+ {
+ static $price = [];
+
+ $finalPrice = [];
+
+ $productId = $product->id;
+
+ // if (array_key_exists($productId, $price))
+ // return $price[$product->id];
+
+ if ($product instanceof ProductFlat) {
+ $productId = $product->product_id;
+ } else {
+ $productId = $product->id;
+ }
+
+ $qb = ProductFlat::join('products', 'product_flat.product_id', '=', 'products.id')
+ ->where('products.parent_id', $productId);
+
+ $result = $qb
+ ->distinct()
+ ->selectRaw('IF( product_flat.special_price_from IS NOT NULL
+ AND product_flat.special_price_to IS NOT NULL , IF( NOW( ) >= product_flat.special_price_from
+ AND NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , IF( product_flat.special_price_from IS NULL , IF( product_flat.special_price_to IS NULL , IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , IF( NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) ) , IF( product_flat.special_price_to IS NULL , IF( NOW( ) >= product_flat.special_price_from, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , product_flat.price ) ) ) AS final_price')
+ ->where('product_flat.channel', core()->getCurrentChannelCode())
+ ->where('product_flat.locale', app()->getLocale())
+ ->get();
+
+ foreach ($result as $price) {
+ $finalPrice[] = $price->final_price;
+ }
+
+ $rulePrice = null;
+
+ if (request()->route()->getPrefix() != 'admin/catalog') {
+ $rulePrice = $this->catalogRuleProductPriceRepository->scopeQuery(function($query) use($product) {
+ return $query->selectRaw('min(price) as price')
+ ->whereIn('product_id', $product->variants()->pluck('id')->toArray())
+ ->where('channel_id', core()->getCurrentChannel()->id)
+ ->where('customer_group_id', $this->getCurrentCustomerGroupId())
+ ->where('rule_date', Carbon::now()->format('Y-m-d'));
+ })->first();
+ }
+
+ if (empty($finalPrice) && ! $rulePrice)
+ return $price[$productId] = 0;
+
+ if ($rulePrice && $rulePrice->price && min($finalPrice) > $rulePrice->price)
+ return $price[$productId] = $rulePrice->price;
+
+ return $price[$productId] = count($finalPrice) ? min($finalPrice) : 0;
+ }
+
+ /**
+ * Returns the product's minimal price
+ *
+ * @param Product $product
+ * @return float
+ */
+ public function getSpecialPrice($product)
+ {
+ static $price = [];
+
+ if(array_key_exists($product->id, $price))
+ return $price[$product->id];
+
+ if ($this->haveSpecialPrice($product)) {
+ return $price[$product->id] = $product->special_price;
+ } else {
+ return $price[$product->id] = $product->price;
+ }
+ }
+
+ /**
+ * @param Product $product
+ * @return boolean
+ */
+ public function haveSpecialPrice($product)
+ {
+ if ($product instanceof ProductFlat) {
+ $rulePrice = $this->catalogRuleProductPriceHelper->getRulePrice($product->product);
+ } else {
+ $rulePrice = $this->catalogRuleProductPriceHelper->getRulePrice($product);
+ }
+
+ if ((is_null($product->special_price) || ! (float) $product->special_price) && ! $rulePrice)
+ return false;
+
+ if (! (float) $product->special_price) {
+ if ($rulePrice) {
+ $product->special_price = $rulePrice->price;
+
+ return true;
+ }
+ } else {
+ if ($rulePrice && $rulePrice->price <= $product->special_price) {
+ $product->special_price = $rulePrice->price;
+
+ return true;
+ } else {
+ if (core()->isChannelDateInInterval($product->special_price_from, $product->special_price_to)) {
+ return true;
+ } else if ($rulePrice) {
+ $this->product->special_price = $rulePrice->price;
+
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns current customer group id
+ *
+ * @return integer|null
+ */
+ public function getCurrentCustomerGroupId()
+ {
+ $guard = request()->has('token') ? 'api' : 'customer';
+
+ if (auth()->guard($guard)->check()) {
+ $customerGroupId = auth()->guard($guard)->user()->customer_group_id;
+ } else {
+ $customerGroupId = $this->customerGroupRepository->findOneByField('code', 'guest')->id;
+ }
+
+ return $customerGroupId;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/Controller.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/Controller.php
new file mode 100644
index 000000000..9e76a7354
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/Controller.php
@@ -0,0 +1,13 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CustomerController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * CustomerRepository object
+ *
+ * @var array
+ */
+ protected $customerRepository;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param \Webkul\Customer\Repositories\CustomerRepository $customerRepository
+ * @param \Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ */
+ public function __construct(
+ CustomerRepository $customerRepository,
+ SellerRepository $sellerRepository
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->middleware('admin');
+
+ $this->customerRepository = $customerRepository;
+
+ $this->sellerRepository = $sellerRepository;
+ }
+
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update(Request $request, $id)
+ {
+ $data = request()->all();
+
+ $this->validate(request(), [
+ 'first_name' => 'string|required',
+ 'last_name' => 'string|required',
+ 'gender' => 'required',
+ 'email' => 'required|unique:customers,email,'. $id,
+ 'date_of_birth' => 'date|before:today'
+ ]);
+
+ $this->customerRepository->update(request()->all(), $id);
+
+ $seller = app('Webkul\Marketplace\Repositories\SellerRepository')->findOneWhere([
+ 'customer_id' => $id
+ ]);
+
+ if ($seller) {
+ if (isset($data['commission_enable'])) {
+ $sellerData['commission_enable'] = $data['commission_enable'];
+ $sellerData['commission_percentage'] = $data['commission_percentage'];
+ } else {
+ $sellerData['commission_enable'] = 0;
+ $sellerData['commission_percentage'] = 0;
+ }
+
+ $this->sellerRepository->update($sellerData, $seller->id);
+ }
+
+ session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Customer']));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/OrderController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/OrderController.php
new file mode 100644
index 000000000..1864e6566
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/OrderController.php
@@ -0,0 +1,81 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class OrderController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * OrderRepository object
+ *
+ * @var object
+ */
+ protected $orderRepository;
+
+ /**
+ * TransactionRepository object
+ *
+ * @var object
+ */
+ protected $transactionRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\TransactionRepository $transactionRepository
+ * @return void
+ */
+ public function __construct(
+ OrderRepository $orderRepository,
+ TransactionRepository $transactionRepository
+ )
+ {
+ $this->orderRepository = $orderRepository;
+
+ $this->transactionRepository = $transactionRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Method to populate the seller order page which will be populated.
+ *
+ * @return Mixed
+ */
+ public function index($url)
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Pay seller
+ *
+ * @return Mixed
+ */
+ public function pay()
+ {
+ if ($this->transactionRepository->paySeller(request()->all())) {
+ session()->flash('success', trans('marketplace::app.admin.orders.payment-success-msg'));
+ }
+
+ return redirect()->back();
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/PaymentRequestController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/PaymentRequestController.php
new file mode 100644
index 000000000..8309bbae9
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/PaymentRequestController.php
@@ -0,0 +1,97 @@
+sellerRepository = $sellerRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->transactionRepository = $transactionRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+
+
+
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Update the order for payment and sends mails to admin.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function requestPayment($orderId)
+ {
+ $orderRepository = $this->orderRepository->findOneWhere(['order_id' => $orderId]);
+
+ if($orderRepository) {
+
+ $orderRepository->update(['seller_payout_status' => 'requested']);
+
+ session()->flash('success', 'Payment has been requested');
+ }
+
+ return redirect()->back();
+ }
+
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ProductController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ProductController.php
new file mode 100644
index 000000000..bb119b763
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ProductController.php
@@ -0,0 +1,141 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $productRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\ProductRepository $productRepository
+ * @return void
+ */
+ public function __construct(ProductRepository $productRepository)
+ {
+ $this->_config = request('_config');
+
+ $this->productRepository = $productRepository;
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return Mixed
+ */
+ public function index()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function destroy($id)
+ {
+ $this->productRepository->delete($id);
+
+ session()->flash('success', trans('marketplace::app.admin.response.delete-success', ['name' => 'Product']));
+
+ return response()->json(['message' => true], 200);
+ }
+
+ /**
+ * Mass Delete the products
+ *
+ * @return response
+ */
+ public function massDestroy()
+ {
+ $productIds = explode(',', request()->input('indexes'));
+
+ foreach ($productIds as $productId) {
+ $product = $this->productRepository->find($productId);
+
+
+ if ($product) {
+ $this->productRepository->delete($product->id);
+ }
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.products.mass-delete-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Mass updates the products
+ *
+ * @return response
+ */
+ public function massUpdate()
+ {
+ $data = request()->all();
+
+ if (! isset($data['massaction-type']) || !$data['massaction-type'] == 'update') {
+ return redirect()->back();
+ }
+
+ $productIds = explode(',', $data['indexes']);
+
+ foreach ($productIds as $productId) {
+ $sellerProduct = $this->productRepository->find($productId);
+
+ if ($sellerProduct) {
+ $product = $sellerProduct->product;
+
+ $sellerProduct->update([
+ 'is_approved' => $data['update-options']
+ ]);
+
+ if ($data['update-options']) {
+ try {
+ Mail::send(new ProductApprovalNotification($sellerProduct));
+ } catch (\Exception $e) {
+
+ }
+ } else {
+ try {
+ Mail::send(new ProductDisapprovalNotification($sellerProduct));
+ } catch (\Exception $e) {
+
+ }
+ }
+ }
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.products.mass-update-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ProductFlagReasonController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ProductFlagReasonController.php
new file mode 100644
index 000000000..6a8b78507
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ProductFlagReasonController.php
@@ -0,0 +1,149 @@
+_config = request('_config');
+
+ $this->productFlagReasonRepository = $productFlagReasonRepository;
+
+ $this->middleware('admin');
+
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function create()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @return \Illuminate\Http\Response
+ */
+ public function store(Request $request)
+ {
+
+ $this->productFlagReasonRepository->create(request()->all());
+
+ session()->flash('success', trans('marketplace::app.admin.products.flag.create-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+
+
+ /**
+ * Show the form for editing the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function edit($id)
+ {
+ $flagReason = $this->productFlagReasonRepository->find($id);
+
+ return view($this->_config['view'], compact('flagReason'));
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update($id)
+ {
+ $flagReason = $this->productFlagReasonRepository->find($id);
+
+ $data = request()->all();
+
+ $data['status'] = $data['status'] == 'on' ? 1 : 0;
+
+ $flagReason->update($data);
+
+ session()->flash('success', trans('marketplace::app.admin.products.flag.update-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function delete($id)
+ {
+ $flagReason = $this->productFlagReasonRepository->delete($id);
+
+ session()->flash('success', trans('marketplace::app.admin.products.flag.delete-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * To mass delete the customer
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function massDelete()
+ {
+ $flagReasonIds = explode(',', request()->input('indexes'));
+
+ foreach ($flagReasonIds as $flagReasonId) {
+ $this->productFlagReasonRepository->deleteWhere(['id' => $flagReasonId]);
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.products.flag.delete-success'));
+
+ return redirect()->back();
+
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ReviewController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ReviewController.php
new file mode 100644
index 000000000..9f35cbbef
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/ReviewController.php
@@ -0,0 +1,81 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReviewController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * ReviewRepository object
+ *
+ * @var array
+ */
+ protected $reviewRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\ReviewRepository $reviewRepository
+ * @return void
+ */
+ public function __construct(
+ ReviewRepository $reviewRepository
+ )
+ {
+ $this->reviewRepository = $reviewRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Method to populate the seller review page which will be populated.
+ *
+ * @return Mixed
+ */
+ public function index($url)
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Mass updates the products
+ *
+ * @return response
+ */
+ public function massUpdate()
+ {
+ $data = request()->all();
+
+ if (! isset($data['massaction-type']) || !$data['massaction-type'] == 'update') {
+ return redirect()->back();
+ }
+
+ $reviewIds = explode(',', $data['indexes']);
+
+ foreach ($reviewIds as $reviewId) {
+ $this->reviewRepository->update([
+ 'status' => $data['update-options']
+ ], $reviewId);
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.reviews.mass-update-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerCategoryController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerCategoryController.php
new file mode 100644
index 000000000..7e4b8644a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerCategoryController.php
@@ -0,0 +1,196 @@
+_config = request('_config');
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->categoryRepository = $categoryRepository;
+
+ $this->sellerCategoryRepository = $sellerCategoryRepository;
+
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function create()
+ {
+ $sellers = $this->sellerRepository->all();
+
+ $categories = $this->categoryRepository->getCategoryTree();
+
+ return view($this->_config['view'], compact('sellers', 'categories'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @return \Illuminate\Http\Response
+ */
+ public function store(Request $request)
+ {
+ $data = request()->all();
+
+ $data['categories'] = json_encode($data['categories']);
+
+ $this->sellerCategoryRepository->create($data);
+
+ session()->flash('success', __('marketplace::app.admin.sellers.category.save-success.'));
+
+ return redirect()->route('admin.marketplace.seller.category.index');
+ }
+
+ /**
+ * Display the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function show($id)
+ {
+ //
+ }
+
+ /**
+ * Show the form for editing the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function edit($id)
+ {
+
+ $sellerCategories = $this->sellerCategoryRepository->find($id);
+
+ $sellers = $this->sellerRepository->all();
+
+ $categories = $this->categoryRepository->getCategoryTree();
+
+ return view($this->_config['view'], compact('sellers', 'categories', 'sellerCategories'));
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update(Request $request, $id)
+ {
+ $sellerCategories = $this->sellerCategoryRepository->find($id);
+
+ $sellerCategories->update(request()->all());
+
+ session()->flash('success', __('marketplace::app.admin.sellers.category.update-success'));
+
+ return redirect()->route('admin.marketplace.seller.category.index');
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function destroy($id)
+ {
+ $sellerCategories = $this->sellerCategoryRepository->find($id);
+
+ $sellerCategories->delete();
+
+ session()->flash('success', __('marketplace::app.admin.sellers.category.delete-success'));
+
+ return redirect()->route('admin.marketplace.seller.category.index');
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function massDestroy()
+ {
+ $indexs = request()->all();
+
+ foreach($indexs as $id) {
+
+ $sellerCategories = $this->sellerCategoryRepository->find($id);
+
+ $sellerCategories->delete();
+ }
+
+
+ session()->flash('success', __('marketplace::app.admin.sellers.category.delete-success'));
+
+ return redirect()->route('admin.marketplace.seller.category.index');
+ }
+
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerController.php
new file mode 100644
index 000000000..0dfe98c7b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerController.php
@@ -0,0 +1,324 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $sellerProduct;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $product;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\ProductRepository $sellerProduct
+ * @param Webkul\Product\Repositories\ProductRepository $product
+ * @return void
+ */
+ public function __construct(SellerRepository $sellerRepository, SellerProduct $sellerProduct, Product $product)
+ {
+ $this->_config = request('_config');
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->sellerProduct = $sellerProduct;
+
+ $this->product = $product;
+ }
+
+ /**
+ * Display seller create form.
+ *
+ * @return Mixed
+ */
+ public function create()
+ {
+ return view($this->_config['view']);
+ }
+
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return Mixed
+ */
+ public function index()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function destroy($id)
+ {
+ $this->sellerRepository->delete($id);
+
+ session()->flash('success', trans('marketplace::app.admin.response.delete-success', ['name' => 'Seller']));
+
+ return redirect()->back();
+ }
+
+ /**
+ * Mass Delete the sellers
+ *
+ * @return response
+ */
+ public function massDestroy()
+ {
+ $sellerIds = explode(',', request()->input('indexes'));
+
+ foreach ($sellerIds as $sellerId) {
+ $this->sellerRepository->delete($sellerId);
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.sellers.mass-delete-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Mass updates the sellers
+ *
+ * @return response
+ */
+ public function massUpdate()
+ {
+ $data = request()->all();
+
+ if (! isset($data['massaction-type']) || !$data['massaction-type'] == 'update') {
+ return redirect()->back();
+ }
+
+ $sellerIds = explode(',', $data['indexes']);
+
+ foreach ($sellerIds as $sellerId) {
+ $this->sellerRepository->update([
+ 'is_approved' => $data['update-options']
+ ], $sellerId);
+
+ if ($data['update-options']) {
+ $seller = $this->sellerRepository->find($sellerId);
+
+ try {
+ Mail::send(new SellerApprovalNotification($seller));
+ } catch (\Exception $e) {
+ }
+ } else {
+ $seller = $this->sellerRepository->find($sellerId);
+
+ try {
+ Mail::send(new SellerDisapprovalNotification($seller));
+ } catch (\Exception $e) {
+ }
+ }
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.sellers.mass-update-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param int $sellerId
+ * @return \Illuminate\Http\Response
+ */
+ public function search($id)
+ {
+ if (request()->input('query')) {
+ $results = [];
+
+ foreach ($this->sellerProduct->searchProducts(request()->input('query')) as $row) {
+ $results[] = [
+ 'id' => $row->product_id,
+ 'sku' => $row->sku,
+ 'name' => $row->name,
+ 'price' => core()->convertPrice($row->price),
+ 'formated_price' => core()->currency(core()->convertPrice($row->price)),
+ 'base_image' => $row->product->base_image_url,
+ ];
+ }
+
+ return response()->json($results);
+ } else {
+ return view($this->_config['view'], compact('id'));
+ }
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param int $sellerId, $productId
+ * @return \Illuminate\Http\Response
+ */
+ public function assignProduct($sellerId, $productId)
+ {
+ $product = $this->sellerProduct->findOneWhere([
+ 'product_id' => $productId,
+ 'marketplace_seller_id' => $sellerId
+ ]);
+
+
+ if ($product) {
+ session()->flash('error', 'You are already selling this product..');
+
+ return redirect()->route('admin.marketplace.sellers.index');
+ }
+
+ $baseProduct = $this->product->find($productId);
+
+ if ($baseProduct->type != "simple" && $baseProduct->type != "configurable" && $baseProduct->type != "virtual" && $baseProduct->type != "downloadable") {
+ session()->flash('error', $baseProduct->type.' product cannot be assigned to seller');
+
+ return redirect()->route('admin.marketplace.sellers.index');
+ }
+
+ $inventorySources = core()->getCurrentChannel()->inventory_sources;
+
+ return view($this->_config['view'], compact('baseProduct', 'inventorySources'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param int $sellerId, $productId
+ * @return \Illuminate\Http\Response
+ */
+ public function saveAssignProduct($sellerId, $productId)
+ {
+ $this->validate(request(), [
+ 'condition' => 'required',
+ 'description' => 'required'
+ ]);
+
+ $data = array_merge(request()->all(), [
+ 'product_id' => $productId,
+ 'is_owner' => 0,
+ 'seller_id' => $sellerId
+ ]);
+
+ $product = $this->sellerProduct->createAssign($data);
+
+ if ($product->product->type == 'downloadable') {
+
+ session()->flash('warning', 'Please fill downloadable fields');
+
+ return redirect()->route('admin.marketplace.products.edit-assign', $product->id);
+ }
+
+ session()->flash('success', 'Product created successfully.');
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function edit($id)
+ {
+ $product = $this->sellerProduct->findorFail($id);
+
+ if ($product->parent) {
+ return redirect()->route('admin.marketplace.products.edit-assign', ['id' => $product->parent->id]);
+ }
+
+ $inventorySources = core()->getCurrentChannel()->inventory_sources;
+
+ return view($this->_config['view'], compact('product', 'inventorySources'));
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update($id)
+ {
+ $this->validate(request(), [
+ 'condition' => 'required',
+ 'description' => 'required'
+ ]);
+
+ $data = request()->all();
+
+ $this->sellerProduct->updateAssign($data, $id);
+
+ session()->flash('success', 'Product updated successfully.');
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Edit seller profile
+ */
+ public function editProfile($id)
+ {
+ $seller = $this->sellerRepository->find($id);
+
+ return view($this->_config['view'], compact('seller'));
+ }
+
+ /**
+ * Update seller profile
+ */
+ public function updateProfile($id)
+ {
+ $seller = $this->sellerRepository->find($id);
+ $seller->update(request()->all());
+
+ session()->flash('success', __('marketplace::app.admin.sellers.update-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerFlagReasonController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerFlagReasonController.php
new file mode 100644
index 000000000..8d1c9fe4d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/SellerFlagReasonController.php
@@ -0,0 +1,148 @@
+_config = request('_config');
+
+ $this->sellerFlagReasonRepository = $sellerFlagReasonRepository;
+
+ $this->middleware('admin');
+
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function create()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @return \Illuminate\Http\Response
+ */
+ public function store(Request $request)
+ {
+
+ $this->sellerFlagReasonRepository->create(request()->all());
+
+ session()->flash('success', trans('marketplace::app.admin.sellers.flag.create-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+
+
+ /**
+ * Show the form for editing the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function edit($id)
+ {
+ $flagReason = $this->sellerFlagReasonRepository->find($id);
+
+ return view($this->_config['view'], compact('flagReason'));
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update(Request $request, $id)
+ {
+ $flagReason = $this->sellerFlagReasonRepository->find($id);
+
+ $data = request()->all();
+
+ $data['status'] = $data['status'] == 'on' ? 1 : 0;
+
+ $flagReason->update($data);
+
+ session()->flash('success', trans('marketplace::app.admin.sellers.flag.update-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function delete($id)
+ {
+ $flagReason = $this->sellerFlagReasonRepository->delete($id);
+
+ session()->flash('success', __('marketplace::app.admin.sellers.flag.delete-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * To mass delete the customer
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function massDelete()
+ {
+ $flagReasonIds = explode(',', request()->input('indexes'));
+
+ foreach ($flagReasonIds as $flagReasonId) {
+ $this->sellerFlagReasonRepository->deleteWhere(['id' => $flagReasonId]);
+ }
+
+ session()->flash('success', trans('marketplace::app.admin.sellers.flag.delete-success'));
+
+ return redirect()->back();
+
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Admin/TransactionController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/TransactionController.php
new file mode 100644
index 000000000..177e58356
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Admin/TransactionController.php
@@ -0,0 +1,63 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class TransactionController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * OrderRepository object
+ *
+ * @var mixed
+ */
+ protected $orderRepository;
+
+ /**
+ * TransactionRepository object
+ *
+ * @var mixed
+ */
+ protected $transactionRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\TransactionRepository $transactionRepository
+ * @return void
+ */
+ public function __construct(
+ OrderRepository $orderRepository,
+ TransactionRepository $transactionRepository
+ )
+ {
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ return view($this->_config['view']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php
new file mode 100644
index 000000000..19469e753
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php
@@ -0,0 +1,289 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class AssignProductController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * InventorySourceRepository object
+ *
+ * @var array
+ */
+ protected $inventorySource;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $product;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $sellerProduct;
+
+ /**
+ * productDownloadableSampleRepository object
+ *
+ * @var array
+ */
+ protected $productDownloadableSampleRepository;
+
+ /**
+ * productDownloadableLinkRepository object
+ *
+ * @var array
+ */
+ protected $productDownloadableLinkRepository;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ public function __construct(
+ InventorySource $inventorySource,
+ Product $product,
+ SellerProduct $sellerProduct,
+ Seller $seller,
+ ProductDownloadableLinkRepository $productDownloadableLinkRepository,
+ ProductDownloadableSampleRepository $productDownloadableSampleRepository
+ )
+ {
+ $this->inventorySource = $inventorySource;
+
+ $this->product = $product;
+
+ $this->sellerProduct = $sellerProduct;
+
+ $this->seller = $seller;
+
+ $this->productDownloadableLinkRepository = $productDownloadableLinkRepository;
+
+ $this->productDownloadableSampleRepository = $productDownloadableSampleRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $seller = $this->seller->findOneWhere(['customer_id' => auth()->guard('customer')->user()->id])->toArray();
+
+ foreach ($seller as $key => $sellerInput) {
+ if ($key == 'logo' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.logo'));
+ }
+ if ($key == 'shop_title' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.shop_title'));
+ }
+ if ($key == 'address1' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.shop_title'));
+ }
+ if ($key == 'phone' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.phone'));
+ }
+ if ($key == 'state' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.state'));
+ }
+ if ($key == 'city' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.city'));
+ }
+ if ($key == 'country' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.country'));
+ }
+ if ($key == 'postcode' && $sellerInput == null) {
+ return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.postcode'));
+ }
+
+ }
+
+ if (request()->input('query')) {
+ $results = [];
+
+ foreach ($this->sellerProduct->searchProducts(request()->input('query')) as $row) {
+ $results[] = [
+ 'id' => $row->product_id,
+ 'sku' => $row->sku,
+ 'name' => $row->name,
+ 'price' => core()->convertPrice($row->price),
+ 'formated_price' => core()->currency($row->price),
+ 'base_image' => $row->product->base_image_url,
+ ];
+ }
+
+ return response()->json($results);
+ } else {
+ return view($this->_config['view']);
+ }
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function create($id)
+ {
+ $seller = $this->seller->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $product = $this->sellerProduct->findOneWhere([
+ 'product_id' => $id,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+
+
+ if ($product) {
+ session()->flash('error', 'You are already selling this product..');
+
+ return redirect()->route('marketplace.account.products.search');
+ }
+
+ $baseProduct = $this->product->find($id);
+
+ if ($baseProduct->type != "simple" && $baseProduct->type != "configurable" && $baseProduct->type != "virtual" && $baseProduct->type != "downloadable") {
+ session()->flash('error', $baseProduct->type.' product is not allowed to sell');
+
+ return redirect()->route('marketplace.account.products.search');
+ }
+
+ $inventorySources = core()->getCurrentChannel()->inventory_sources;
+
+ return view($this->_config['view'], compact('baseProduct', 'inventorySources'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function store($id)
+ {
+ $this->validate(request(), [
+ 'condition' => 'required',
+ 'description' => 'required'
+ ]);
+
+ $data = array_merge(request()->all(), [
+ 'product_id' => $id,
+ 'is_owner' => 0,
+ ]);
+
+ $product = $this->sellerProduct->createAssign($data);
+
+ if ($product->product->type == 'downloadable') {
+
+ session()->flash('warning', 'Please fill downloadable fields');
+
+ return redirect()->route('marketplace.account.products.edit-assign', $product->id);
+ }
+
+ session()->flash('success', 'Product created successfully.');
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function edit($id)
+ {
+ $product = $this->sellerProduct->findorFail($id);
+
+ if ($product->parent) {
+ return redirect()->route('marketplace.account.products.edit-assign', ['id' => $product->parent->id]);
+ }
+
+ $inventorySources = core()->getCurrentChannel()->inventory_sources;
+
+ return view($this->_config['view'], compact('product', 'inventorySources'));
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update($id)
+ {
+ $this->validate(request(), [
+ 'condition' => 'required',
+ 'description' => 'required'
+ ]);
+
+ $data = request()->all();
+
+ $this->sellerProduct->updateAssign($data, $id);
+
+ session()->flash('success', 'Product updated successfully.');
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Uploads downloadable file
+ *
+ * @param int $id
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function uploadLink($id)
+ {
+ return response()->json(
+ $this->productDownloadableLinkRepository->upload(request()->all(), $id)
+ );
+ }
+
+
+ /**
+ * Uploads downloadable sample file
+ *
+ * @param int $id
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function uploadSample($id)
+ {
+ return response()->json(
+ $this->productDownloadableSampleRepository->upload(request()->all(), $id)
+ );
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/CustomerController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/CustomerController.php
new file mode 100644
index 000000000..3e1d3fead
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/CustomerController.php
@@ -0,0 +1,65 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CustomerController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ *
+ * @var mixed
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Method to populate the seller review page which will be populated.
+ *
+ * @return Mixed
+ */
+ public function index()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Method to populate the seller customer order page which will be populated.
+ *
+ * @return Mixed
+ */
+ public function orders($customerId)
+ {
+ return view($this->_config['view'], compact('customerId'));
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/DashboardController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/DashboardController.php
new file mode 100644
index 000000000..e8eab4a91
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/DashboardController.php
@@ -0,0 +1,410 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class DashboardController extends Controller
+{
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $sellerRepository;
+
+ /**
+ * Seller object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ /**
+ * OrderRepository object
+ *
+ * @var array
+ */
+ protected $orderRepository;
+
+ /**
+ * OrderItemRepository object
+ *
+ * @var array
+ */
+ protected $orderItemRepository;
+
+ /**
+ * ProductInventoryRepository object
+ *
+ * @var array
+ */
+ protected $productInventoryRepository;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $startDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $lastStartDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $endDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $lastEndDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $alpha3CountryCode;
+
+
+ /**
+ * TransactionRepository object
+ *
+ * @var mixed
+ */
+ protected $transactionRepository;
+
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\OrderItemRepository $orderItemRepository
+ * @param Webkul\Product\Repositories\ProductInventoryRepository $productInventoryRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ OrderRepository $orderRepository,
+ OrderItemRepository $orderItemRepository,
+ ProductInventoryRepository $productInventoryRepository,
+ TransactionRepository $transactionRepository
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->transactionRepository = $transactionRepository;
+
+ $this->productInventoryRepository = $productInventoryRepository;
+
+ $this->alpha3CountryCode = json_decode(file_get_contents(__DIR__ . '/../../../../Data/alpha3.json'));
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $isSeller = $this->sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ $this->setStartEndDate();
+
+ $this->seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $currentCurrencyCode = core()->getCurrentCurrencyCode();
+
+
+
+ $statistics = [
+ 'total_orders' => [
+ 'previous' => $previous = $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->lastStartDate)
+ ->where('marketplace_orders.created_at', '<=', $this->lastEndDate);
+ })->count(),
+ 'current' => $current = $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->count(),
+ 'progress' => $this->getPercentageChange($previous, $current)
+ ],
+ 'total_sales' => [
+ 'previous' => $previous = $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->lastStartDate)
+ ->where('marketplace_orders.created_at', '<=', $this->lastEndDate);
+ })->sum('base_seller_total'),
+ 'current' => $current = $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->sum('base_seller_total') - $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->sum('base_grand_total_refunded') + $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->sum('base_commission_invoiced'),
+ 'progress' => $this->getPercentageChange($previous, $current)
+ ],
+ 'avg_sales' => [
+ 'previous' => $previous = $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->lastStartDate)
+ ->where('marketplace_orders.created_at', '<=', $this->lastEndDate);
+ })->avg('base_seller_total'),
+ 'current' => $current = $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->avg('base_seller_total') - $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->avg('base_grand_total_refunded') + $this->orderRepository->scopeQuery(function($query) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->avg('base_commission_invoiced'),
+ 'progress' => $this->getPercentageChange($previous, $current)
+ ],
+ 'top_selling_products' => $this->getTopSellingProducts(),
+ 'customer_with_most_sales' => $this->getCustomerWithMostSales(),
+ 'stock_threshold' => $this->getStockThreshold(),
+ 'seller_payout' => $this->getSellerPayout($this->seller)
+ ];
+
+ foreach (core()->getTimeInterval($this->startDate, $this->endDate) as $interval) {
+ $statistics['sale_graph']['label'][] = $interval['start']->format('d M');
+
+ $total = $this->orderRepository->scopeQuery(function($query) use($interval) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $interval['start'])
+ ->where('marketplace_orders.created_at', '<=', $interval['end']);
+ })->sum('base_seller_total');
+
+ $newTotal = core()->convertPrice($total ,$currentCurrencyCode);
+
+ $statistics['sale_graph']['total'][] = $newTotal;
+ $statistics['sale_graph']['formated_total'][] = core()->formatPrice($newTotal, $currentCurrencyCode);
+ }
+ // map data
+
+ $mapOrders = $this->orderRepository->scopeQuery(function($query) {
+ return $query->leftJoin('addresses','marketplace_orders.order_id','addresses.order_id')->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate)->select(DB::raw('count(*) as seller_order_count'),DB::raw('sum(base_seller_total) as seller_total'),'country')->groupBy('country');
+ })->all();
+
+
+ $data = $mapOrders->toArray();
+ foreach ($data as $key => $order) {
+ $data[$key]["country"] = $this->getAlpha3Code($order["country"]);
+ $data[$key]['seller_total'] = core()->formatPrice( core()->convertPrice($order["seller_total"], $currentCurrencyCode), $currentCurrencyCode);
+ }
+ $mapOrdersArray = json_encode($data);
+
+ $statistics['total_sales']['previous'] = core()->convertPrice($statistics['total_sales']['previous'] , $currentCurrencyCode);
+ $statistics['total_sales']['current'] = core()->convertPrice($statistics['total_sales']['current'] , $currentCurrencyCode);
+
+ $statistics['avg_sales']['previous'] = core()->convertPrice($statistics['avg_sales']['previous'] , $currentCurrencyCode);
+ $statistics['avg_sales']['current'] = core()->convertPrice($statistics['avg_sales']['current'] , $currentCurrencyCode);
+
+ return view($this->_config['view'], compact('statistics', 'mapOrdersArray','currentCurrencyCode'))->with(['startDate' => $this->startDate, 'endDate' => $this->endDate]);
+ }
+
+
+ /**
+ * returns Alpha 3 country code
+ */
+ public function getAlpha3Code ($alpha2) {
+ foreach($this->alpha3CountryCode as $code) {
+ if ($code->alpha2 == $alpha2) {
+
+ return $code->alpha3;
+ }
+ }
+ }
+
+ /**
+ * Return stock threshold.
+ *
+ * @return mixed
+ */
+ public function getStockThreshold()
+ {
+ return $this->productInventoryRepository->getModel()
+ ->leftJoin('products', 'product_inventories.product_id', 'products.id')
+ ->leftJoin('marketplace_products', 'products.id', 'marketplace_products.product_id')
+ ->select(DB::raw('SUM(qty) as total_qty'))
+ ->addSelect('product_inventories.product_id')
+ ->where('products.type', '!=', 'configurable')
+ ->where('marketplace_products.marketplace_seller_id', $this->seller->id)
+ ->where('product_inventories.vendor_id', $this->seller->id)
+ ->groupBy('product_id')
+ ->orderBy('total_qty', 'ASC')
+ ->limit(5)
+ ->get();
+ }
+
+ /**
+ * Returns top selling products
+ * @return mixed
+ */
+ public function getTopSellingProducts()
+ {
+ return $this->orderItemRepository->getModel()
+ ->leftJoin('order_items', 'marketplace_order_items.order_item_id', 'order_items.id')
+ ->leftJoin('marketplace_orders', 'marketplace_order_items.marketplace_order_id', 'marketplace_orders.id')
+ ->leftJoin('marketplace_product_images', 'marketplace_order_items.marketplace_product_id', 'marketplace_product_images.marketplace_product_id')
+ ->select(DB::raw('SUM(qty_ordered) as total_qty_ordered'))
+ ->addSelect('order_items.id', 'product_id', 'product_type', 'name', 'marketplace_product_images.path')
+ ->where('order_items.created_at', '>=', $this->startDate)
+ ->where('order_items.created_at', '<=', $this->endDate)
+ ->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->whereNull('order_items.parent_id')
+ ->groupBy('product_id')
+ ->orderBy('total_qty_ordered', 'DESC')
+ ->limit(5)
+ ->get();
+ }
+
+ /**
+ * Returns top selling products
+ *
+ * @return mixed
+ */
+ public function getCustomerWithMostSales()
+ {
+ return $this->orderRepository->getModel()
+ ->leftJoin('orders', 'marketplace_orders.order_id', 'orders.id')
+ ->select(DB::raw('SUM(marketplace_orders.base_grand_total) as total_base_grand_total'))
+ ->addSelect(DB::raw('COUNT(marketplace_orders.id) as total_orders'))
+ ->addSelect('orders.id', 'orders.customer_id', 'orders.customer_email', DB::raw('CONCAT(orders.customer_first_name, " ", orders.customer_last_name) as customer_full_name'))
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate)
+ ->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->groupBy('orders.customer_email')
+ ->orderBy('total_base_grand_total', 'DESC')
+ ->limit(5)
+ ->get();
+ }
+
+ public function getPercentageChange($previous, $current)
+ {
+ if (! $previous)
+ return $current ? 100 : 0;
+
+ return ($current - $previous) / $previous * 100;
+ }
+
+ /**
+ * Sets start and end date
+ *
+ * @return void
+ */
+ public function setStartEndDate()
+ {
+ $this->startDate = request()->get('start')
+ ? Carbon::createFromTimeString(request()->get('start') . " 00:00:01")
+ : Carbon::createFromTimeString(Carbon::now()->subDays(30)->format('Y-m-d') . " 00:00:01");
+
+ $this->endDate = request()->get('end')
+ ? Carbon::createFromTimeString(request()->get('end') . " 23:59:59")
+ : Carbon::now();
+
+ if ($this->endDate > Carbon::now())
+ $this->endDate = Carbon::now();
+
+ $this->lastStartDate = clone $this->startDate;
+ $this->lastEndDate = clone $this->startDate;
+
+ $this->lastStartDate->subDays($this->startDate->diffInDays($this->endDate));
+ }
+
+ /**
+ * Returns array with total payout and remaining
+ *
+ * @return array
+ */
+ public function getSellerPayout ($seller)
+ {
+ // @dd($this->lastStartDate, $this->lastEndDate);
+ $statistics = [
+ 'total_sale' =>
+ $totalSale = $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id)
+ ->where('marketplace_orders.created_at', '>=',$this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);
+ })->sum('base_seller_total') - $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);;
+ })->sum('base_grand_total_refunded') + $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id)
+ ->where('marketplace_orders.created_at', '>=', $this->startDate)
+ ->where('marketplace_orders.created_at', '<=', $this->endDate);;
+ })->sum('base_commission_invoiced'),
+
+
+ 'total_payout' => $totalPaid = $this->transactionRepository->scopeQuery(function($query) use ($seller) {
+ return $query->where('marketplace_transactions.marketplace_seller_id', $seller->id)
+ ->where('marketplace_transactions.created_at', '>=', $this->startDate)
+ ->where('marketplace_transactions.created_at', '<=', $this->endDate);;
+ })->sum('base_total'),
+
+ 'remaining_payout' => $totalSale - $totalPaid,
+ ];
+
+ return $statistics;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/EarningController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/EarningController.php
new file mode 100644
index 000000000..d7a66ae99
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/EarningController.php
@@ -0,0 +1,263 @@
+
+ * @copyright 2020 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class EarningController extends Controller
+{
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $sellerRepository;
+
+ /**
+ * Seller object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ /**
+ * OrderRepository object
+ *
+ * @var array
+ */
+ protected $orderRepository;
+
+ /**
+ * OrderItemRepository object
+ *
+ * @var array
+ */
+ protected $orderItemRepository;
+
+ /**
+ * ProductInventoryRepository object
+ *
+ * @var array
+ */
+ protected $productInventoryRepository;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $startDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $lastStartDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $endDate;
+
+ /**
+ * string object
+ *
+ * @var array
+ */
+ protected $lastEndDate;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\OrderItemRepository $orderItemRepository
+ * @param Webkul\Product\Repositories\ProductInventoryRepository $productInventoryRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ OrderRepository $orderRepository,
+ OrderItemRepository $orderItemRepository,
+ ProductInventoryRepository $productInventoryRepository
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->productInventoryRepository = $productInventoryRepository;
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $isSeller = $this->sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ $this->setStartEndDate();
+
+ $this->seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $statistics = [];
+
+ $dateFormat = 'd M';
+
+ if (request()->get('period') == 'year') {
+ $dateFormat = 'Y';
+ } elseif (request()->get('period') == 'month') {
+ $dateFormat = 'M Y';
+ } else {
+ $dateFormat = 'd M';
+ }
+
+ foreach ($this->getTimeInterval($this->startDate, $this->endDate) as $interval) {
+ $statistics['sale_graph']['label'][] = $interval['start']->format($dateFormat);
+
+ $query = $this->orderRepository->scopeQuery(function($query) use($interval) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $this->seller->id)
+ ->where('marketplace_orders.created_at', '>=', $interval['start'])
+ ->where('marketplace_orders.created_at', '<=', $interval['end']);
+ });
+
+ $total = $query->sum('base_seller_total');
+ $commission = $query->sum('base_commission');
+ $discount = $query->sum('base_discount_amount');
+ $orders = $query->count();
+ $totalEarning = $total - $commission;
+
+ $statistics['sale_graph']['total'][] = $total;
+ $statistics['sale_graph']['commission'][] = $commission;
+ $statistics['sale_graph']['orders'][] = $orders;
+ $statistics['sale_graph']['total_earning'][] = $totalEarning;
+ $statistics['sale_graph']['discount'][] = $discount;
+
+ $statistics['sale_graph']['formated_total'][] = core()->formatBasePrice($total);
+ }
+
+ // dd($statistics);
+ return view($this->_config['view'], compact('statistics'))->with(['startDate' => $this->startDate, 'endDate' => $this->endDate]);
+ }
+
+
+ /**
+ * Returns time intervals
+ *
+ * @param \Illuminate\Support\Carbon $startDate
+ * @param \Illuminate\Support\Carbon $endDate
+ *
+ * @return array
+ */
+ public function getTimeInterval($startDate, $endDate)
+ {
+ $timeIntervals = [];
+
+ $totalDays = $startDate->diffInDays($endDate) + 1;
+ $totalMonths = $startDate->diffInMonths($endDate) + 1;
+ $totalYears = $startDate->diffInYears($endDate) + 1;
+
+ if (request()->get('period') == 'month') {
+ for ($i = 0; $i < $totalMonths; $i++) {
+ $date = clone $startDate;
+ $date->addMonths($i);
+
+ $start = Carbon::createFromTimeString($date->format('Y-m-d') . ' 00:00:01');
+ $end = $totalMonths - 1 == $i
+ ? $endDate
+ : Carbon::createFromTimeString($date->format('Y-m-d') . ' 23:59:59');
+
+ $timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('M')];
+ }
+ } elseif (request()->get('period') == 'year') {
+ for ($i = 0; $i < $totalYears; $i++) {
+ $date = clone $startDate;
+ $date->addYears($i);
+
+ $start = $i == 0
+ ? $startDate
+ : Carbon::createFromTimeString($date->format('Y-m-d') . ' 00:00:01');
+ $end = $totalYears - 1 == $i
+ ? $endDate
+ : Carbon::createFromTimeString($date->format('Y-m-d') . ' 23:59:59');
+
+ $timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('Y')];
+ }
+ } else {
+ for ($i = 0; $i < $totalDays; $i++) {
+ $date = clone $startDate;
+ $date->addDays($i);
+
+ $start = Carbon::createFromTimeString($date->format('Y-m-d') . ' 00:00:01');
+ $end = Carbon::createFromTimeString($date->format('Y-m-d') . ' 23:59:59');
+
+ $timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('d M')];
+ }
+ }
+
+ return $timeIntervals;
+ }
+
+
+ public function getPercentageChange($previous, $current)
+ {
+ if (! $previous)
+ return $current ? 100 : 0;
+
+ return ($current - $previous) / $previous * 100;
+ }
+
+ /**
+ * Sets start and end date
+ *
+ * @return void
+ */
+ public function setStartEndDate()
+ {
+ $this->startDate = request()->get('start')
+ ? Carbon::createFromTimeString(request()->get('start') . " 00:00:01")
+ : Carbon::createFromTimeString(Carbon::now()->subDays(30)->format('Y-m-d') . " 00:00:01");
+
+ $this->endDate = request()->get('end')
+ ? Carbon::createFromTimeString(request()->get('end') . " 23:59:59")
+ : Carbon::now();
+
+ if ($this->endDate > Carbon::now())
+ $this->endDate = Carbon::now();
+
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/ProductController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/ProductController.php
new file mode 100644
index 000000000..4366e05ee
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/ProductController.php
@@ -0,0 +1,388 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var object
+ */
+ protected $_config;
+
+ /**
+ * AttributeFamilyRepository object
+ *
+ * @var object
+ */
+ protected $attributeFamily;
+
+ /**
+ * CategoryRepository object
+ *
+ * @var object
+ */
+ protected $category;
+
+ /**
+ * InventorySourceRepository object
+ *
+ * @var object
+ */
+ protected $inventorySource;
+
+ /**
+ * ProductRepository object
+ *
+ * @var object
+ */
+ protected $product;
+
+ /**
+ * ProductRepository object
+ *
+ * @var object
+ */
+ protected $sellerProduct;
+
+ /**
+ * SellerRepository object
+ *
+ * @var object
+ */
+ protected $seller;
+
+ /**
+ * Core Product Repository object
+ *
+ * @var object
+ */
+ protected $coreProduct;
+
+ /**
+ * Seller Category Repository object
+ *
+ * @var object
+ */
+ protected $sellerCategoryRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Attribute\Repositories\AttributeFamilyRepository $attributeFamily
+ * @param Webkul\Category\Repositories\CategoryRepository $category
+ * @param Webkul\Inventory\Repositories\InventorySourceRepository $inventorySource
+ * @param Webkul\Marketplace\Repositories\ProductRepository $sellerProduct
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @return void
+ */
+ public function __construct(
+ Seller $seller,
+ Product $product,
+ Category $category,
+ CoreProduct $coreProduct,
+ SellerProduct $sellerProduct,
+ AttributeFamily $attributeFamily,
+ InventorySource $inventorySource,
+ SellerCategoryRepository $sellerCategoryRepository,
+ ProductDownloadableLinkRepository $productDownloadableLinkRepository,
+ ProductDownloadableSampleRepository $productDownloadableSampleRepository
+ )
+ {
+ $this->seller = $seller;
+
+ $this->product = $product;
+
+ $this->category = $category;
+
+ $this->coreProduct = $coreProduct;
+
+ $this->_config = request('_config');
+
+ $this->sellerProduct = $sellerProduct;
+
+ $this->inventorySource = $inventorySource;
+
+ $this->attributeFamily = $attributeFamily;
+
+ $this->sellerCategoryRepository = $sellerCategoryRepository;
+
+ $this->productDownloadableLinkRepository = $productDownloadableLinkRepository;
+
+ $this->productDownloadableSampleRepository = $productDownloadableSampleRepository;
+
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $isSeller = $this->seller->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function create()
+ {
+ $families = $this->attributeFamily->all();
+
+ $configurableFamily = null;
+
+
+ if ($familyId = request()->get('family')) {
+ $configurableFamily = $this->attributeFamily->find($familyId);
+ }
+
+ return view($this->_config['view'], compact('families', 'configurableFamily'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function store()
+ {
+ if (! request()->get('family') && request()->input('type') == 'configurable' && request()->input('sku') != '') {
+ return redirect(url()->current() . '?family=' . request()->input('attribute_family_id') . '&sku=' . request()->input('sku'));
+ }
+
+ if (request()->input('type') == 'configurable' && (! request()->has('super_attributes') || !count(request()->get('super_attributes')))) {
+
+ session()->flash('error', 'Please select atleast one configurable attribute.');
+
+ return back();
+ }
+
+ $this->validate(request(), [
+ 'type' => 'required',
+ 'attribute_family_id' => 'required',
+ 'sku' => ['required', 'unique:products,sku', new \Webkul\Core\Contracts\Validations\Slug]
+ ]);
+
+ $product = $this->product->create(request()->all());
+
+ $sellerProduct = $this->sellerProduct->create([
+ 'product_id' => $product->id,
+ 'is_owner' => 1
+ ]);
+
+ session()->flash('success', 'Product created successfully.');
+
+ return redirect()->route($this->_config['redirect'], ['id' => $product->id]);
+ }
+
+ /**
+ * Show the form for editing the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function edit($id)
+ {
+ $seller = $this->seller->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $sellerProduct = $this->sellerProduct->findOneWhere([
+ 'product_id' => $id,
+ 'marketplace_seller_id' => $seller->id,
+ 'is_owner' => 0
+ ]);
+
+ if ($sellerProduct) {
+
+ return redirect()->route('marketplace.account.products.edit-assign', ['id' => $sellerProduct->id]);
+ }
+
+ $product = $this->product->with(['variants', 'variants.inventories'])->findorFail($id);
+
+ $sellerCat = $this->sellerCategoryRepository->findOneWhere(['seller_id' => $seller->id]);
+
+ if ($sellerCat) {
+
+ $sellerCategory = json_decode($sellerCat->categories);
+ $categories = $this->category->getModel()::with('ancestors')->whereIn('id', $sellerCategory )->get();
+ } else {
+ $categories = $this->category->getModel()::with('ancestors')->where('id', 1 )->get();
+ }
+
+
+ $rootCategory = $this->category->findOneWhere(['id' => core()->getCurrentChannel()->root_category_id]);
+
+ $inventorySources = core()->getCurrentChannel()->inventory_sources;
+
+ return view($this->_config['view'], compact('product', 'categories', 'inventorySources', 'rootCategory'));
+ }
+
+ /**
+ * get visible category tree
+ *
+ * @param integer $id
+ * @return mixed
+ */
+ public function getVisibleCategoryTree($id)
+ {
+ return $this->category->getModel()->orderBy('position', 'ASC')->where('status', 1)->descendantsOf($id)->toTree();
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Webkul\Product\Http\Requests\ProductForm $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update(ProductForm $request, $id)
+ {
+ $data = request()->all();
+
+ $this->product->update($data, $id);
+
+ $sellerProduct = $this->sellerProduct->getMarketplaceProductByProduct($id);
+
+ $this->sellerProduct->update(request()->all(), $sellerProduct->id);
+
+ session()->flash('success', 'Product updated successfully.');
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Copy a given Product.
+ */
+ public function copy(int $productId)
+ {
+ $originalProduct = $this->coreProduct->findOrFail($productId);
+
+ $seller = $this->sellerProduct->getSellerByProductId($originalProduct->id);
+
+ if (! $seller) {
+ session()->flash('error',
+ trans('You can not copy Assign Product.'));
+
+ return redirect()->to(route('marketplace.account.products.index'));
+ }
+
+ if (! $originalProduct->getTypeInstance()->canBeCopied()) {
+ session()->flash('error',
+ trans('admin::app.response.product-can-not-be-copied', [
+ 'type' => $originalProduct->type,
+ ]));
+
+ return redirect()->to(route('marketplace.account.products.index'));
+ }
+
+ if ($originalProduct->parent_id) {
+ session()->flash('error',
+ trans('admin::app.catalog.products.variant-already-exist-message'));
+
+ return redirect()->to(route('marketplace.account.products.index'));
+ }
+
+ $copiedProduct = $this->coreProduct->copy($originalProduct);
+
+ if ($copiedProduct instanceof ProductModel && $copiedProduct->id) {
+ session()->flash('success', trans('admin::app.response.product-copied'));
+ } else {
+ session()->flash('error', trans('admin::app.response.error-while-copying'));
+ }
+
+ $sellerProduct = $this->sellerProduct->create([
+ 'product_id' => $copiedProduct->id,
+ 'is_owner' => 1
+ ]);
+
+ return redirect()->to(route('marketplace.account.products.edit', ['id' => $copiedProduct->id]));
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function destroy($id)
+ {
+ $sellerProduct = $this->sellerProduct->getMarketplaceProductByProduct($id);
+
+ try {
+
+ $this->sellerProduct->delete($sellerProduct->id);
+
+ if ($sellerProduct->is_owner == 1) {
+ $this->product->delete($sellerProduct->product_id);
+ }
+
+ session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Product']));
+
+ return response()->json(['message' => true], 200);
+ } catch (Exception $e) {
+ report($e);
+
+ session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Product']));
+ }
+
+ return response()->json(['message' => false], 400);
+ }
+
+ /**
+ * Mass Delete the products
+ *
+ * @return response
+ */
+ public function massDestroy()
+ {
+ $productIds = explode(',', request()->input('indexes'));
+
+ foreach ($productIds as $productId) {
+ $sellerProduct = $this->sellerProduct->getMarketplaceProductByProduct($productId);
+
+ if ($sellerProduct) {
+ if ($sellerProduct->is_owner == 1) {
+ $this->sellerProduct->delete($sellerProduct->id);
+ $this->product->delete($sellerProduct->product_id);
+ } else {
+ $this->sellerProduct->delete($sellerProduct->id);
+ }
+ }
+ }
+
+ session()->flash('success', trans('admin::app.catalog.products.mass-delete-success'));
+
+ return redirect()->route($this->_config['redirect']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/ReviewController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/ReviewController.php
new file mode 100644
index 000000000..5d904ceb4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/ReviewController.php
@@ -0,0 +1,61 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReviewController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ *
+ * @var mixed
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Method to populate the seller review page which will be populated.
+ *
+ * @return Mixed
+ */
+ public function index($url)
+ {
+ $isSeller = $this->sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ return view($this->_config['view']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/InvoiceController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/InvoiceController.php
new file mode 100644
index 000000000..21f917eea
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/InvoiceController.php
@@ -0,0 +1,172 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class InvoiceController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * OrderRepository object
+ *
+ * @var mixed
+ */
+ protected $order;
+
+ /**
+ * InvoiceRepository object
+ *
+ * @var mixed
+ */
+ protected $invoice;
+
+ /**
+ * SellerRepository object
+ *
+ * @var mixed
+ */
+ protected $seller;
+
+ /**
+ * InvoiceRepository object
+ *
+ * @var mixed
+ */
+ protected $baseInvoice;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderRepository $order
+ * @param Webkul\Marketplace\Repositories\InvoiceRepository $invoice
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @param Webkul\Sales\Repositories\InvoiceRepository $baseInvoice
+ * @return void
+ */
+ public function __construct(
+ OrderRepository $order,
+ InvoiceRepository $invoice,
+ SellerRepository $seller,
+ BaseInvoiceRepository $baseInvoice
+ )
+ {
+ $this->order = $order;
+
+ $this->invoice = $invoice;
+
+ $this->seller = $seller;
+
+ $this->baseInvoice = $baseInvoice;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param int $orderId
+ * @return \Illuminate\Http\Response
+ */
+ public function create($orderId)
+ {
+ if (! core()->getConfigData('marketplace.settings.general.can_create_invoice'))
+ return redirect()->back();
+
+ $seller = $this->seller->findOneWhere([
+ 'customer_id' => auth()->guard('customer')->user()->id
+ ]);
+
+ $sellerOrder = $this->order->findOneWhere([
+ 'order_id' => $orderId,
+ 'marketplace_seller_id' => $seller->id
+ ]);
+
+ return view($this->_config['view'], compact('sellerOrder'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param int $orderId
+ * @param \Illuminate\Http\Request $request
+ * @return \Illuminate\Http\Response
+ */
+ public function store(Request $request, $orderId)
+ {
+ $seller = $this->seller->findOneWhere([
+ 'customer_id' => auth()->guard('customer')->user()->id
+ ]);
+
+ $sellerOrder = $this->order->findOneWhere([
+ 'order_id' => $orderId,
+ 'marketplace_seller_id' => $seller->id
+ ]);
+
+ if (! $sellerOrder->canInvoice()) {
+ session()->flash('error', 'Order invoice creation is not allowed.');
+
+ return redirect()->back();
+ }
+
+ $this->validate(request(), [
+ 'invoice.items.*' => 'required|numeric|min:0',
+ ]);
+
+ $data = request()->all();
+
+ $haveProductToInvoice = false;
+ foreach ($data['invoice']['items'] as $itemId => $qty) {
+ if ($qty) {
+ $haveProductToInvoice = true;
+ break;
+ }
+ }
+
+ if (! $haveProductToInvoice) {
+ session()->flash('error', 'Invoice can not be created without products.');
+
+ return redirect()->back();
+ }
+
+ $this->baseInvoice->create(array_merge($data, ['order_id' => $orderId]));
+
+ session()->flash('success', 'Invoice created successfully.');
+
+ return redirect()->route($this->_config['redirect'], $orderId);
+ }
+
+ /**
+ * Print and download the for the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function print($id)
+ {
+ $sellerInvoice = $this->invoice->findOneByField('marketplace_order_id', $id);
+
+ $pdf = PDF::loadView('marketplace::shop.sellers.account.sales.invoices.pdf', compact('sellerInvoice'))->setPaper('a4');
+
+ return $pdf->download('invoice-' . $sellerInvoice->invoice->created_at->format('d-m-Y') . '.pdf');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/OrderController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/OrderController.php
new file mode 100644
index 000000000..d57985d6d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/OrderController.php
@@ -0,0 +1,120 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class OrderController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var mixed
+ */
+ protected $sellerRepository;
+
+ /**
+ * OrderRepository object
+ *
+ * @var mixed
+ */
+ protected $orderRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ OrderRepository $orderRepository
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $isSeller = $this->sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ return view($this->_config['view']);
+ }
+
+ /**
+ * Show the view for the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function view($id)
+ {
+ $seller = $this->sellerRepository->findOneWhere([
+ 'customer_id' => auth()->guard('customer')->user()->id
+ ]);
+
+ $sellerOrder = $this->orderRepository->findOneWhere([
+ 'order_id' => $id,
+ 'marketplace_seller_id' => $seller->id
+ ]);
+
+ if (! $sellerOrder){
+ abort('404');
+ }
+
+ return view($this->_config['view'], compact('sellerOrder'));
+ }
+
+ /**
+ * Cancel action for the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function cancel($id)
+ {
+ if (! core()->getConfigData('marketplace.settings.general.can_cancel_order'))
+ return redirect()->back();
+
+ $result = $this->orderRepository->sellerCancelOrder($id);
+
+ if ($result) {
+ session()->flash('success', trans('admin::app.response.cancel-success', ['name' => 'Order']));
+ } else {
+ session()->flash('error', trans('admin::app.response.cancel-error', ['name' => 'Order']));
+ }
+
+ return redirect()->back();
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/PaymentRequestController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/PaymentRequestController.php
new file mode 100644
index 000000000..2c808c9d8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/PaymentRequestController.php
@@ -0,0 +1,127 @@
+sellerRepository = $sellerRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->transactionRepository = $transactionRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $isSeller = $this->sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $statistics = [
+ 'total_sale' =>
+ $totalSale = $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id);
+ })->sum('base_seller_total') - $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id);
+ })->sum('base_grand_total_refunded') + $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id);
+ })->sum('base_commission_invoiced'),
+
+
+ 'total_payout' => $totalPaid = $this->transactionRepository->scopeQuery(function($query) use ($seller) {
+ return $query->where('marketplace_transactions.marketplace_seller_id', $seller->id);
+ })->sum('base_total'),
+
+ 'remaining_payout' => $totalSale - $totalPaid,
+ ];
+
+ return view($this->_config['view'], compact('statistics'));
+ }
+
+ /**
+ * Update the order for payment and sends mails to admin.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function requestPayment($orderId)
+ {
+ $orderRepository = $this->orderRepository->findOneWhere(['order_id' => $orderId]);
+
+ if($orderRepository) {
+
+ $orderRepository->update(['seller_payout_status' => 'requested']);
+
+ try {
+ Mail::send(new PaymentRequestNotification($orderRepository));
+ } catch (\Exception $e) {
+
+ }
+
+ session()->flash('success', 'Payment has been requested');
+ }
+
+ return redirect()->back();
+ }
+
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/ShipmentController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/ShipmentController.php
new file mode 100644
index 000000000..72e5b1408
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/ShipmentController.php
@@ -0,0 +1,191 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ShipmentController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * OrderRepository object
+ *
+ * @var mixed
+ */
+ protected $order;
+
+ /**
+ * SellerRepository object
+ *
+ * @var mixed
+ */
+ protected $seller;
+
+ /**
+ * OrderItemRepository object
+ *
+ * @var mixed
+ */
+ protected $baseOrderItem;
+
+ /**
+ * ShipmentRepository object
+ *
+ * @var mixed
+ */
+ protected $shipment;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderRepository $order
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @param Webkul\Sales\Repositories\OrderItemRepository $baseOrderItem
+ * @param Webkul\Marketplace\Repositories\ShipmentRepository $shipment
+ * @return void
+ */
+ public function __construct(
+ OrderRepository $order,
+ SellerRepository $seller,
+ BaseOrderItem $baseOrderItem,
+ ShipmentRepository $shipment
+ )
+ {
+ $this->order = $order;
+
+ $this->seller = $seller;
+
+ $this->baseOrderItem = $baseOrderItem;
+
+ $this->shipment = $shipment;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Show the view for the specified resource.
+ *
+ * @param int $orderId
+ * @return \Illuminate\Http\Response
+ */
+ public function create($orderId)
+ {
+ if (! core()->getConfigData('marketplace.settings.general.can_create_shipment'))
+ return redirect()->back();
+
+ $seller = $this->seller->findOneWhere([
+ 'customer_id' => auth()->guard('customer')->user()->id
+ ]);
+
+ $sellerOrder = $this->order->findOneWhere([
+ 'order_id' => $orderId,
+ 'marketplace_seller_id' => $seller->id
+ ]);
+
+ return view($this->_config['view'], compact('sellerOrder'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param int $orderId
+ * @param \Illuminate\Http\Request $request
+ * @return \Illuminate\Http\Response
+ */
+ public function store(Request $request, $orderId)
+ {
+ $seller = $this->seller->findOneWhere([
+ 'customer_id' => auth()->guard('customer')->user()->id
+ ]);
+
+ $sellerOrder = $this->order->findOneWhere([
+ 'order_id' => $orderId,
+ 'marketplace_seller_id' => $seller->id
+ ]);
+
+ if (! $sellerOrder->canShip()) {
+ session()->flash('error', 'Order shipment creation is not allowed.');
+
+ return redirect()->back();
+ }
+
+ $this->validate(request(), [
+ 'shipment.carrier_title' => 'required',
+ 'shipment.track_number' => 'required',
+ 'shipment.source' => 'required',
+ 'shipment.items.*.*' => 'required|numeric|min:0',
+ ]);
+
+ $data = array_merge(request()->all(), [
+ 'vendor_id' => $sellerOrder->marketplace_seller_id
+ ]);
+
+ if (! $this->isInventoryValidate($data)) {
+ session()->flash('error', 'Requested quantity is invalid or not available.');
+
+ return redirect()->back();
+ }
+
+ $this->shipment->create(array_merge($data, [
+ 'order_id' => $orderId
+ ]));
+
+ session()->flash('success', 'Shipment created successfully.');
+
+ return redirect()->route($this->_config['redirect'], $orderId);
+ }
+
+ /**
+ * Checks if requested quantity available or not
+ *
+ * @param array $data
+ * @return boolean
+ */
+ public function isInventoryValidate(&$data)
+ {
+ $valid = false;
+
+ foreach ($data['shipment']['items'] as $itemId => $inventorySource) {
+ if ($qty = $inventorySource[$data['shipment']['source']]) {
+ $orderItem = $this->baseOrderItem->find($itemId);
+
+ $product = ($orderItem->type == 'configurable')
+ ? $orderItem->child->product
+ : $orderItem->product;
+
+ $inventory = $product->inventories()
+ ->where('inventory_source_id', $data['shipment']['source'])
+ ->where('vendor_id', $data['vendor_id'])
+ ->first();
+
+ if ($orderItem->qty_to_ship < $qty || $inventory->qty < $qty) {
+ return false;
+ }
+
+ $valid = true;
+ } else {
+ unset($data['shipment']['items'][$itemId]);
+ }
+ }
+
+ return $valid;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/TransactionController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/TransactionController.php
new file mode 100644
index 000000000..a8796faf6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/Sales/TransactionController.php
@@ -0,0 +1,119 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class TransactionController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var mixed
+ */
+ protected $sellerRepository;
+
+ /**
+ * OrderRepository object
+ *
+ * @var mixed
+ */
+ protected $orderRepository;
+
+ /**
+ * TransactionRepository object
+ *
+ * @var mixed
+ */
+ protected $transactionRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\TransactionRepository $transactionRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ OrderRepository $orderRepository,
+ TransactionRepository $transactionRepository
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->transactionRepository = $transactionRepository;
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $isSeller = $this->sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $statistics = [
+ 'total_sale' =>
+ $totalSale = $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id);
+ })->sum('base_seller_total') - $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id);
+ })->sum('base_grand_total_refunded') + $this->orderRepository->scopeQuery(function($query) use($seller) {
+ return $query->where('marketplace_orders.marketplace_seller_id', $seller->id);
+ })->sum('base_commission_invoiced'),
+
+
+ 'total_payout' => $totalPaid = $this->transactionRepository->scopeQuery(function($query) use ($seller) {
+ return $query->where('marketplace_transactions.marketplace_seller_id', $seller->id);
+ })->sum('base_total'),
+
+ 'remaining_payout' => $totalSale - $totalPaid,
+ ];
+
+ return view($this->_config['view'], compact('statistics'));
+ }
+
+ /**
+ * Show the view for the specified resource.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function view($id)
+ {
+ $transaction = $this->transactionRepository->findOrFail($id);
+
+ return view($this->_config['view'], compact('transaction'));
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/SellerController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/SellerController.php
new file mode 100644
index 000000000..bf2db6cf1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/SellerController.php
@@ -0,0 +1,135 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @return void
+ */
+ public function __construct(SellerRepository $seller)
+ {
+ $this->_config = request('_config');
+
+ $this->seller = $seller;
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function create()
+ {
+ if (! core()->getConfigData('marketplace.settings.general.status')) {
+ abort(404);
+ }
+
+ $seller = $this->seller->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ if ($seller && $seller->is_approved) {
+ return redirect()->route('marketplace.account.seller.edit');
+ }
+
+ return view($this->_config['view'], compact('seller'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function store()
+ {
+ $this->validate(request(), [
+ 'url' => ['required', 'unique:marketplace_sellers,url', new \Webkul\Core\Contracts\Validations\Slug]
+ ]);
+
+ $data = request()->all();
+
+ $data['customer_id'] = auth()->guard('customer')->user()->id;
+
+ if (! core()->getConfigData('marketplace.settings.general.seller_approval_required')) {
+ $data['is_approved'] = 1;
+
+ session()->flash('success', 'Your seller account created successfully.');
+ } else {
+ session()->flash('success', 'Your request to become seller is successfully raised.');
+ }
+
+ $this->seller->create($data);
+
+ return redirect()->route($this->_config['redirect']);
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function edit()
+ {
+ $isSeller = $this->seller->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ $seller = $this->seller->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ return view($this->_config['view'], compact('seller'),
+ ['defaultCountry' => config('app.default_country')]
+ );
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Webkul\Marketplace\Http\Requests\SellerForm $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function update(SellerForm $request, $id)
+ {
+ $isSeller = $this->seller->isSeller(auth()->guard('customer')->user()->id);
+
+ if (! $isSeller) {
+ return redirect()->route('marketplace.account.seller.create');
+ }
+
+ $this->seller->update(request()->all(), $id);
+
+ session()->flash('success', 'Your profile saved successfully.');
+
+ return redirect()->route($this->_config['redirect']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Controller.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Controller.php
new file mode 100644
index 000000000..92cc824bb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Controller.php
@@ -0,0 +1,26 @@
+make('Webkul\Marketplace\Repositories\SellerRepository');
+
+ $isSeller = $sellerRepository->isSeller(auth()->guard('customer')->user()->id);
+
+ return $isSeller ? true : false;
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/FlagController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/FlagController.php
new file mode 100644
index 000000000..22eec445e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/FlagController.php
@@ -0,0 +1,140 @@
+
+ * @copyright 2020 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class FlagController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * productFlagRepository object
+ *
+ * @object
+ */
+ protected $productFlagRepository;
+
+ /**
+ * sellerFlagRepository object
+ *
+ * @var array
+ */
+ protected $sellerFlagRepository;
+
+
+ /**
+ * sellerRepository object
+ *
+ * @var array
+ */
+ protected $sellerRepository;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\ProductFlagRepository $productFlagRepository
+ * @param Webkul\Marketplace\Repositories\SellerFlagRepository $sellerFlagRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ SellerFlagRepository $sellerFlagRepository,
+ ProductFlagRepository $productFlagRepository
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->productFlagRepository = $productFlagRepository;
+
+ $this->sellerFlagRepository = $sellerFlagRepository;
+
+ }
+
+
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Response
+ */
+ public function productFlagstore()
+ {
+
+ $this->validate(request(), [
+ 'name' => 'required',
+ 'email' => 'required|unique:marketplace_product_flags'
+ ]);
+
+ $data = request()->all();
+
+ $this->productFlagRepository->create($data);
+
+ try {
+
+ Mail::send(new ReportProductNotification($seller, request()->all()));
+ Mail::send(new AdminReportProductNotification($seller, request()->all()));
+
+ } catch (\Exception $e) {
+
+ }
+
+ session()->flash('success', 'Product has been reported successfully.');
+
+ return redirect()->back();
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function sellerFlagstore()
+ {
+
+ $this->validate(request(), [
+ 'name' => 'required',
+ 'email' => 'required|unique:marketplace_seller_flags'
+ ]);
+
+ $data = request()->all();
+
+ $seller = $this->sellerRepository->find($data['seller_id']);
+
+ $this->sellerFlagRepository->create($data);
+
+ try {
+
+ Mail::send(new ReportSellerNotification($seller, request()->all()));
+ // Mail::send(new AdminReportSellerNotification($seller, request()->all()));
+
+ } catch (\Exception $e) {
+ dd($e);
+ }
+
+ session()->flash('success', 'Seller has been reported successfully.');
+
+ return redirect()->back();
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/MarketplaceController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/MarketplaceController.php
new file mode 100644
index 000000000..31a749bed
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/MarketplaceController.php
@@ -0,0 +1,46 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class MarketplaceController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display the specified resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ if (! core()->getConfigData('marketplace.settings.general.status')) {
+ abort(404);
+ }
+
+ return view($this->_config['view']);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/MinimumOrderController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/MinimumOrderController.php
new file mode 100644
index 000000000..f67e0b405
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/MinimumOrderController.php
@@ -0,0 +1,197 @@
+
+ * @copyright 2020 Webkul Software Pvt Ltd (http://www.webkul.com)
+ *
+ * */
+
+class MinimumOrderController extends Controller
+{
+
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var Seller
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Product
+ */
+ protected $productRepository;
+
+ /**
+ * CoreProductRepository Object
+ */
+ protected $coreProductRepository;
+
+
+
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\ProductRepository $productRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ ProductRepository $productRepository,
+ CoreProductRepository $coreProductRepository
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->coreProductRepository = $coreProductRepository;
+
+ }
+
+
+ public function index()
+ {
+ Event::dispatch('checkout.load.index');
+
+ if (core()->getConfigData('marketplace.settings.minimum_order_amount.enable') ) {
+ if (! $this->checkCartTotal()) {
+ return redirect()->back();
+ }
+ }
+
+ if (! auth()->guard('customer')->check()
+ && ! core()->getConfigData('catalog.products.guest-checkout.allow-guest-checkout')) {
+ return redirect()->route('customer.session.index');
+ }
+
+ if (Cart::hasError()) {
+ return redirect()->route('shop.checkout.cart.index');
+ }
+
+ $cart = Cart::getCart();
+
+ if (! auth()->guard('customer')->check() && $cart->hasDownloadableItems()) {
+ return redirect()->route('customer.session.index');
+ }
+
+ if (! auth()->guard('customer')->check() && ! $cart->hasGuestCheckoutItems()) {
+ return redirect()->route('customer.session.index');
+ }
+
+ Cart::collectTotals();
+
+ return view($this->_config['view'], compact('cart'));
+ }
+
+ /**
+ * Product added to the cart
+ *
+ * @param mixed $cartItem
+ */
+ public function checkCartTotal()
+ {
+ $cart = Cart::getCart();
+
+ if ($cart) {
+
+ $items = $cart->items;
+
+ $sellerProductsAmount = [];
+
+ foreach($items as $item) {
+ $product = $this->productRepository->findOneWhere(['product_id'=> $item->product_id, 'is_owner'=> 1]);
+
+ if($product) {
+
+ $seller = $product->seller;
+
+ if (array_key_exists($seller->id, $sellerProductsAmount)) {
+
+ $sellerProductsAmount[$seller->id] += $item->total;
+
+ } else {
+ $sellerProductsAmount[$seller->id] = $item->total;
+ }
+
+ } else {
+
+ $seller = 'admin';
+
+ if (array_key_exists('admin', $sellerProductsAmount)) {
+
+ $sellerProductsAmount['admin'] += $item->total;
+
+ } else {
+ $sellerProductsAmount['admin'] = $item->total;
+ }
+ }
+
+ }
+
+ $minAmounts = collect($sellerProductsAmount)->sort();
+
+ foreach ($minAmounts as $key => $minAmount) {
+
+ if ($key == 'admin') {
+ $minAdminAmount = core()->getConfigData('marketplace.settings.minimum_order_amount.min_amount');
+ if ($minAmount < $minAdminAmount ) {
+
+ session()->flash('warning', __('marketplace::app.shop.minimum-order.min-order', [
+ 'shop' => 'admin',
+ 'amount' => core()->currency($minAdminAmount),
+ ]));
+
+ return false;
+ }
+ } else {
+
+ $seller = $this->sellerRepository->find($key);
+
+ $minSellerAmount = $seller->min_order_amount;
+
+ if (!$minSellerAmount) {
+ $minSellerAmount = core()->getConfigData('marketplace.settings.minimum_order_amount.seller_min_amount') ? core()->getConfigData('marketplace.settings.minimum_order_amount.min_amount') : 0 ;
+ }
+
+ if ($minAmount < $minSellerAmount) {
+
+ session()->flash('warning', __('marketplace::app.shop.minimum-order.min-order', [
+ 'shop' => $seller->shop_title,
+ 'amount' => core()->currency($minSellerAmount),
+ ]));
+
+ return false;
+
+ }
+ }
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ProductController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ProductController.php
new file mode 100644
index 000000000..a0ef5042c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ProductController.php
@@ -0,0 +1,101 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $product;
+
+ /**
+ * ProductRepository object
+ *
+ * @var array
+ */
+ protected $baseProduct;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @param Webkul\Marketplace\Repositories\ProductRepository $product
+ * @param Webkul\Product\Repositories\ProductRepository $baseProduct
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $seller,
+ ProductRepository $product,
+ BaseProductRepository $baseProduct
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->seller = $seller;
+
+ $this->product = $product;
+
+ $this->baseProduct = $baseProduct;
+ }
+
+ /**
+ * Method to populate the seller product page which will be populated.
+ *
+ * @param string $url
+ * @return Mixed
+ */
+ public function index($url)
+ {
+ $seller = $this->seller->findByUrlOrFail($url);
+
+ return view($this->_config['view'], compact('seller'));
+ }
+
+ /**
+ * Product offers by sellers
+ *
+ * @param integer $id
+ * @return Mixed
+ */
+ public function offers($id)
+ {
+ $product = $this->baseProduct->findOrFail($id);
+
+ if ($product->type == 'configurable') {
+ session()->flash('error', trans('shop::app.checkout.cart.integrity.missing_options'));
+
+ return redirect()->route('shop.productOrCategory.index', ['slug' => $product->url_key]);
+ }
+
+ return view($this->_config['view'], compact('product'));
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ReviewController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ReviewController.php
new file mode 100644
index 000000000..520370384
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ReviewController.php
@@ -0,0 +1,109 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReviewController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ /**
+ * ReviewRepository object
+ *
+ * @var array
+ */
+ protected $review;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @param Webkul\Marketplace\Repositories\ReviewRepository $review
+ * @return void
+ */
+ public function __construct(
+ ReviewRepository $review,
+ SellerRepository $seller
+ )
+ {
+ $this->_config = request('_config');
+
+ $this->seller = $seller;
+
+ $this->review = $review;
+ }
+
+ /**
+ * Method to populate the seller review page which will be populated.
+ *
+ * @param string $url
+ * @return Mixed
+ */
+ public function index($url)
+ {
+ $seller = $this->seller->findByUrlOrFail($url);
+
+ return view($this->_config['view'], compact('seller'));
+ }
+
+ /**
+ * Show the form for creating a new resource.
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Response
+ */
+ public function create($url)
+ {
+ $seller = $this->seller->findByUrlOrFail($url);
+
+ return view($this->_config['view'], compact('seller'));
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Response
+ */
+ public function store(CustomerReviewForm $form, $url)
+ {
+ $seller = $this->seller->findByUrlOrFail($url);
+
+ $data = request()->all();
+
+ $data['status'] = 'pending';
+
+ $data['marketplace_seller_id'] = $seller->id;
+
+ $data['customer_id'] = auth()->guard('customer')->user()->id;
+
+ $this->review->create($data);
+
+ session()->flash('success', 'Seller review submitted successfully.');
+
+ return redirect()->route($this->_config['redirect'], ['url' => $url]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/SellerController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/SellerController.php
new file mode 100644
index 000000000..63bb66405
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/SellerController.php
@@ -0,0 +1,160 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerController extends Controller
+{
+ /**
+ * Contains route related configuration
+ *
+ * @var array
+ */
+ protected $_config;
+
+ /**
+ * SellerRepository object
+ *
+ * @var array
+ */
+ protected $seller;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @return void
+ */
+ public function __construct(SellerRepository $seller)
+ {
+ $this->_config = request('_config');
+
+ $this->seller = $seller;
+ }
+
+ /**
+ * Display the specified resource.
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Response
+ */
+ public function show($url)
+ {
+
+ $seller = $this->seller->findByUrlOrFail($url);
+
+ return view($this->_config['view'], compact('seller'));
+ }
+
+ /**
+ * Send query email to seller
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Response
+ */
+ public function contact(ContactSeller $form, $url)
+ {
+
+ $seller = $this->seller->findByUrlOrFail($url);
+
+ try {
+ Mail::send(new ContactSellerNotification($seller, request()->all()));
+ } catch (\Exception $e) {}
+
+ return response()->json([
+ 'success' => true,
+ 'message' => 'Email has been sent successfully. Seller will contact you as soon as possible.'
+ ]);
+ }
+
+
+ /**
+ * Send query email to seller
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Response
+ */
+ public function sellerQuery()
+ {
+
+ request()->validate([
+ 'name' => 'required',
+ 'email' => 'required|email',
+ 'subject' => 'required',
+ 'query' => 'required',
+ ]);
+
+ try {
+ Mail::send(new SellerQueryNotification(request()->all()));
+ } catch (\Exception $e) {}
+
+ return response()->json([
+ 'success' => true,
+ 'message' => 'Email has been sent successfully. Adminstrator will contact you as soon as possible.'
+ ]);
+ }
+
+ /**
+ * Check if shop url available or not
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function checkShopUrl()
+ {
+ $seller = $this->seller->findOneByField([
+ 'url' => trim(request()->input('url'))
+ ]);
+
+ return response()->json([
+ 'available' => $seller ? false : true
+ ]);
+ }
+
+ public function getSellerInfo ()
+ {
+ $cartItems = request()->all();
+
+ $productRepository = app('Webkul\Marketplace\Repositories\ProductRepository');
+
+ $reviewRepository = app('Webkul\Marketplace\Repositories\ReviewRepository');
+
+ $sellerInfo = [];
+
+ foreach ($cartItems as $cartItem) {
+
+ $seller = $productRepository->getSellerByProductId($cartItem['product_id']);
+
+ if(! isset($seller)) {
+ $sellerInfo[$cartItem['product_id']] = ['seller' => 0, 'rating'=> 0];
+ } else {
+ $sellerProduct = $productRepository->getMarketplaceProductByProduct($cartItem['product_id'], $seller->id);
+ $images = $sellerProduct->images;
+
+ if (count($images) < 1) {
+ $baseProductRepository = app('Webkul\Product\Repositories\ProductRepository')->find($cartItem['product_id']);
+ $images = productimage()->getGalleryImages( $baseProductRepository);
+ }
+
+ if (isset($sellerProduct) && $sellerProduct->is_approved) {
+ $sellerInfo[$cartItem['product_id']] = ['seller'=> $seller, 'rating' => $reviewRepository->getAverageRating($seller)];
+ $sellerInfo[$cartItem['product_id']] = ['seller'=> $seller, 'rating' => $reviewRepository->getAverageRating($seller), 'image' => $images];
+ }
+ }
+ }
+
+ return response()->json($sellerInfo, 200);;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ShopController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ShopController.php
new file mode 100644
index 000000000..cfa2adb4e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/ShopController.php
@@ -0,0 +1,268 @@
+velocityProductRepository->searchProductsFromCategory(request()->all());
+
+ return view($this->_config['view'])->with('results', $results ? $results : null);
+ }
+
+ public function fetchProductDetails($slug)
+ {
+ $product = $this->productRepository->findBySlug($slug);
+
+ if ($product) {
+ $productReviewHelper = app('Webkul\Product\Helpers\Review');
+
+ $galleryImages = productimage()->getProductBaseImage($product);
+
+ $response = [
+ 'status' => true,
+ 'details' => [
+ 'name' => $product->name,
+ 'urlKey' => $product->url_key,
+ 'priceHTML' => $product->getTypeInstance()->getPriceHtml(),
+ 'totalReviews' => $productReviewHelper->getTotalReviews($product),
+ 'rating' => ceil($productReviewHelper->getAverageRating($product)),
+ 'image' => $galleryImages['small_image_url'],
+ ]
+ ];
+ } else {
+ $response = [
+ 'status' => false,
+ 'slug' => $slug,
+ ];
+ }
+
+ return $response;
+ }
+
+ /**
+ * @return \Illuminate\Http\Response
+ */
+ public function categoryDetails()
+ {
+ $slug = request()->get('category-slug');
+
+ if (! $slug) {
+ abort(404);
+ }
+
+ $unApprovedProductId = $this->mpProductRepository->findWhere(['is_approved' => 0, 'is_owner' => 1])->pluck('product_id');
+
+ switch ($slug) {
+ case 'new-products':
+ case 'featured-products':
+ $count = request()->get('count');
+
+ if ($slug == "new-products") {
+ $products = $this->velocityProductRepository->getNewProducts($count)->whereNotIn('product_id', $unApprovedProductId);;
+ } else if ($slug == "featured-products") {
+ $products = $this->velocityProductRepository->getFeaturedProducts($count)->whereNotIn('product_id', $unApprovedProductId);;
+ }
+
+ $response = [
+ 'status' => true,
+ 'products' => $products->map(function ($product) {
+ if (core()->getConfigData('catalog.products.homepage.out_of_stock_items')) {
+ return $this->velocityHelper->formatProduct($product);
+ } else {
+ if ($product->isSaleable()) {
+ return $this->velocityHelper->formatProduct($product);
+ }
+ }
+ }),
+ ];
+
+ break;
+ default:
+ $categoryDetails = $this->categoryRepository->findByPath($slug);
+
+ if ($categoryDetails) {
+ $list = false;
+ $customizedProducts = [];
+ $products = $this->productRepository->getAll($categoryDetails->id);
+
+ foreach ($products as $product) {
+ $productDetails = [];
+
+ $productDetails = array_merge($productDetails, $this->velocityHelper->formatProduct($product));
+
+ array_push($customizedProducts, $productDetails);
+ }
+
+ $response = [
+ 'status' => true,
+ 'list' => $list,
+ 'categoryDetails' => $categoryDetails,
+ 'categoryProducts' => $customizedProducts,
+ ];
+ }
+
+ break;
+ }
+
+ return $response ?? [
+ 'status' => false,
+ ];
+ }
+
+ /**
+ * @return array
+ */
+ public function fetchCategories()
+ {
+ $formattedCategories = [];
+ $categories = $this->categoryRepository->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id);
+
+ foreach ($categories as $category) {
+ array_push($formattedCategories, $this->getCategoryFilteredData($category));
+ }
+
+ return [
+ 'status' => true,
+ 'categories' => $formattedCategories,
+ ];
+ }
+
+ /**
+ * @param string $slug
+ * @return array
+ */
+ public function fetchFancyCategoryDetails($slug)
+ {
+ $categoryDetails = $this->categoryRepository->findByPath($slug);
+
+ if ($categoryDetails) {
+ $response = [
+ 'status' => true,
+ 'categoryDetails' => $this->getCategoryFilteredData($categoryDetails)
+ ];
+ }
+
+ return $response ?? [
+ 'status' => false,
+ ];
+ }
+
+ /**
+ * @param \Webkul\Category\Contracts\Category $category
+ * @return array
+ */
+ private function getCategoryFilteredData($category)
+ {
+ $formattedChildCategory = [];
+
+ foreach ($category->children as $child) {
+ array_push($formattedChildCategory, $this->getCategoryFilteredData($child));
+ }
+
+ return [
+ 'id' => $category->id,
+ 'slug' => $category->slug,
+ 'name' => $category->name,
+ 'children' => $formattedChildCategory,
+ 'category_icon_path' => $category->category_icon_path,
+ ];
+ }
+
+ /**
+ * @return \Illuminate\View\View
+ */
+ public function getWishlistList()
+ {
+ return view($this->_config['view']);
+ }
+
+ /**
+ * this function will provide the count of wishlist and comparison for logged in user
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function getItemsCount()
+ {
+ if ($customer = auth()->guard('customer')->user()) {
+ $wishlistItemsCount = $this->wishlistRepository->count([
+ 'customer_id' => $customer->id,
+ 'channel_id' => core()->getCurrentChannel()->id,
+ ]);
+
+ $comparedItemsCount = $this->compareProductsRepository->count([
+ 'customer_id' => $customer->id,
+ ]);
+
+ $response = [
+ 'status' => true,
+ 'compareProductsCount' => $comparedItemsCount,
+ 'wishlistedProductsCount' => $wishlistItemsCount,
+ ];
+ }
+
+ return response()->json($response ?? [
+ 'status' => false
+ ]);
+ }
+
+ /**
+ * This function will provide details of multiple product
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function getDetailedProducts()
+ {
+ // for product details
+ if ($items = request()->get('items')) {
+ $moveToCart = request()->get('moveToCart');
+
+ $productCollection = $this->velocityHelper->fetchProductCollection($items, $moveToCart);
+
+ $response = [
+ 'status' => 'success',
+ 'products' => $productCollection,
+ ];
+ }
+
+ return response()->json($response ?? [
+ 'status' => false
+ ]);
+ }
+
+ public function getCategoryProducts($categoryId)
+ {
+ $products = $this->productRepository->getAll($categoryId);
+
+ $productItems = $products->items();
+ $productsArray = $products->toArray();
+
+ if ($productItems) {
+ $formattedProducts = [];
+
+ foreach ($productItems as $product) {
+ array_push($formattedProducts, $this->velocityHelper->formatProduct($product));
+ }
+
+ $productsArray['data'] = $formattedProducts;
+ }
+
+ return response()->json($response ?? [
+ 'products' => $productsArray['data'],
+ 'paginationHTML' => $products->appends(request()->input())->links()->toHtml(),
+ ]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Velocity/Controller.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Velocity/Controller.php
new file mode 100644
index 000000000..caec17bb8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Velocity/Controller.php
@@ -0,0 +1,121 @@
+_config = request('_config');
+
+ $this->velocityHelper = $velocityHelper;
+
+ $this->searchRepository = $searchRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->categoryRepository = $categoryRepository;
+
+ $this->wishlistRepository = $wishlistRepository;
+
+ $this->velocityProductRepository = $velocityProductRepository;
+
+ $this->compareProductsRepository = $compareProductsRepository;
+
+ $this->mpProductRepository = $mpProductRepository;
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Requests/ContactSellerForm.php b/packages/Webkul/Marketplace/src/Http/Requests/ContactSellerForm.php
new file mode 100644
index 000000000..4bbbbbcb4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Requests/ContactSellerForm.php
@@ -0,0 +1,51 @@
+ 'required',
+ 'email' => 'required|email',
+ 'subject' => 'required',
+ 'query' => 'required',
+ ];
+
+ /**
+ * Determine if the user is authorized to make this request.
+ *
+ * @return bool
+ */
+ public function authorize()
+ {
+ return true;
+ }
+
+ /**
+ * Get the validation rules that apply to the request.
+ *
+ * @return array
+ */
+ public function rules()
+ {
+ return Captcha::getValidations($this->rules);
+ }
+
+ /**
+ * Get custom messages for validator errors.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return Captcha::getValidationMessages();
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Requests/CustomerReviewForm.php b/packages/Webkul/Marketplace/src/Http/Requests/CustomerReviewForm.php
new file mode 100644
index 000000000..b4d6827ef
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Requests/CustomerReviewForm.php
@@ -0,0 +1,49 @@
+ 'required|numeric|min:1|max:5',
+ 'comment' => 'required'
+ ];
+
+ /**
+ * Determine if the user is authorized to make this request.
+ *
+ * @return bool
+ */
+ public function authorize()
+ {
+ return true;
+ }
+
+ /**
+ * Get the validation rules that apply to the request.
+ *
+ * @return array
+ */
+ public function rules()
+ {
+ return Captcha::getValidations($this->rules);
+ }
+
+ /**
+ * Get custom messages for validator errors.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return Captcha::getValidationMessages();
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php b/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php
new file mode 100644
index 000000000..d9d59b5a8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php
@@ -0,0 +1,37 @@
+ ['required', 'unique:marketplace_sellers,url,' . $this->route('id'), new \Webkul\Core\Contracts\Validations\Slug],
+ 'shop_title' => 'required',
+ 'phone' => 'required',
+ 'address1' => 'required',
+ 'city' => 'required',
+ 'postcode' => 'required',
+ 'state' => 'required',
+ 'country' => 'required',
+ ];
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Http/admin-routes.php b/packages/Webkul/Marketplace/src/Http/admin-routes.php
new file mode 100644
index 000000000..256e6663d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/admin-routes.php
@@ -0,0 +1,214 @@
+ ['web']], function () {
+
+ Route::prefix('admin/marketplace')->group(function () {
+
+ Route::group(['middleware' => ['admin']], function () {
+
+ //Seller routes
+ Route::get('sellers', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.index'
+ ])->name('admin.marketplace.sellers.index');
+
+ Route::get('sellers/create', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@create')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.create'
+ ])->name('admin.marketplace.sellers.create');
+
+ Route::get('sellers/delete/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@destroy')
+ ->name('admin.marketplace.sellers.delete');
+
+ Route::post('sellers/massdelete', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@massDestroy')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.sellers.index'
+ ])->name('admin.marketplace.sellers.massdelete');
+
+ Route::post('sellers/massupdate', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@massUpdate')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.sellers.index'
+ ])->name('admin.marketplace.sellers.massupdate');
+
+ Route::get('sellers/{id}/orders', 'Webkul\Marketplace\Http\Controllers\Admin\OrderController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.orders.index'
+ ])->name('admin.marketplace.sellers.orders.index');
+
+ Route::get('orders', 'Webkul\Marketplace\Http\Controllers\Admin\OrderController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.orders.index'
+ ])->name('admin.marketplace.orders.index');
+
+ Route::post('orders', 'Webkul\Marketplace\Http\Controllers\Admin\OrderController@pay')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.orders.index'
+ ])->name('admin.marketplace.orders.pay');
+
+ Route::get('transactions', 'Webkul\Marketplace\Http\Controllers\Admin\TransactionController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.transactions.index'
+ ])->name('admin.marketplace.transactions.index');
+
+
+ //Seller products routes
+ Route::get('products', 'Webkul\Marketplace\Http\Controllers\Admin\ProductController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.products.index'
+ ])->name('admin.marketplace.products.index');
+
+ Route::post('products/delete/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\ProductController@destroy')
+ ->name('admin.marketplace.products.delete');
+
+ Route::post('products/massdelete', 'Webkul\Marketplace\Http\Controllers\Admin\ProductController@massDestroy')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.products.index'
+ ])->name('admin.marketplace.products.massdelete');
+
+ Route::post('products/massupdate', 'Webkul\Marketplace\Http\Controllers\Admin\ProductController@massUpdate')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.products.index'
+ ])->name('admin.marketplace.products.massupdate');
+
+ Route::get('seller/product/search/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@search')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.products.search'
+ ])->name('admin.marketplace.seller.product.search');
+
+ Route::get('seller/product/assign/{seller_id}/{product_id?}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@assignProduct')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.products.assign'
+ ])->name('admin.marketplace.seller.product.create');
+
+ Route::post('seller/product/assign/{seller_id}/{product_id?}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@saveAssignProduct')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.sellers.index'
+ ])->name('admin.marketplace.seller.product.store');
+
+
+ Route::get('/products/edit-assign/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@edit')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.products.edit-assign'
+ ])->name('admin.marketplace.products.edit-assign');
+
+ Route::put('/products/edit-assign/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@update')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.sellers.index'
+ ])->name('admin.marketplace.products.assign.update');
+
+ //Seller review routes
+ Route::get('reviews', 'Webkul\Marketplace\Http\Controllers\Admin\ReviewController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.reviews.index'
+ ])->name('admin.marketplace.reviews.index');
+
+ Route::post('reviews/massupdate', 'Webkul\Marketplace\Http\Controllers\Admin\ReviewController@massUpdate')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.reviews.index'
+ ])->name('admin.marketplace.reviews.massupdate');
+
+ //customer edit routes
+ Route::put('customers/edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\CustomerController@update')->defaults('_config', [
+ 'redirect' => 'admin.customer.index'
+ ])->name('marketplace.admin.customer.update');
+
+ // seller profile routes start here
+ Route::get('sellers/profile/edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@editProfile')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.edit'
+ ])->name('admin.marketplace.seller.edit');
+
+ Route::put('sellers/profile/edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerController@updateProfile')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.sellers.index'
+ ])->name('marketplace.admin.seller.update');
+ // seller profile routes end here
+
+ // Flag routes
+ Route::prefix('product-flag')->group(function () {
+ Route::get('/', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.productFlagReason.index',
+ ])->name('marketplace.admin.product.flag.reason.index');
+
+ Route::get('create', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@create')->defaults('_config', [
+ 'view' => 'marketplace::admin.productFlagReason.create',
+ ])->name('marketplace.admin.product.flag.reason.create');
+
+ Route::post('create', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.product.flag.reason.index',
+ ])->name('marketplace.admin.product.flag.reason.store');
+
+ Route::get('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@edit')->defaults('_config', [
+ 'view' => 'marketplace::admin.productFlagReason.edit',
+ ])->name('marketplace.admin.product.flag.reason.edit');
+
+ Route::post('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@update')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.product.flag.reason.index',
+ ])->name('marketplace.admin.product.flag.reason.update');
+
+ Route::get('/delete/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@delete')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.product.flag.reason.index',
+ ])->name('marketplace.admin.product.flag.reason.delete');
+
+ Route::post('/massdelete', 'Webkul\Marketplace\Http\Controllers\Admin\ProductFlagReasonController@massDelete')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.product.flag.reason.index',
+ ])->name('marketplace.admin.product.flag.reason.mass-delete');
+ });
+
+ Route::prefix('seller-flag')->group(function () {
+ Route::get('/', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellerFlagReason.index',
+ ])->name('marketplace.admin.seller.flag.reason.index');
+
+ Route::get('create', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@create')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellerFlagReason.create',
+ ])->name('marketplace.admin.seller.flag.reason.create');
+
+ Route::post('create', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.seller.flag.reason.index',
+ ])->name('marketplace.admin.seller.flag.reason.store');
+
+ Route::get('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@edit')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellerFlagReason.edit',
+ ])->name('marketplace.admin.seller.flag.reason.edit');
+
+ Route::post('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@update')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.seller.flag.reason.index',
+ ])->name('marketplace.admin.seller.flag.reason.update');
+
+ Route::get('/delete/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@delete')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.seller.flag.reason.index',
+ ])->name('marketplace.admin.seller.flag.reason.delete');
+
+ Route::post('/massdelete', 'Webkul\Marketplace\Http\Controllers\Admin\SellerFlagReasonController@massDelete')->defaults('_config', [
+ 'redirect' => 'marketplace.admin.seller.flag.reason.index',
+ ])->name('marketplace.admin.seller.flag.reason.mass-delete');
+ });
+
+ });
+
+ // sellers category routes start here
+ Route::prefix('seller-categories')->group(function () {
+ Route::get('/', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.category.index'
+ ])->name('admin.marketplace.seller.category.index');
+
+ Route::get('create', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@create')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.category.create',
+ ])->name('admin.marketplace.seller.category.create');
+
+ Route::post('create', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@store')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.seller.category.index',
+ ])->name('admin.marketplace.seller.category.store');
+
+ Route::get('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@edit')->defaults('_config', [
+ 'view' => 'marketplace::admin.sellers.category.edit',
+ ])->name('admin.marketplace.seller.category.edit');
+
+ Route::post('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@update')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.seller.category.index',
+ ])->name('admin.marketplace.seller.category.update');
+
+ Route::delete('/delete/{id}', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@destroy')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.seller.category.index',
+ ])->name('admin.marketplace.seller.category.delete');
+
+ Route::post('/massdelete', 'Webkul\Marketplace\Http\Controllers\Admin\SellerCategoryController@massDestroy')->defaults('_config', [
+ 'redirect' => 'admin.marketplace.seller.category.index',
+ ])->name('admin.marketplace.seller.category.mass-delete');
+
+ });
+
+ // Sellers category routes end here
+
+ // payment request routes start here
+
+ Route::get('payment-request', 'Webkul\Marketplace\Http\Controllers\Admin\PaymentRequestController@index')->defaults('_config', [
+ 'view' => 'marketplace::admin.paymentRequest.index'
+ ])->name('marketplace.admin.payment.request.index');
+
+ // payment request routes end here
+
+ });
+
+});
diff --git a/packages/Webkul/Marketplace/src/Http/front-routes.php b/packages/Webkul/Marketplace/src/Http/front-routes.php
new file mode 100644
index 000000000..b0893f20a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Http/front-routes.php
@@ -0,0 +1,232 @@
+ ['web', 'theme', 'locale', 'currency']], function () {
+
+ //Marketplace routes starts here
+ Route::prefix('marketplace')->group(function () {
+ Route::get('/', 'Webkul\Marketplace\Http\Controllers\Shop\MarketplaceController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.seller-central.index'
+ ])->name('marketplace.seller_central.index');
+
+ Route::get('seller/profile/{url}', 'Webkul\Marketplace\Http\Controllers\Shop\SellerController@show')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.profile'
+ ])->name('marketplace.seller.show');
+
+ Route::post('seller/url', 'Webkul\Marketplace\Http\Controllers\Shop\SellerController@checkShopUrl')->name('marketplace.seller.url');
+
+ Route::post('seller/{url}/contact', 'Webkul\Marketplace\Http\Controllers\Shop\SellerController@contact')->name('marketplace.seller.contact');
+
+ Route::post('seller/query', 'Webkul\Marketplace\Http\Controllers\Shop\SellerController@sellerQuery')->name('marketplace.seller.query');
+
+ Route::post('seller-info', 'Webkul\Marketplace\Http\Controllers\Shop\SellerController@getSellerInfo');
+
+ //Seller Review routes
+ Route::get('seller/{url}/reviews', 'Webkul\Marketplace\Http\Controllers\Shop\ReviewController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.reviews.index'
+ ])->name('marketplace.reviews.index');
+
+
+ //Seller Products routes
+ Route::get('seller/{url}/products', 'Webkul\Marketplace\Http\Controllers\Shop\ProductController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.products.index'
+ ])->name('marketplace.products.index');
+
+ //Minimum order routes
+ Route::get('checkout/onepage/', 'Webkul\Marketplace\Http\Controllers\Shop\MinimumOrderController@index')->defaults('_config', [
+ 'view' => 'shop::checkout.onepage'
+ ])->name('marketplace.shop.checkout.onepage.index');
+
+ // Auth Routes
+ Route::group(['middleware' => ['customer']], function () {
+
+ //Seller Review routes
+ Route::get('seller/{url}/reviews/create', 'Webkul\Marketplace\Http\Controllers\Shop\ReviewController@create')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.reviews.create'
+ ])->name('marketplace.reviews.create');
+
+ Route::post('seller/{url}/reviews/create', 'Webkul\Marketplace\Http\Controllers\Shop\ReviewController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.seller.show'
+ ])->name('marketplace.reviews.store');
+
+
+ //Marketplace seller account
+ Route::prefix('account')->group(function () {
+ Route::get('create', 'Webkul\Marketplace\Http\Controllers\Shop\Account\SellerController@create')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.profile.create'
+ ])->name('marketplace.account.seller.create');
+
+ Route::post('create', 'Webkul\Marketplace\Http\Controllers\Shop\Account\SellerController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.account.seller.create'
+ ])->name('marketplace.account.seller.store');
+
+ Route::get('edit', 'Webkul\Marketplace\Http\Controllers\Shop\Account\SellerController@edit')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.profile.edit'
+ ])->name('marketplace.account.seller.edit');
+
+ Route::put('edit/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\SellerController@update')->defaults('_config', [
+ 'redirect' => 'marketplace.account.seller.edit'
+ ])->name('marketplace.account.seller.update');
+
+
+ //Dashboard route
+ Route::get('dashboard', 'Webkul\Marketplace\Http\Controllers\Shop\Account\DashboardController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.dashboard.index'
+ ])->name('marketplace.account.dashboard.index');
+
+ // Earnings route
+ Route::get('earning', 'Webkul\Marketplace\Http\Controllers\Shop\Account\EarningController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.earning.index'
+ ])->name('marketplace.account.earning.index');
+
+ // Catalog Routes
+ Route::prefix('catalog')->group(function () {
+
+ // Catalog Product Routes
+ Route::get('/products', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.catalog.products.index'
+ ])->name('marketplace.account.products.index');
+
+ // Catalog Product Routes
+ Route::get('/products/search', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.catalog.products.search'
+ ])->name('marketplace.account.products.search');
+
+ Route::get('/products/assign/{id?}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@create')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.catalog.products.assign'
+ ])->name('marketplace.account.products.assign');
+
+ Route::post('/products/assign/{id?}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.account.products.index'
+ ])->name('marketplace.account.products.assign-store');
+
+ Route::get('/products/edit-assign/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@edit')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.catalog.products.edit-assign'
+ ])->name('marketplace.account.products.edit-assign');
+
+ Route::put('/products/edit-assign/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@update')->defaults('_config', [
+ 'redirect' => 'marketplace.account.products.index'
+ ])->name('marketplace.account.products.assign.update');
+
+ Route::post('/products/upload-file/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@uploadLink')->name('marketplace.catalog.products.upload_link');
+
+ Route::post('/products/upload-sample/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\AssignProductController@uploadSample')->name('marketplace.catalog.products.upload_sample');
+
+
+ Route::get('/products/create', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@create')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.catalog.products.create'
+ ])->name('marketplace.account.products.create');
+
+ Route::post('/products/create', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.account.products.edit'
+ ])->name('marketplace.account.products.store');
+
+ Route::get('/products/edit/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@edit')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.catalog.products.edit'
+ ])->name('marketplace.account.products.edit');
+
+ Route::put('/products/edit/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@update')->defaults('_config', [
+ 'redirect' => 'marketplace.account.products.index'
+ ])->name('marketplace.account.products.update');
+
+
+ Route::post('/products/delete/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@destroy')->name('marketplace.account.products.delete');
+
+ Route::post('products/massdelete', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@massDestroy')->defaults('_config', [
+ 'redirect' => 'marketplace.account.products.index'
+ ])->name('marketplace.account.products.massdelete');
+
+ Route::get('products/copy/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController@copy')->defaults('_config', [
+ 'view' => 'marketplace.account.products.edit',
+ ])->name('seller.catalog.products.copy');
+ });
+
+ //Sales routes
+ Route::prefix('sales')->group(function () {
+ Route::get('orders', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\OrderController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.sales.orders.index'
+ ])->name('marketplace.account.orders.index');
+
+ Route::get('customer/orders/{customer_id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\CustomerController@orders')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.customers.orders'
+ ])->name('marketplace.account.customers.order.index');
+
+ Route::get('orders/view/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\OrderController@view')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.sales.orders.view'
+ ])->name('marketplace.account.orders.view');
+
+ Route::get('/orders/cancel/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\OrderController@cancel')->name('marketplace.account.orders.cancel');
+
+
+ // Sales Invoices Routes
+ Route::get('invoices/create/{order_id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\InvoiceController@create')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.sales.invoices.create'
+ ])->name('marketplace.account.invoices.create');
+
+ Route::post('invoices/create/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\InvoiceController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.account.orders.view'
+ ])->name('marketplace.account.invoices.store');
+
+ //Prints invoice
+ Route::get('invoices/print/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\InvoiceController@print')
+ ->name('marketplace.account.invoices.print');
+
+
+ // Sales Shipments Routes
+ Route::get('shipments/create/{order_id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\ShipmentController@create')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.sales.shipments.create'
+ ])->name('marketplace.account.shipments.create');
+
+ Route::post('shipments/create/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\ShipmentController@store')->defaults('_config', [
+ 'redirect' => 'marketplace.account.orders.view'
+ ])->name('marketplace.account.shipments.store');
+
+
+ // Sales Transactions Routes
+ Route::get('transactions', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\TransactionController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.sales.transactions.index'
+ ])->name('marketplace.account.transactions.index');
+
+ Route::get('transactions/view/{id}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\TransactionController@view')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.sales.transactions.view'
+ ])->name('marketplace.account.transactions.view');
+ });
+
+
+ //Seller review routes
+ Route::get('reviews', 'Webkul\Marketplace\Http\Controllers\Shop\Account\ReviewController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.reviews.index'
+ ])->name('marketplace.account.reviews.index');
+
+ Route::get('customers', 'Webkul\Marketplace\Http\Controllers\Shop\Account\CustomerController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.customers.index'
+ ])->name('marketplace.account.customers.index');
+
+
+ //Seller Payment Request routes
+ Route::get('payment-request', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\PaymentRequestController@index')->defaults('_config', [
+ 'view' => 'marketplace::shop.sellers.account.paymentRequest.index'
+ ])->name('marketplace.account.payment.request.index');
+
+ Route::get('payment/request/{orderId}', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\PaymentRequestController@requestPayment')->name('marketplace.account.payment.request');
+
+
+ Route::post('payment/request/massrequest', 'Webkul\Marketplace\Http\Controllers\Shop\Account\Sales\PaymentRequestController@massRequestPayment')->defaults('_config', [
+ 'redirect' => 'marketplace.account.payment.request.index'
+ ])->name('marketplace.account.payment.massrequest');
+
+ });
+ });
+
+ // Flag routes
+ Route::post('flag/product/create', 'Webkul\Marketplace\Http\Controllers\Shop\FlagController@productFlagstore')->name('marketplace.flag.product.store');
+
+ Route::post('flag/seller/create', 'Webkul\Marketplace\Http\Controllers\Shop\FlagController@sellerFlagstore')->name('marketplace.flag.seller.store');
+
+ });
+ //Marketplace routes end here
+
+ //Seller review routes
+ Route::get('products/{id}/offers', 'Webkul\Marketplace\Http\Controllers\Shop\ProductController@offers')->defaults('_config', [
+ 'view' => 'marketplace::shop.products.offers'
+ ])->name('marketplace.product.offers.index');
+});
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Listeners/Cart.php b/packages/Webkul/Marketplace/src/Listeners/Cart.php
new file mode 100644
index 000000000..89491da6a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Cart.php
@@ -0,0 +1,168 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Cart
+{
+ /**
+ * SellerRepository object
+ *
+ * @var Seller
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Product
+ */
+ protected $productRepository;
+
+ /**
+ * CoreProductRepository Object
+ */
+ protected $coreProductRepository;
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\ProductRepository $productRepository
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ ProductRepository $productRepository,
+ CoreProductRepository $coreProductRepository
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->coreProductRepository = $coreProductRepository;
+ }
+
+ /**
+ * Product added to the cart
+ *
+ * @param mixed $cartItem
+ */
+ public function cartItemAddBefore($productId)
+ {
+ $data = request()->all();
+
+ if (isset($data['seller_info']) && !$data['seller_info']['is_owner']) {
+ $sellerProduct = $this->productRepository->find($data['seller_info']['product_id']);
+ } else {
+ if (isset($data['selected_configurable_option'])) {
+ $sellerProduct = $this->productRepository->findOneWhere([
+ 'product_id' => $data['selected_configurable_option'],
+ 'is_owner' => 1
+ ]);
+ } else {
+ $sellerProduct = $this->productRepository->findOneWhere([
+ 'product_id' => $productId,
+ 'is_owner' => 1
+ ]);
+
+ }
+ }
+
+ if (!$sellerProduct) {
+ return;
+ }
+
+ if (! isset($data['quantity']))
+ $data['quantity'] = 1;
+
+ $product = $this->coreProductRepository->findOneByField('id', $productId);
+
+ if ($cart = CartFacade::getCart()) {
+ $cartItem = $cart->items()->where('product_id', $sellerProduct->product_id)->first();
+
+ if ($cartItem) {
+ if (!$sellerProduct->haveSufficientQuantity($data['quantity']) && $product->haveSufficientQuantity($data['quantity'])) {
+ return;
+
+ } else if (!$sellerProduct->haveSufficientQuantity($data['quantity'])) {
+
+ throw new \Exception('Requested quantity not available.');
+ }
+
+ $quantity = $cartItem->quantity + $data['quantity'];
+ } else {
+ $quantity = $data['quantity'];
+ }
+ } else {
+ $quantity = $data['quantity'];
+ }
+
+ if (!$sellerProduct->haveSufficientQuantity($quantity) && $product->haveSufficientQuantity($quantity)) {
+ return;
+
+ } else if(!$sellerProduct->haveSufficientQuantity($quantity) ) {
+
+ throw new \Exception('Requested quantity not available.');
+ }
+ }
+
+ /**
+ * Product added to the cart
+ *
+ * @param mixed $cartItem
+ */
+ public function cartItemAddAfter($cartItem)
+ {
+ foreach(CartFacade::getCart()->items as $items)
+ {
+
+ if (isset($items->additional['seller_info']) && !$items->additional['seller_info']['is_owner']) {
+ $product = $this->productRepository->find($items->additional['seller_info']['product_id']);
+ if ($product) {
+ $items->price = core()->convertPrice($product->price);
+ $items->base_price = $product->price;
+ $items->custom_price = $product->price;
+ $items->total = core()->convertPrice($product->price * $items->quantity);
+ $items->base_total = $product->price * $items->quantity;
+
+ if ($items->product->type == 'downloadable') {
+
+ $data = request()->all();
+
+ foreach ($product->downloadable_links as $link) {
+ if (! in_array($link->id, $data['links'])) {
+ continue;
+ }
+
+ $items->price += core()->convertPrice($link->price);
+ $items->base_price += $link->price;
+ $items->custom_price += $link->price;
+ $items->total += (core()->convertPrice($link->price) * $items->quantity);
+ $items->base_total += ($link->price * $items->quantity);
+ }
+ }
+
+ $items->save();
+
+ }
+
+ $items->save();
+ } else {
+ $items->save();
+ }
+ }
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Listeners/Customer.php b/packages/Webkul/Marketplace/src/Listeners/Customer.php
new file mode 100644
index 000000000..345025200
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Customer.php
@@ -0,0 +1,93 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Customer
+{
+ /**
+ * SellerRepository object
+ *
+ * @var Seller
+ */
+ protected $seller;
+
+ /**
+ * AdminRepository object
+ *
+ * @var Seller
+ */
+ protected $admin;
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $seller
+ * @param Webkul\User\Repositories\AdminRepository $admin
+ * @return void
+ */
+ public function __construct(SellerRepository $seller, AdminRepository $admin)
+ {
+ $this->seller = $seller;
+
+ $this->admin = $admin;
+ }
+
+ /**
+ * Register seller if customer requested
+ *
+ * @param mixed $customer
+ */
+ public function registerSeller($customer)
+ {
+ $admin = $this->admin->findOneWhere(['role_id' => 1]);
+
+ if (request()->input('want_to_be_seller') && $url = request()->input('url')) {
+ $seller = $this->seller->findOneByField([
+ 'url' => $url
+ ]);
+
+ if (! $seller) {
+ $data = [
+ 'customer_id' => $customer->id,
+ 'url' => $url,
+ 'is_approved' => core()->getConfigData('marketplace.settings.general.seller_approval_required') ? 0 : 1
+ ];
+
+ $seller = $this->seller->create($data);
+
+ try {
+ if ($seller->is_approved) {
+ Mail::send(new SellerApprovalNotification($seller));
+ } else {
+ Mail::send(new SellerWelcomeNotification($seller));
+
+ Mail::send(new NewSellerNotification($seller, $admin));
+ }
+ } catch (\Exception $e) {}
+
+ }
+ }
+ }
+
+ /**
+ * Delete inventory of seller after delete
+ *
+ * @param mixed $id
+ */
+ public function afterSellerDelete($id) {
+ $this->seller->deleteInventory($id);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Listeners/Flag.php b/packages/Webkul/Marketplace/src/Listeners/Flag.php
new file mode 100644
index 000000000..dd803ce7c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Flag.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Flag
+{
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\RefundRepository $refund
+ * @return void
+ */
+ // public function __construct(
+ // RefundRepository $refund
+ // )
+ // {
+ // $this->refund = $refund;
+ // }
+
+ public function productFlags ($product) {
+
+ return view('marketplace::shop.flags.flags-accordian');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Listeners/Invoice.php b/packages/Webkul/Marketplace/src/Listeners/Invoice.php
new file mode 100644
index 000000000..e77e1f298
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Invoice.php
@@ -0,0 +1,45 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Invoice
+{
+ /**
+ * InvoiceRepository object
+ *
+ * @var Product
+ */
+ protected $invoice;
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\InvoiceRepository $order
+ * @return void
+ */
+ public function __construct(
+ InvoiceRepository $invoice
+ )
+ {
+ $this->invoice = $invoice;
+ }
+
+ /**
+ * After sales invoice creation, creater marketplace invoice
+ *
+ * @param mixed $invoice
+ */
+ public function afterInvoice($invoice)
+ {
+ $this->invoice->create(['invoice' => $invoice]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Listeners/Order.php b/packages/Webkul/Marketplace/src/Listeners/Order.php
new file mode 100644
index 000000000..c459095de
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Order.php
@@ -0,0 +1,100 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Order
+{
+ /**
+ * OrderRepository object
+ *
+ * @var Product
+ */
+ protected $order;
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderRepository $order
+ * @return void
+ */
+ public function __construct(
+ OrderRepository $order
+ )
+ {
+ $this->order = $order;
+ }
+
+ /**
+ * After sales order creation, add entry to marketplace order table
+ *
+ * @param mixed $order
+ */
+ public function afterPlaceOrder($order)
+ {
+ $this->order->create(['order' => $order]);
+ }
+
+ /**
+ * After sales order cancellation
+ *
+ * @param mixed $order
+ */
+ public function afterOrderCancel($order)
+ {
+ $this->order->cancel(['order' => $order]);
+ }
+
+ /**
+ * @param mixed $order
+ *
+ * Send new order confirmation mail to the customer
+ */
+ public function sendNewOrderMail($order)
+ {
+ try {
+ Mail::send(new NewOrderNotification($order));
+ } catch (\Exception $e) {
+
+ }
+ }
+
+ /**
+ * @param mixed $invoice
+ *
+ * Send new invoice mail to the customer
+ */
+ public function sendNewInvoiceMail($invoice)
+ {
+ try {
+ Mail::send(new NewInvoiceNotification($invoice));
+ } catch (\Exception $e) {
+
+ }
+ }
+
+ /**
+ * @param mixed $shipment
+ *
+ * Send new shipment mail to the customer
+ */
+ public function sendNewShipmentMail($shipment)
+ {
+ try {
+ Mail::send(new NewShipmentNotification($shipment));
+ } catch (\Exception $e) {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Listeners/Product.php b/packages/Webkul/Marketplace/src/Listeners/Product.php
new file mode 100644
index 000000000..9a8d0e1fe
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Product.php
@@ -0,0 +1,380 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Product
+{
+ /**
+ * OrderRepository object
+ *
+ * @var Product
+ */
+ protected $order;
+
+ /**
+ * AttributeRepository Repository Object
+ *
+ * @var object
+ */
+ protected $attributeRepository;
+
+ /**
+ * AttributeOptionRepository Repository Object
+ *
+ * @var object
+ */
+ protected $attributeOptionRepository;
+
+ /**
+ * ProductFlatRepository Repository Object
+ *
+ * @var object
+ */
+ protected $productFlatRepository;
+
+ /**
+ * Attribute Object
+ *
+ * @var object
+ */
+ protected $attribute;
+
+ /**
+ * mpProductRepository Object
+ *
+ * @var object
+ */
+ protected $mpProductRepository;
+
+ /**
+ * ProductInventoryRepository object
+ *
+ * @var array
+ */
+ protected $productInventoryRepository;
+
+ /**
+ * @var object
+ */
+ public $attributeTypeFields = [
+ 'text' => 'text',
+ 'textarea' => 'text',
+ 'price' => 'float',
+ 'boolean' => 'boolean',
+ 'select' => 'integer',
+ 'multiselect' => 'text',
+ 'datetime' => 'datetime',
+ 'date' => 'date',
+ 'file' => 'text',
+ 'image' => 'text',
+ 'checkbox' => 'text'
+ ];
+
+ /**
+ * Create a new listener instance.
+ *
+ * @param Webkul\Attribute\Repositories\AttributeRepository $attributeRepository
+ * @param Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOptionRepository
+ * @param Webkul\Product\Repositories\ProductFlatRepository $productFlatRepository
+ * @return void
+ */
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderRepository $order
+ * @param Webkul\Product\Repositories\ProductInventoryRepository $productInventoryRepository
+ * @return void
+ */
+ public function __construct(
+ OrderRepository $order,
+ AttributeRepository $attributeRepository,
+ AttributeOptionRepository $attributeOptionRepository,
+ ProductFlatRepository $productFlatRepository,
+ MpProductRepository $mpProductRepository,
+ ProductInventoryRepository $productInventoryRepository
+ )
+ {
+ $this->order = $order;
+
+ $this->attributeRepository = $attributeRepository;
+
+ $this->attributeOptionRepository = $attributeOptionRepository;
+
+ $this->productFlatRepository = $productFlatRepository;
+
+ $this->mpProductRepository = $mpProductRepository;
+
+ $this->productInventoryRepository = $productInventoryRepository;
+ }
+
+
+ public function BeforeProductCreate($id) {
+
+ $data = request()->all();
+
+ if (! isset($data['variants'])) {
+ $sellerProduct = $this->mpProductRepository->findOneWhere([
+ 'product_id' => $id,
+ 'is_owner' => 1
+ ]);
+
+ if (isset($sellerProduct)) {
+
+ $this->productInventoryRepository->saveInventories(array_merge($data, [
+ 'vendor_id' => $sellerProduct->marketplace_seller_id
+ ]), $sellerProduct->product);
+ }
+ } else if(isset($data['variants'])) {
+
+ foreach($data['variants'] as $productId => $variant) {
+
+ $sellerProduct = $this->mpProductRepository->findOneWhere([
+ 'product_id' => $productId,
+ 'is_owner' => 1
+ ]);
+
+ if (isset($sellerProduct)) {
+
+ $this->productInventoryRepository->saveInventories(array_merge($variant, [
+ 'vendor_id' => $sellerProduct->marketplace_seller_id
+ ]), $sellerProduct->product);
+ }
+ }
+ }
+
+ }
+ /**
+ * After the attribute is created
+ *
+ * @return void
+ */
+ public function afterAttributeCreatedUpdated($attribute)
+ {
+ if (! $attribute->is_user_defined) {
+ return false;
+ }
+
+ if (! $attribute->use_in_flat) {
+ $this->afterAttributeDeleted($attribute->id);
+ return false;
+ }
+
+ if (! Schema::hasColumn('product_flat', $attribute->code)) {
+ Schema::table('product_flat', function (Blueprint $table) use($attribute) {
+ $table->{$this->attributeTypeFields[$attribute->type]}($attribute->code)->nullable();
+
+ if ($attribute->type == 'select' || $attribute->type == 'multiselect') {
+ $table->string($attribute->code . '_label')->nullable();
+ }
+ });
+ }
+ }
+
+ public function afterAttributeDeleted($attributeId)
+ {
+ $attribute = $this->attributeRepository->find($attributeId);
+
+ if (Schema::hasColumn('product_flat', strtolower($attribute->code))) {
+ Schema::table('product_flat', function (Blueprint $table) use($attribute) {
+ $table->dropColumn($attribute->code);
+
+ if ($attribute->type == 'select' || $attribute->type == 'multiselect') {
+ $table->dropColumn($attribute->code . '_label');
+ }
+ });
+ }
+ }
+
+ /**
+ * Creates product flat
+ *
+ * @param Product $product
+ * @return void
+ */
+ public function afterProductCreatedUpdated($product)
+ {
+ $this->createFlat($product);
+
+ if ($product->type == 'configurable') {
+ foreach ($product->variants()->get() as $variant) {
+ $this->createFlat($variant, $product);
+ }
+ }
+ }
+
+ /**
+ * Creates product flat
+ *
+ * @param Product $product
+ * @param Product $parentProduct
+ * @return void
+ */
+ public function createFlat($product, $parentProduct = null)
+ {
+ static $familyAttributes = [];
+
+ static $superAttributes = [];
+
+ if (! array_key_exists($product->attribute_family->id, $familyAttributes))
+ $familyAttributes[$product->attribute_family->id] = $product->attribute_family->custom_attributes;
+
+ if ($parentProduct && ! array_key_exists($parentProduct->id, $superAttributes))
+ $superAttributes[$parentProduct->id] = $parentProduct->super_attributes()->pluck('code')->toArray();
+
+ if (isset($product['channels'])) {
+ foreach ($product['channels'] as $channel) {
+ $channel = app('Webkul\Core\Repositories\ChannelRepository')->findOrFail($channel);
+ $channels[] = $channel['code'];
+ }
+ } else if (isset($parentProduct['channels'])){
+ foreach ($parentProduct['channels'] as $channel) {
+ $channel = app('Webkul\Core\Repositories\ChannelRepository')->findOrFail($channel);
+ $channels[] = $channel['code'];
+ }
+ } else {
+ $channels[] = core()->getDefaultChannelCode();
+ }
+
+ if (request()->has('customer_group_prices')) {
+ app('Webkul\Product\Repositories\ProductCustomerGroupPriceRepository')->saveCustomerGroupPrices(request()->all(),
+ $product);
+ }
+
+ foreach (core()->getAllChannels() as $channel) {
+ if (in_array($channel->code, $channels)) {
+ foreach ($channel->locales as $locale) {
+ $productFlat = $this->productFlatRepository->findOneWhere([
+ 'product_id' => $product->id,
+ 'channel' => $channel->code,
+ 'locale' => $locale->code
+ ]);
+
+ if (! $productFlat) {
+ $productFlat = $this->productFlatRepository->create([
+ 'product_id' => $product->id,
+ 'channel' => $channel->code,
+ 'locale' => $locale->code
+ ]);
+ }
+
+ foreach ($familyAttributes[$product->attribute_family->id] as $attribute) {
+ if ($parentProduct && ! in_array($attribute->code, array_merge($superAttributes[$parentProduct->id], ['sku', 'name', 'price', 'weight', 'status'])))
+ continue;
+
+ if (in_array($attribute->code, ['tax_category_id']))
+ continue;
+
+ if (! Schema::hasColumn('product_flat', $attribute->code))
+ continue;
+
+ if ($attribute->value_per_channel) {
+ if ($attribute->value_per_locale) {
+ $productAttributeValue = $product->attribute_values()->where('channel', $channel->code)->where('locale', $locale->code)->where('attribute_id', $attribute->id)->first();
+ } else {
+ $productAttributeValue = $product->attribute_values()->where('channel', $channel->code)->where('attribute_id', $attribute->id)->first();
+ }
+ } else {
+ if ($attribute->value_per_locale) {
+ $productAttributeValue = $product->attribute_values()->where('locale', $locale->code)->where('attribute_id', $attribute->id)->first();
+ } else {
+ $productAttributeValue = $product->attribute_values()->where('attribute_id', $attribute->id)->first();
+ }
+ }
+
+ if ($product->type == 'configurable' && $attribute->code == 'price') {
+ try {
+ $productFlat->{$attribute->code} = app('Webkul\Marketplace\Helpers\Price')->getVariantMinPrice($product);
+ } catch (\Exception $e) {}
+ } else {
+ try {
+ $productFlat->{$attribute->code} = $productAttributeValue[ProductAttributeValue::$attributeTypeFields[$attribute->type]];
+ } catch (\Exception $e) {}
+ }
+
+ if ($attribute->type == 'select') {
+ $attributeOption = $this->attributeOptionRepository->find($product->{$attribute->code});
+ if ($attributeOption) {
+ if ($attributeOptionTranslation = $attributeOption->translate($locale->code)) {
+ $productFlat->{$attribute->code . '_label'} = $attributeOptionTranslation->label;
+ } else {
+ $productFlat->{$attribute->code . '_label'} = $attributeOption->admin_name;
+ }
+ }
+ } elseif ($attribute->type == 'multiselect') {
+ $attributeOptionIds = explode(',', $product->{$attribute->code});
+
+ if (count($attributeOptionIds)) {
+ $attributeOptions = $this->attributeOptionRepository->findWhereIn('id', $attributeOptionIds);
+
+ $optionLabels = [];
+
+ foreach ($attributeOptions as $attributeOption) {
+ if ($attributeOptionTranslation = $attributeOption->translate($locale->code)) {
+ $optionLabels[] = $attributeOptionTranslation->label;
+ } else {
+ $optionLabels[] = $attributeOption->admin_name;
+ }
+ }
+
+ $productFlat->{$attribute->code . '_label'} = implode(', ', $optionLabels);
+ }
+ }
+ }
+ $productFlat->created_at = $product->created_at;
+
+ $productFlat->updated_at = $product->updated_at;
+
+ if ($parentProduct) {
+ $parentProductFlat = $this->productFlatRepository->findOneWhere([
+ 'product_id' => $parentProduct->id,
+ 'channel' => $channel->code,
+ 'locale' => $locale->code
+ ]);
+
+ if ($parentProductFlat) {
+ $productFlat->parent_id = $parentProductFlat->id;
+ }
+ }
+
+ $productFlat->save();
+ }
+ } else {
+ $route = request()->route() ? request()->route()->getName() : "";
+
+ if ($route == 'admin.catalog.products.update') {
+ $productFlat = $this->productFlatRepository->findOneWhere([
+ 'product_id' => $product->id,
+ 'channel' => $channel->code,
+ ]);
+
+ if ($productFlat) {
+ $this->productFlatRepository->delete($productFlat->id);
+ }
+ }
+ }
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Listeners/Refund.php b/packages/Webkul/Marketplace/src/Listeners/Refund.php
new file mode 100644
index 000000000..e284662f6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Refund.php
@@ -0,0 +1,45 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Refund
+{
+ /**
+ * RefundRepository object
+ *
+ * @var Product
+ */
+ protected $refund;
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\RefundRepository $refund
+ * @return void
+ */
+ public function __construct(
+ RefundRepository $refund
+ )
+ {
+ $this->refund = $refund;
+ }
+
+ /**
+ * After sales refund creation, create marketplace refund
+ *
+ * @param mixed $refund
+ */
+ public function afterRefund($refund)
+ {
+ $this->refund->create(['refund' => $refund]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Listeners/Shipment.php b/packages/Webkul/Marketplace/src/Listeners/Shipment.php
new file mode 100644
index 000000000..247aa68b7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Listeners/Shipment.php
@@ -0,0 +1,45 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Shipment
+{
+ /**
+ * ShipmentRepository object
+ *
+ * @var Product
+ */
+ protected $shipment;
+
+ /**
+ * Create a new customer event listener instance.
+ *
+ * @param Webkul\Marketplace\Repositories\ShipmentRepository $order
+ * @return void
+ */
+ public function __construct(
+ ShipmentRepository $shipment
+ )
+ {
+ $this->shipment = $shipment;
+ }
+
+ /**
+ * After sales shipment creation, creater marketplace shipment
+ *
+ * @param mixed $shipment
+ */
+ public function afterShipment($shipment)
+ {
+ $this->shipment->create(['shipment' => $shipment]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Mail/AdminReportProductNotification.php b/packages/Webkul/Marketplace/src/Mail/AdminReportProductNotification.php
new file mode 100644
index 000000000..27b147fb7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/AdminReportProductNotification.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class AdminReportProductNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Contains form data
+ *
+ * @var array
+ */
+ public $data;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param Seller $seller
+ * @param array $data
+ * @return void
+ */
+ public function __construct($seller, $data)
+ {
+ $this->seller = $seller;
+
+ $this->data = $data;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->replyTo($this->data['email'], $this->data['name'])
+ ->subject(trans('marketplace::app.shop.sellers.mails.contact-seller.subject', ['subject' => $this->data['subject']]))
+ ->view('marketplace::shop.emails.contact-seller', ['sellerName' => $this->seller->name, 'query' => $this->data['query']]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/AdminReportSellerNotification.php b/packages/Webkul/Marketplace/src/Mail/AdminReportSellerNotification.php
new file mode 100644
index 000000000..a94c2dbfa
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/AdminReportSellerNotification.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class AdminReportSellerNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Contains form data
+ *
+ * @var array
+ */
+ public $data;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param Seller $seller
+ * @param array $data
+ * @return void
+ */
+ public function __construct($seller, $data)
+ {
+ $this->seller = $seller;
+
+ $this->data = $data;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->replyTo($this->data['email'], $this->data['name'])
+ ->subject(trans('marketplace::app.shop.sellers.mails.contact-seller.subject', ['subject' => $this->data['subject']]))
+ ->view('marketplace::shop.emails.contact-seller', ['sellerName' => $this->seller->name, 'query' => $this->data['query']]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/ContactSellerNotification.php b/packages/Webkul/Marketplace/src/Mail/ContactSellerNotification.php
new file mode 100644
index 000000000..8ff941a45
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/ContactSellerNotification.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ContactSellerNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Contains form data
+ *
+ * @var array
+ */
+ public $data;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param Seller $seller
+ * @param array $data
+ * @return void
+ */
+ public function __construct($seller, $data)
+ {
+ $this->seller = $seller;
+
+ $this->data = $data;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->replyTo($this->data['email'], $this->data['name'])
+ ->subject(trans('marketplace::app.shop.sellers.mails.contact-seller.subject', ['subject' => $this->data['subject']]))
+ ->view('marketplace::shop.emails.contact-seller', ['sellerName' => $this->seller->name, 'query' => $this->data['query']]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/NewInvoiceNotification.php b/packages/Webkul/Marketplace/src/Mail/NewInvoiceNotification.php
new file mode 100644
index 000000000..ec1f1a881
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/NewInvoiceNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class NewInvoiceNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The Invoice instance.
+ *
+ * @var Invoice
+ */
+ public $sellerInvoice;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($sellerInvoice)
+ {
+ $this->sellerInvoice = $sellerInvoice;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->sellerInvoice->invoice->order->customer_email, $this->sellerInvoice->invoice->order->customer_full_name)
+ ->subject(trans('marketplace::app.mail.sales.invoice.subject'))
+ ->view('marketplace::emails.sales.new-invoice');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/NewOrderNotification.php b/packages/Webkul/Marketplace/src/Mail/NewOrderNotification.php
new file mode 100644
index 000000000..3f497f8f2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/NewOrderNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class NewOrderNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The order instance.
+ *
+ * @var Order
+ */
+ public $sellerOrder;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($sellerOrder)
+ {
+ $this->sellerOrder = $sellerOrder;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->sellerOrder->seller->customer->email, $this->sellerOrder->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.sales.order.subject'))
+ ->view('marketplace::emails.sales.new-order');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/NewSellerNotification.php b/packages/Webkul/Marketplace/src/Mail/NewSellerNotification.php
new file mode 100644
index 000000000..e666cfe82
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/NewSellerNotification.php
@@ -0,0 +1,57 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class NewSellerNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * The admin instance.
+ *
+ * @var Admin
+ */
+ public $admin;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($seller, $admin)
+ {
+ $this->seller = $seller;
+
+ $this->admin = $admin;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->admin->email)
+ ->subject(trans('marketplace::app.mail.seller.regisration.subject'))
+ ->view('marketplace::emails.seller.register');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Mail/NewShipmentNotification.php b/packages/Webkul/Marketplace/src/Mail/NewShipmentNotification.php
new file mode 100644
index 000000000..ddeb21260
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/NewShipmentNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class NewShipmentNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The Shipment instance.
+ *
+ * @var Shipment
+ */
+ public $sellerShipment;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($sellerShipment)
+ {
+ $this->sellerShipment = $sellerShipment;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->sellerShipment->order->seller->customer->email, $this->sellerShipment->order->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.sales.shipment.subject'))
+ ->view('marketplace::emails.sales.new-shipment');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/PaymentRequestNotification.php b/packages/Webkul/Marketplace/src/Mail/PaymentRequestNotification.php
new file mode 100644
index 000000000..30a3f0c7f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/PaymentRequestNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class PaymentRequestNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The order instance.
+ *
+ * @var Order
+ */
+ public $sellerOrder;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($sellerOrder)
+ {
+ $this->sellerOrder = $sellerOrder;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to(core()->getConfigData('emails.configure.email_settings.admin_email'))
+ ->subject(trans('marketplace::app.mail.sales.order.subject'))
+ ->view('marketplace::emails.payment.paymentRequest');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/ProductApprovalNotification.php b/packages/Webkul/Marketplace/src/Mail/ProductApprovalNotification.php
new file mode 100644
index 000000000..472c36079
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/ProductApprovalNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductApprovalNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The Product instance.
+ *
+ * @var Product
+ */
+ public $sellerProduct;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($sellerProduct)
+ {
+ $this->sellerProduct = $sellerProduct;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->sellerProduct->seller->customer->email, $this->sellerProduct->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.product.subject'))
+ ->view('marketplace::emails.product.approval');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/ProductDisapprovalNotification.php b/packages/Webkul/Marketplace/src/Mail/ProductDisapprovalNotification.php
new file mode 100644
index 000000000..4eb7f26d4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/ProductDisapprovalNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductDisapprovalNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The Product instance.
+ *
+ * @var Product
+ */
+ public $sellerProduct;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($sellerProduct)
+ {
+ $this->sellerProduct = $sellerProduct;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->sellerProduct->seller->customer->email, $this->sellerProduct->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.product.disapprove-product'))
+ ->view('marketplace::emails.product.disapproval');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/ReportProductNotification.php b/packages/Webkul/Marketplace/src/Mail/ReportProductNotification.php
new file mode 100644
index 000000000..0134f3ecc
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/ReportProductNotification.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReportProductNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Contains form data
+ *
+ * @var array
+ */
+ public $data;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param Seller $seller
+ * @param array $data
+ * @return void
+ */
+ public function __construct($seller, $data)
+ {
+ $this->seller = $seller;
+
+ $this->data = $data;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->replyTo($this->data['email'], $this->data['name'])
+ ->subject(trans('marketplace::app.shop.sellers.mails.contact-seller.subject', ['subject' => $this->data['subject']]))
+ ->view('marketplace::shop.emails.contact-seller', ['sellerName' => $this->seller->name, 'query' => $this->data['query']]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/ReportSellerNotification.php b/packages/Webkul/Marketplace/src/Mail/ReportSellerNotification.php
new file mode 100644
index 000000000..8ae45e500
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/ReportSellerNotification.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReportSellerNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Contains form data
+ *
+ * @var array
+ */
+ public $data;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param Seller $seller
+ * @param array $data
+ * @return void
+ */
+ public function __construct($seller, $data)
+ {
+ $this->seller = $seller;
+
+ $this->data = $data;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->replyTo($this->data['email'], $this->data['name'])
+ ->subject(trans('marketplace::app.shop.sellers.mails.contact-seller.subject', ['subject' => $this->data['subject']]))
+ ->view('marketplace::shop.emails.contact-seller', ['sellerName' => $this->seller->name, 'query' => $this->data['query']]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/SellerApprovalNotification.php b/packages/Webkul/Marketplace/src/Mail/SellerApprovalNotification.php
new file mode 100644
index 000000000..b2eba9716
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/SellerApprovalNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerApprovalNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($seller)
+ {
+ $this->seller = $seller;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.seller.approval.subject'))
+ ->view('marketplace::emails.seller.approval');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/SellerDisapprovalNotification.php b/packages/Webkul/Marketplace/src/Mail/SellerDisapprovalNotification.php
new file mode 100644
index 000000000..4157bc343
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/SellerDisapprovalNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerDisapprovalNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($seller)
+ {
+ $this->seller = $seller;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.seller.approval.disapprove-seller'))
+ ->view('marketplace::emails.seller.disapproval');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/SellerQueryNotification.php b/packages/Webkul/Marketplace/src/Mail/SellerQueryNotification.php
new file mode 100644
index 000000000..85c65e5ad
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/SellerQueryNotification.php
@@ -0,0 +1,57 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerQueryNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Contains form data
+ *
+ * @var array
+ */
+ public $data;
+
+ /**
+ * Create a new message instance.
+ *
+ * @param Seller $seller
+ * @param array $data
+ * @return void
+ */
+ public function __construct($data)
+ {
+ $this->data = $data;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to(core()->getConfigData('emails.configure.email_settings.admin_email'))
+ ->subject(trans('marketplace::app.shop.sellers.mails.contact-seller.subject', ['subject' => $this->data['subject']]))
+ ->view('marketplace::shop.emails.seller.sellerQuery', ['sellerName' => $this->data['name'],'email' => $this->data['email'] ,'query' => $this->data['query']]);
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Mail/SellerWelcomeNotification.php b/packages/Webkul/Marketplace/src/Mail/SellerWelcomeNotification.php
new file mode 100644
index 000000000..27a61bc71
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Mail/SellerWelcomeNotification.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerWelcomeNotification extends Mailable
+{
+ use Queueable, SerializesModels;
+
+ /**
+ * The seller instance.
+ *
+ * @var Seller
+ */
+ public $seller;
+
+ /**
+ * Create a new message instance.
+ *
+ * @return void
+ */
+ public function __construct($seller)
+ {
+ $this->seller = $seller;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ return $this->to($this->seller->customer->email, $this->seller->customer->name)
+ ->subject(trans('marketplace::app.mail.seller.welcome.subject'))
+ ->view('marketplace::emails.seller.welcome');
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Models/Invoice.php b/packages/Webkul/Marketplace/src/Models/Invoice.php
new file mode 100644
index 000000000..b8820efc0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/Invoice.php
@@ -0,0 +1,37 @@
+belongsTo(\Webkul\Sales\Models\InvoiceProxy::modelClass(), 'invoice_id');
+ }
+
+ /**
+ * Get the Invoice items record associated with the Invoice.
+ */
+ public function items()
+ {
+ return $this->hasMany(InvoiceItemProxy::modelClass(), 'marketplace_invoice_id');
+ }
+
+ /**
+ * Get the order that belongs to the invocie.
+ */
+ public function order()
+ {
+ return $this->belongsTo(OrderProxy::modelClass(), 'marketplace_order_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/InvoiceItem.php b/packages/Webkul/Marketplace/src/Models/InvoiceItem.php
new file mode 100644
index 000000000..2e4060220
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/InvoiceItem.php
@@ -0,0 +1,23 @@
+belongsTo(\Webkul\Sales\Models\InvoiceItemProxy::modelClass(), 'invoice_item_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/InvoiceItemProxy.php b/packages/Webkul/Marketplace/src/Models/InvoiceItemProxy.php
new file mode 100644
index 000000000..d7f129adf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/InvoiceItemProxy.php
@@ -0,0 +1,9 @@
+belongsTo(ProductProxy::modelClass());
+ }
+
+ /**
+ * Get image url for the file.
+ */
+ public function file_url()
+ {
+ return Storage::url($this->path);
+ }
+
+ /**
+ * Get image url for the file.
+ */
+ public function getFileUrlAttribute()
+ {
+ return $this->file_url();
+ }
+
+ /**
+ * Get image url for the sample file.
+ */
+ public function sample_file_url()
+ {
+ return Storage::url($this->path);
+ }
+
+ /**
+ * Get image url for the sample file.
+ */
+ public function getSampleFileUrlAttribute()
+ {
+ return $this->sample_file_url();
+ }
+
+ /**
+ * @return array
+ */
+ public function toArray()
+ {
+ $array = parent::toArray();
+
+ $translation = $this->translate(core()->getRequestedLocaleCode());
+
+ $array['title'] = $translation ? $translation->title : '';
+
+ $array['file_url'] = $this->file ? Storage::url($this->file) : null;
+
+ $array['sample_file_url'] = $this->sample_file ? Storage::url($this->sample_file) : null;
+
+ return $array;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/MpProductDownloadableLinkProxy.php b/packages/Webkul/Marketplace/src/Models/MpProductDownloadableLinkProxy.php
new file mode 100644
index 000000000..fc73a9cb9
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/MpProductDownloadableLinkProxy.php
@@ -0,0 +1,10 @@
+belongsTo(ProductProxy::modelClass());
+ }
+
+ /**
+ * Get image url for the file.
+ */
+ public function file_url()
+ {
+ return Storage::url($this->path);
+ }
+
+ /**
+ * Get image url for the file.
+ */
+ public function getFileUrlAttribute()
+ {
+ return $this->file_url();
+ }
+
+ /**
+ * @return array
+ */
+ public function toArray()
+ {
+ $array = parent::toArray();
+
+ $translation = $this->translate(core()->getRequestedLocaleCode());
+
+ $array['title'] = $translation ? $translation->title : '';
+
+ $array['file_url'] = $this->file ? Storage::url($this->file) : null;
+
+ return $array;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/MpProductDownloadableSampleProxy.php b/packages/Webkul/Marketplace/src/Models/MpProductDownloadableSampleProxy.php
new file mode 100644
index 000000000..3cd35d5b6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/MpProductDownloadableSampleProxy.php
@@ -0,0 +1,10 @@
+ 'Pending',
+ 'pending_payment' => 'Pending Payment',
+ 'payment_request' => 'Payment Requested',
+ 'processing' => 'Processing',
+ 'completed' => 'Completed',
+ 'canceled' => 'Canceled',
+ 'closed' => 'Closed',
+ 'fraud' => 'Fraud'
+ ];
+
+ /**
+ * Returns the status label from status code
+ */
+ public function getStatusLabelAttribute()
+ {
+ return $this->statusLabel[$this->status];
+ }
+
+ /**
+ * Return base total due amount
+ */
+ public function getBaseTotalDueAttribute()
+ {
+ return $this->base_grand_total - $this->base_grand_total_invoiced;
+ }
+
+ /**
+ * Return total due amount
+ */
+ public function getTotalDueAttribute()
+ {
+ return $this->grand_total - $this->grand_total_invoiced;
+ }
+
+ /**
+ * Get the seller that belongs to the order.
+ */
+ public function seller()
+ {
+ return $this->belongsTo(SellerProxy::modelClass(), 'marketplace_seller_id');
+ }
+
+ /**
+ * Get the order that belongs to the order.
+ */
+ public function order()
+ {
+ return $this->belongsTo(\Webkul\Sales\Models\OrderProxy::modelClass());
+ }
+
+ /**
+ * Get the order items record associated with the order.
+ */
+ public function items()
+ {
+ return $this->hasMany(OrderItemProxy::modelClass(), 'marketplace_order_id')->whereNull('parent_id');
+ }
+
+ /**
+ * Get the order shipments record associated with the order.
+ */
+ public function shipments()
+ {
+ return $this->hasMany(ShipmentProxy::modelClass(), 'marketplace_order_id');
+ }
+
+ /**
+ * Get the order invoices record associated with the order.
+ */
+ public function invoices()
+ {
+ return $this->hasMany(InvoiceProxy::modelClass(), 'marketplace_order_id');
+ }
+
+ /**
+ * Get the order Refunds record associated with the order.
+ */
+ public function refunds()
+ {
+ return $this->hasMany(RefundProxy::modelClass(), 'marketplace_order_id');
+ }
+
+ /**
+ * Get the transactions items record associated with the order.
+ */
+ public function transactions()
+ {
+ return $this->hasMany(TransactionsProxy::modelClass(), 'marketplace_order_id');
+ }
+
+ /**
+ * Checks if new shipment is allow or not
+ */
+ public function canShip()
+ {
+ if ($this->status == 'fraud')
+ return false;
+
+ foreach ($this->items as $sellerOrderItem) {
+ if ($sellerOrderItem->item->qty_to_ship > 0) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if new invoice is allow or not
+ */
+ public function canInvoice()
+ {
+ if ($this->status == 'fraud')
+ return false;
+
+ foreach ($this->items as $sellerOrderItem) {
+ if ($sellerOrderItem->item->qty_to_invoice > 0) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if order could can canceled on not
+ */
+ public function canCancel()
+ {
+ if ($this->status == 'fraud')
+ return false;
+
+ foreach ($this->items as $sellerOrderItem) {
+ if ($sellerOrderItem->item->qty_to_cancel > 0) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/OrderItem.php b/packages/Webkul/Marketplace/src/Models/OrderItem.php
new file mode 100644
index 000000000..0fb07c5eb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/OrderItem.php
@@ -0,0 +1,47 @@
+belongsTo(\Webkul\Sales\Models\OrderItemProxy::modelClass(), 'order_item_id');
+ }
+
+ /**
+ * Get the order that belongs to the item.
+ */
+ public function order()
+ {
+ return $this->belongsTo(OrderProxy::modelClass(), 'marketplace_order_id');
+ }
+
+ /**
+ * Get the product that belongs to the item.
+ */
+ public function product()
+ {
+ return $this->belongsTo(ProductProxy::modelClass(), 'marketplace_product_id');
+ }
+
+ /**
+ * Get the child item record associated with the order item.
+ */
+ public function child()
+ {
+ return $this->hasOne(OrderItemProxy::modelClass(), 'parent_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/OrderItemProxy.php b/packages/Webkul/Marketplace/src/Models/OrderItemProxy.php
new file mode 100644
index 000000000..03d2b902f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/OrderItemProxy.php
@@ -0,0 +1,9 @@
+belongsTo(BaseProduct::class);
+ }
+
+ /**
+ * Get the product that belongs to the seller.
+ */
+ public function seller()
+ {
+ return $this->belongsTo(SellerProxy::modelClass(), 'marketplace_seller_id');
+ }
+
+ /**
+ * Get the product variants that owns the product.
+ */
+ public function variants()
+ {
+ return $this->hasMany(self::class, 'parent_id');
+ }
+
+ /**
+ * Get the product that owns the product.
+ */
+ public function parent()
+ {
+ return $this->belongsTo(self::class, 'parent_id');
+ }
+
+ /**
+ * The images that belong to the product.
+ */
+ public function images()
+ {
+ return $this->hasMany(ProductImageProxy::modelClass(), 'marketplace_product_id');
+ }
+
+ /**
+ * The videos that belong to the product.
+ */
+ public function videos()
+ {
+ return $this->hasMany(CoreVideoProxy::modelClass(), 'product_id');
+ }
+
+ /**
+ * Videos that belong to the product.
+ */
+ public function assignVideos()
+ {
+ return $this->hasMany(ProductVideoProxy::modelClass(), 'marketplace_product_id');
+ }
+
+ /**
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function isSaleable()
+ {
+ if (! $this->product->status && $this->is_approved) {
+ return false;
+ }
+
+ if ($this->haveSufficientQuantity(1)) {
+ return true;
+ }
+
+ if ($this->product->downloadable_links()->count()) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param integer $qty
+ *
+ * @return bool
+ */
+ public function haveSufficientQuantity($qty)
+ {
+ $total = 0;
+
+ $channelInventorySourceIds = core()->getCurrentChannel()
+ ->inventory_sources()
+ ->where('status', 1)
+ ->pluck('id');
+
+ foreach ($this->product->inventories as $inventory) {
+ if (is_numeric($index = $channelInventorySourceIds->search($inventory->inventory_source_id)) && $this->seller->id == $inventory->vendor_id) {
+ $total += $inventory->qty;
+ }
+ }
+
+ if (!$total) {
+ return false;
+ }
+
+ $orderedInventory = $this->product->ordered_inventories()
+ ->where('channel_id', core()->getCurrentChannel()->id)
+ ->first();
+
+ if ($orderedInventory) {
+ $total -= $orderedInventory->qty;
+ }
+
+ return $qty <= $total ? true : false;
+ }
+
+
+ /**
+ * The images that belong to the product.
+ */
+ public function downloadable_samples()
+ {
+ return $this->hasMany(MpProductDownloadableSampleProxy::modelClass());
+ }
+
+ /**
+ * The images that belong to the product.
+ */
+ public function downloadable_links()
+ {
+ return $this->hasMany(MpProductDownloadableLinkProxy::modelClass());
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/ProductFlag.php b/packages/Webkul/Marketplace/src/Models/ProductFlag.php
new file mode 100644
index 000000000..cb166eefe
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/ProductFlag.php
@@ -0,0 +1,13 @@
+belongsTo(ProductProxy::modelClass(), 'marketplace_product_id');
+ }
+
+ /**
+ * Get image url for the product image.
+ */
+ public function url()
+ {
+ return Storage::url($this->path);
+ }
+
+ /**
+ * Get image url for the product image.
+ */
+ public function getUrlAttribute()
+ {
+ return $this->url();
+ }
+
+ /**
+ * @return array
+ */
+ public function toArray()
+ {
+ $array = parent::toArray();
+
+ $array['url'] = $this->url;
+
+ return $array;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/ProductImageProxy.php b/packages/Webkul/Marketplace/src/Models/ProductImageProxy.php
new file mode 100644
index 000000000..b815c000e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/ProductImageProxy.php
@@ -0,0 +1,9 @@
+belongsTo(ProductProxy::modelClass());
+ }
+
+ /**
+ * Get image url for the product image.
+ */
+ public function url()
+ {
+ return Storage::url($this->path);
+ }
+
+ /**
+ * Get image url for the product image.
+ */
+ public function getUrlAttribute()
+ {
+ return $this->url();
+ }
+
+ /**
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function isCustomAttribute($attribute)
+ {
+ return $this->attribute_family->custom_attributes->pluck('code')->contains($attribute);
+ }
+
+ /**
+ * @return array
+ */
+ public function toArray()
+ {
+ $array = parent::toArray();
+
+ $array['url'] = $this->url;
+
+ return $array;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/ProductVideoProxy.php b/packages/Webkul/Marketplace/src/Models/ProductVideoProxy.php
new file mode 100644
index 000000000..100f75e00
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/ProductVideoProxy.php
@@ -0,0 +1,10 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class Refund extends Model implements RefundContract
+{
+ protected $table = 'marketplace_refunds';
+
+ protected $guarded = ['id', 'created_at', 'updated_at'];
+
+ /**
+ * Get the Refund.
+ */
+ public function refund()
+ {
+ return $this->belongsTo(\Webkul\Sales\Models\RefundProxy::modelClass(), 'refund_id');
+ }
+
+ /**
+ * Get the Refund items record.
+ */
+ public function items()
+ {
+ return $this->hasMany(RefundItemProxy::modelClass(), 'marketplace_refund_id');
+ }
+
+ /**
+ * Get the order that belongs to the refund.
+ */
+ public function order()
+ {
+ return $this->belongsTo(OrderProxy::modelClass(), 'marketplace_order_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/RefundItem.php b/packages/Webkul/Marketplace/src/Models/RefundItem.php
new file mode 100644
index 000000000..fc0918c06
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/RefundItem.php
@@ -0,0 +1,29 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class RefundItem extends Model implements RefundItemContract
+{
+ public $timestamps = false;
+
+ protected $table = 'marketplace_refund_items';
+
+ protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
+
+ /**
+ * Get the item that belongs to the item.
+ */
+ public function item()
+ {
+ return $this->belongsTo(\Webkul\Sales\Models\RefundItemProxy::modelClass(), 'refund_item_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/RefundItemProxy.php b/packages/Webkul/Marketplace/src/Models/RefundItemProxy.php
new file mode 100644
index 000000000..e748ea539
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/RefundItemProxy.php
@@ -0,0 +1,9 @@
+belongsTo(SellerProxy::modelClass(), 'marketplace_seller_id');
+ }
+
+ /**
+ * Get the customer that belongs to the review.
+ */
+ public function customer()
+ {
+ return $this->belongsTo(Customer::class);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/ReviewProxy.php b/packages/Webkul/Marketplace/src/Models/ReviewProxy.php
new file mode 100644
index 000000000..0ae4f6d1d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/ReviewProxy.php
@@ -0,0 +1,9 @@
+logo)
+ return;
+
+ return Storage::url($this->logo);
+ }
+
+ /**
+ * Get logo image url.
+ */
+ public function getLogoUrlAttribute()
+ {
+ return $this->logo_url();
+ }
+
+ /**
+ * Get banner image url.
+ */
+ public function banner_url()
+ {
+ if (! $this->banner)
+ return;
+
+ return Storage::url($this->banner);
+ }
+
+ /**
+ * Get banner image url.
+ */
+ public function getBannerUrlAttribute()
+ {
+ return $this->banner_url();
+ }
+
+ /**
+ * Get the order products record associated with the seller.
+ */
+ public function products()
+ {
+ return $this->hasMany(ProductProxy::modelClass(), 'marketplace_seller_id');
+ }
+
+ /**
+ * Get the order reviews record associated with the seller.
+ */
+ public function reviews()
+ {
+ return $this->hasMany(ReviewProxy::modelClass(), 'marketplace_seller_id');
+ }
+
+ /**
+ * Get the customer that belongs to the review.
+ */
+ public function customer()
+ {
+ return $this->belongsTo(Customer::class);
+ }
+
+ /**
+ * Get the order orders record associated with the seller.
+ */
+ public function orders()
+ {
+ return $this->hasMany(OrderProxy::modelClass(), 'marketplace_seller_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/SellerCategory.php b/packages/Webkul/Marketplace/src/Models/SellerCategory.php
new file mode 100644
index 000000000..71f467a8b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/SellerCategory.php
@@ -0,0 +1,14 @@
+belongsTo(OrderProxy::modelClass(), 'marketplace_order_id');
+ }
+
+ /**
+ * Get the shipment that belongs to the shipment.
+ */
+ public function shipment()
+ {
+ return $this->belongsTo(\Webkul\Sales\Models\ShipmentProxy::modelClass());
+ }
+
+ /**
+ * Get the shipment items record associated with the shipment.
+ */
+ public function items()
+ {
+ return $this->hasMany(ShipmentItemProxy::modelClass(), 'marketplace_shipment_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/ShipmentItem.php b/packages/Webkul/Marketplace/src/Models/ShipmentItem.php
new file mode 100644
index 000000000..1f2722638
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/ShipmentItem.php
@@ -0,0 +1,23 @@
+belongsTo(\Webkul\Sales\Models\ShipmentItemProxy::modelClass(), 'shipment_item_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/ShipmentItemProxy.php b/packages/Webkul/Marketplace/src/Models/ShipmentItemProxy.php
new file mode 100644
index 000000000..8adb125b0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/ShipmentItemProxy.php
@@ -0,0 +1,9 @@
+belongsTo(Order::class, 'marketplace_order_id');
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Models/TransactionProxy.php b/packages/Webkul/Marketplace/src/Models/TransactionProxy.php
new file mode 100644
index 000000000..8d48e4fd0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Models/TransactionProxy.php
@@ -0,0 +1,9 @@
+getConfigData('marketplace.settings.general.status')) {
+ Event::listen('bagisto.shop.customers.signup_form_controls.after', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.customers.signup.seller');
+ });
+
+ Event::listen('bagisto.shop.products.view.short_description.after', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.products.product-seller-info');
+ });
+
+ Event::listen(['bagisto.shop.checkout.cart.item.name.after', 'bagisto.shop.checkout.cart-mini.item.name.after', 'bagisto.shop.checkout.name.after'], function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.checkout.cart.item-seller-info');
+ });
+
+ Event::listen('bagisto.shop.products.price.after', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.products.product-sellers');
+ });
+
+ Event::listen('bagisto.admin.layout.head', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::admin.layouts.style');
+ });
+
+ if ( (core()->getConfigData('marketplace.settings.product_flag.enable'))) {
+
+ Event::listen('bagisto.admin.catalog.product.edit_form_accordian.additional_views.after', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::admin.products.flags.index');
+ });
+
+ Event::listen('bagisto.shop.products.view.before', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.flags.product-flag');
+ });
+
+ }
+
+ if (core()->getConfigData('marketplace.settings.google_analytics.enable')) {
+ Event::listen('bagisto.shop.layout.head', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.default.google-analytics.index');
+ });
+ }
+
+ if ( (core()->getCurrentChannel() && core()->getCurrentChannel()->theme == "velocity")) {
+ Event::listen('bagisto.shop.layout.head', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.velocity.layouts.style');
+ });
+
+ Event::listen('bagisto.shop.layout.header.account-item.before', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.velocity.layouts.header.index');
+ });
+ } else {
+ Event::listen('bagisto.shop.layout.header.currency-item.before', function($viewRenderEventManager) {
+ $viewRenderEventManager->addTemplate('marketplace::shop.layouts.header.index');
+ });
+ }
+
+ Event::listen('catalog.product.update.before', 'Webkul\Marketplace\Listeners\Product@BeforeProductCreate');
+
+ Event::listen('customer.registration.after', 'Webkul\Marketplace\Listeners\Customer@registerSeller');
+
+ Event::listen('checkout.cart.add.before', 'Webkul\Marketplace\Listeners\Cart@cartItemAddBefore');
+
+ Event::listen('checkout.cart.add.after', 'Webkul\Marketplace\Listeners\Cart@cartItemAddAfter');
+
+ Event::listen('checkout.order.save.after', 'Webkul\Marketplace\Listeners\Order@afterPlaceOrder');
+
+ Event::listen('sales.shipment.save.after', 'Webkul\Marketplace\Listeners\Shipment@afterShipment');
+
+ Event::listen('sales.invoice.save.after', 'Webkul\Marketplace\Listeners\Invoice@afterInvoice');
+
+ Event::listen('sales.refund.save.after', 'Webkul\Marketplace\Listeners\Refund@afterRefund');
+
+ Event::listen('sales.order.cancel.after', 'Webkul\Marketplace\Listeners\Order@afterOrderCancel');
+
+ Event::listen('catalog.marketplace.attribute.create.after', 'Webkul\Marketplace\Listeners\Product@afterAttributeCreatedUpdated');
+
+ Event::listen('catalog.marketplace.attribute.update.after', 'Webkul\Marketplace\Listeners\Product@afterAttributeCreatedUpdated');
+
+ Event::listen('catalog.marketplace.attribute.delete.before', 'Webkul\Marketplace\Listeners\Product@afterAttributeDeleted');
+
+ Event::listen('catalog.marketplace.product.create.after', 'Webkul\Marketplace\Listeners\Product@afterProductCreatedUpdated');
+
+ Event::listen('catalog.marketplace.product.update.after', 'Webkul\Marketplace\Listeners\Product@afterProductCreatedUpdated');
+
+ Event::listen('marketplace.seller.delete.after','Webkul\Marketplace\Listeners\Customer@afterSellerDelete');
+
+ //Send sales mails
+ Event::listen('marketplace.sales.order.save.after', 'Webkul\Marketplace\Listeners\Order@sendNewOrderMail');
+
+ Event::listen('marketplace.sales.invoice.save.after', 'Webkul\Marketplace\Listeners\Order@sendNewInvoiceMail');
+
+ Event::listen('marketplace.sales.shipment.save.after', 'Webkul\Marketplace\Listeners\Order@sendNewShipmentMail');
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Providers/MarketplaceServiceProvider.php b/packages/Webkul/Marketplace/src/Providers/MarketplaceServiceProvider.php
new file mode 100644
index 000000000..0c4b7fe8e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Providers/MarketplaceServiceProvider.php
@@ -0,0 +1,242 @@
+app->register(ModuleServiceProvider::class);
+
+ $this->app->register(EventServiceProvider::class);
+
+ $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
+
+ $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'marketplace');
+
+ $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'marketplace');
+
+ $this->publishes([
+ __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/marketplace/assets'),
+ ], 'public');
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/customers/account/partials' => resource_path('themes/default/views/customers/account/partials'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/add-buttons.blade.php' => resource_path('themes/default/views/products/add-buttons.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/add-to-cart.blade.php' => resource_path('themes/default/views/products/add-to-cart.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/buy-now.blade.php' => resource_path('themes/default/views/products/buy-now.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/view/stock.blade.php' => resource_path('themes/default/views/products/view/stock.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/view/up-sells.blade.php' => resource_path('themes/default/views/products/view/up-sells.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/view/cross-sells.blade.php' => resource_path('themes/default/views/products/view/cross-sells.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/view/related-products.blade.php' => resource_path('themes/default/views/products/view/related-products.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/products/list/up-sell-card.blade.php' => resource_path('themes/default/views/products/list/up-sell-card.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/sellers/products/price.blade.php' => resource_path('themes/default/views/products/price.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/admin/customers/edit.blade.php' => resource_path('views/vendor/admin/customers/edit.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/checkout/cart/index.blade.php' => resource_path('themes/default/views/checkout/cart/index.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/checkout/cart/mini-cart.blade.php' => resource_path('themes/default/views/checkout/cart/mini-cart.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/customers/account/orders/view.blade.php' => resource_path('themes/default/views/customers/account/orders/view.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/home/featured-products.blade.php' => resource_path('themes/default/views/home/featured-products.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/default/home/new-products.blade.php' => resource_path('themes/default/views/home/new-products.blade.php'),
+ ]);
+
+
+ //velocity overrided file
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/add-to-cart.blade.php' => resource_path('themes/velocity/views/products/add-to-cart.blade.php')
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/buy-now.blade.php' => resource_path('themes/velocity/views/products/buy-now.blade.php')
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/view/stock.blade.php' => resource_path('themes/velocity/views/products/view/stock.blade.php')
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/customers/account/partials' => resource_path('themes/velocity/views/customers/account/partials'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/customers/account/index.blade.php' => resource_path('themes/velocity/views/customers/account/index.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/UI' => resource_path('themes/velocity/views/UI'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/sellers/products/add-buttons.blade.php' => resource_path('themes/velocity/views/products/add-buttons.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/sellers/products/price.blade.php' => resource_path('themes/velocity/views/products/price.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/checkout/total/summary.blade.php' => resource_path('themes/velocity/views/checkout/total/summary.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/checkout/cart/mini-cart.blade.php' => resource_path('themes/velocity/views/checkout/cart/mini-cart.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/customers/account/orders/view.blade.php' => resource_path('themes/velocity/views/customers/account/orders/view.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/checkout/cart/index.blade.php' => resource_path('themes/velocity/views/checkout/cart/index.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/checkout/cart/mini-cart.blade.php' => resource_path('themes/velocity/views/checkout/cart/mini-cart.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/home/featured-products.blade.php' => resource_path('themes/velocity/views/home/featured-products.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/home/new-products.blade.php' => resource_path('themes/velocity/views/home/new-products.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/view/up-sells.blade.php' => resource_path('themes/velocity/views/products/view/up-sells.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/view/cross-sells.blade.php' => resource_path('themes/velocity/views/products/view/cross-sells.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/view/related-products.blade.php' => resource_path('themes/velocity/views/products/view/related-products.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/products/list/up-sell-card.blade.php' => resource_path('themes/velocity/views/products/list/up-sell-card.blade.php'),
+ ]);
+
+ //mobile view icon
+ $this->publishes([
+ __DIR__ . '/../Resources/views/shop/velocity/UI/header.blade.php' => resource_path('themes/velocity/views/UI/header.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Repositories/Admin/invoiceRepository.php' => __DIR__ .'/../../../Sales/src/Repositories/InvoiceRepository.php',
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Http/Controllers/Shop/ShopController.php' => __DIR__ .'/../../../Velocity/src/Http/Controllers/Shop/ShopController.php',
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Http/Controllers/Shop/Velocity/Controller.php' => __DIR__ .'/../../../Velocity/src/Http/Controllers/Shop/Controller.php',
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/admin/layouts/nav-left.blade.php' => resource_path('views/vendor/admin/layouts/nav-left.blade.php'),
+ ]);
+
+ $this->publishes([
+ __DIR__ . '/../Resources/views/admin/dashboard/index.blade.php' => resource_path('views/vendor/admin/dashboard/index.blade.php'),
+ ]);
+ }
+
+ /**
+ * Register services.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->registerConfig();
+ }
+
+ /**
+ * Register package config.
+ *
+ * @return void
+ */
+ protected function registerConfig()
+ {
+ $this->mergeConfigFrom(
+ dirname(__DIR__) . '/Config/system.php', 'core'
+ );
+
+ $this->mergeConfigFrom(
+ dirname(__DIR__) . '/Config/menu.php', 'menu.customer'
+ );
+
+ $this->mergeConfigFrom(
+ dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin'
+ );
+
+ $this->mergeConfigFrom(
+ dirname(__DIR__) . '/Config/acl.php', 'acl'
+ );
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Providers/ModuleServiceProvider.php b/packages/Webkul/Marketplace/src/Providers/ModuleServiceProvider.php
new file mode 100644
index 000000000..e963970d8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Providers/ModuleServiceProvider.php
@@ -0,0 +1,32 @@
+orderRepository = $orderRepository;
+
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->invoiceItemRepository = $invoiceItemRepository;
+
+ $this->invoiceItemRepository = $invoiceItemRepository;
+
+ $this->downloadableLinkPurchasedRepository = $downloadableLinkPurchasedRepository;
+
+ $this->sellerOrderRepository = $sellerOrderRepository;
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->mpProductRepository = $mpProductRepository;
+
+ parent::__construct($app);
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return string
+ */
+
+ function model()
+ {
+ return Invoice::class;
+ }
+
+ /**
+ * @param array $data
+ * @return \Webkul\Sales\Contracts\Invoice
+ */
+ public function create(array $data)
+ {
+
+ DB::beginTransaction();
+
+
+
+ try {
+ Event::dispatch('sales.invoice.save.before', $data);
+
+ $order = $this->orderRepository->find($data['order_id']);
+
+ $totalQty = array_sum($data['invoice']['items']);
+
+ $invoice = $this->model->create([
+ 'order_id' => $order->id,
+ 'total_qty' => $totalQty,
+ 'state' => 'paid',
+ 'base_currency_code' => $order->base_currency_code,
+ 'channel_currency_code' => $order->channel_currency_code,
+ 'order_currency_code' => $order->order_currency_code,
+ 'order_address_id' => $order->billing_address->id,
+ ]);
+
+ foreach ($data['invoice']['items'] as $itemId => $qty) {
+ if (! $qty) {
+ continue;
+ }
+
+ $orderItem = $this->orderItemRepository->find($itemId);
+
+ if ($qty > $orderItem->qty_to_invoice) {
+ $qty = $orderItem->qty_to_invoice;
+ }
+
+ $invoiceItem = $this->invoiceItemRepository->create([
+ 'invoice_id' => $invoice->id,
+ 'order_item_id' => $orderItem->id,
+ 'name' => $orderItem->name,
+ 'sku' => $orderItem->sku,
+ 'qty' => $qty,
+ 'price' => $orderItem->price,
+ 'base_price' => $orderItem->base_price,
+ 'total' => $orderItem->price * $qty,
+ 'base_total' => $orderItem->base_price * $qty,
+ 'tax_amount' => ( ($orderItem->tax_amount / $orderItem->qty_ordered) * $qty ),
+ 'base_tax_amount' => ( ($orderItem->base_tax_amount / $orderItem->qty_ordered) * $qty ),
+ 'discount_amount' => ( ($orderItem->discount_amount / $orderItem->qty_ordered) * $qty ),
+ 'base_discount_amount' => ( ($orderItem->base_discount_amount / $orderItem->qty_ordered) * $qty ),
+ 'product_id' => $orderItem->product_id,
+ 'product_type' => $orderItem->product_type,
+ 'additional' => $orderItem->additional,
+ ]);
+
+ if ($orderItem->getTypeInstance()->isComposite()) {
+ foreach ($orderItem->children as $childOrderItem) {
+ $finalQty = $childOrderItem->qty_ordered
+ ? ($childOrderItem->qty_ordered / $orderItem->qty_ordered) * $qty
+ : $orderItem->qty_ordered;
+
+ $this->invoiceItemRepository->create([
+ 'invoice_id' => $invoice->id,
+ 'order_item_id' => $childOrderItem->id,
+ 'parent_id' => $invoiceItem->id,
+ 'name' => $childOrderItem->name,
+ 'sku' => $childOrderItem->sku,
+ 'qty' => $finalQty,
+ 'price' => $childOrderItem->price,
+ 'base_price' => $childOrderItem->base_price,
+ 'total' => $childOrderItem->price * $finalQty,
+ 'base_total' => $childOrderItem->base_price * $finalQty,
+ 'tax_amount' => 0,
+ 'base_tax_amount' => 0,
+ 'discount_amount' => 0,
+ 'base_discount_amount' => 0,
+ 'product_id' => $childOrderItem->product_id,
+ 'product_type' => $childOrderItem->product_type,
+ 'additional' => $childOrderItem->additional,
+ ]);
+
+ if ($childOrderItem->product
+ && ! $childOrderItem->getTypeInstance()->isStockable()
+ && $childOrderItem->getTypeInstance()->showQuantityBox()
+ ) {
+ $this->invoiceItemRepository->updateProductInventory([
+ 'invoice' => $invoice,
+ 'product' => $childOrderItem->product,
+ 'qty' => $finalQty,
+ 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0,
+ ]);
+ }
+
+ $this->orderItemRepository->collectTotals($childOrderItem);
+ }
+ } elseif ($orderItem->product
+ && ! $orderItem->getTypeInstance()->isStockable()
+ && $orderItem->getTypeInstance()->showQuantityBox()
+ ) {
+ $this->invoiceItemRepository->updateProductInventory([
+ 'invoice' => $invoice,
+ 'product' => $orderItem->product,
+ 'qty' => $qty,
+ 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0,
+ ]);
+ }
+
+ $this->orderItemRepository->collectTotals($orderItem);
+
+ $this->downloadableLinkPurchasedRepository->updateStatus($orderItem, 'available');
+ }
+
+ $this->collectTotals($invoice);
+
+ $this->orderRepository->collectTotals($order);
+
+ $this->orderRepository->updateOrderStatus($order);
+
+ Event::dispatch('sales.invoice.save.after', $invoice);
+ } catch (\Exception $e) {
+ DB::rollBack();
+
+ throw $e;
+ }
+
+ DB::commit();
+
+ return $invoice;
+ }
+
+ /**
+ * @param \Webkul\Sales\Contracts\Invoice $invoice
+ * @return \Webkul\Sales\Contracts\Invoice
+ */
+ public function collectTotals($invoice)
+ {
+
+ $invoice->sub_total = $invoice->base_sub_total = 0;
+ $invoice->tax_amount = $invoice->base_tax_amount = 0;
+ $invoice->discount_amount = $invoice->base_discount_amount = 0;
+
+ foreach ($invoice->items as $invoiceItem) {
+ $invoice->sub_total += $invoiceItem->total;
+ $invoice->base_sub_total += $invoiceItem->base_total;
+
+ $invoice->tax_amount += $invoiceItem->tax_amount;
+ $invoice->base_tax_amount += $invoiceItem->base_tax_amount;
+
+ $invoice->discount_amount += $invoiceItem->discount_amount;
+ $invoice->base_discount_amount += $invoiceItem->base_discount_amount;
+ }
+
+ $invoice->shipping_amount = $invoice->order->shipping_amount;
+ $invoice->base_shipping_amount = $invoice->order->base_shipping_amount;
+
+ $mpProduct = $this->mpProductRepository->findOneWhere(['product_id' => $invoiceItem->product_id, 'price' => $invoiceItem->price]);
+
+ $seller = null;
+
+ if ($mpProduct) {
+ $seller = $mpProduct->seller;
+ }
+
+ if($seller) {
+
+ $shipping = $this->sellerOrderRepository->where('order_id',$invoice->order->id)
+ ->where('marketplace_seller_id',$seller->id)
+ ->first();
+
+ if($shipping->shipping_amount) {
+
+ $invoice->shipping_amount = $shipping->shipping_amount;
+ $invoice->base_shipping_amount = $shipping->shipping_amount;
+
+ }
+
+ }
+
+ $invoice->discount_amount += $invoice->order->shipping_discount_amount;
+ $invoice->base_discount_amount += $invoice->order->base_shipping_discount_amount;
+
+ if ($invoice->order->shipping_amount) {
+
+ foreach ($invoice->order->invoices as $prevInvoice) {
+
+ if ((float) $prevInvoice->shipping_amount) {
+
+ if($seller) {
+
+ $shipping = $this->sellerOrderRepository->where('order_id',$invoice->order->id)
+ ->where('marketplace_seller_id',$seller->id)
+ ->first();
+
+ if($shipping->shipping_amount) {
+
+ $invoice->shipping_amount = $shipping->shipping_amount;
+
+ }
+
+ } else {
+ $invoice->shipping_amount = $invoice->base_shipping_amount = 0;
+ }
+
+ }
+
+ if ($prevInvoice->id != $invoice->id) {
+ $invoice->discount_amount -= $invoice->order->shipping_discount_amount;
+ $invoice->base_discount_amount -= $invoice->order->base_shipping_discount_amount;
+ }
+ }
+ }
+
+ $invoice->grand_total = $invoice->sub_total + $invoice->tax_amount + $invoice->shipping_amount - $invoice->discount_amount;
+ $invoice->base_grand_total = $invoice->base_sub_total + $invoice->base_tax_amount + $invoice->base_shipping_amount - $invoice->base_discount_amount;
+
+ $invoice->save();
+
+ return $invoice;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/InvoiceItemRepository.php b/packages/Webkul/Marketplace/src/Repositories/InvoiceItemRepository.php
new file mode 100644
index 000000000..1b34d0a64
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/InvoiceItemRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class InvoiceItemRepository extends Repository
+{
+ protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\InvoiceItem';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/InvoiceRepository.php b/packages/Webkul/Marketplace/src/Repositories/InvoiceRepository.php
new file mode 100644
index 000000000..a37bb00f4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/InvoiceRepository.php
@@ -0,0 +1,223 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class InvoiceRepository extends Repository
+{
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Object
+ */
+ protected $productRepository;
+
+ /**
+ * OrderRepository object
+ *
+ * @var Object
+ */
+ protected $orderRepository;
+
+ /**
+ * OrderItemRepository object
+ *
+ * @var Object
+ */
+ protected $orderItemRepository;
+
+ /**
+ * InvoiceItemRepository object
+ *
+ * @var Object
+ */
+ protected $invoiceItemRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\ProductRepository $productRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\OrderItemRepository $orderItemRepository
+ * @param Webkul\Marketplace\Repositories\InvoiceItemRepository $invoiceItemRepository
+ * @param Illuminate\Container\Container $app
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ ProductRepository $productRepository,
+ OrderRepository $orderRepository,
+ OrderItemRepository $orderItemRepository,
+ InvoiceItemRepository $invoiceItemRepository,
+ App $app
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->invoiceItemRepository = $invoiceItemRepository;
+
+ parent::__construct($app);
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Invoice';
+ }
+
+ /**
+ * @param array $data
+ * @return mixed
+ */
+ public function create(array $data)
+ {
+ $invoice = $data['invoice'];
+
+ Event::dispatch('marketplace.sales.invoice.save.before', $data);
+
+ $sellerInvoices = [];
+ foreach ($invoice->items()->get() as $item) {
+ if (isset($item->additional['seller_info']) && !$item->additional['seller_info']['is_owner']) {
+ $seller = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ $sellers[] = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ } else {
+ $seller = $this->productRepository->getSellerByProductId($item->product_id);
+ $sellers[] = $this->productRepository->getSellerByProductId($item->product_id);
+ }
+
+ if (! $seller)
+ continue;
+
+ $sellerOrder = $this->orderRepository->findOneWhere([
+ 'order_id' => $invoice->order->id,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+
+ if (! $sellerOrder)
+ continue;
+
+ $sellerOrderItem = $this->orderItemRepository->findOneWhere([
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'order_item_id' => $item->order_item->id,
+ ]);
+
+ if (! $sellerOrderItem)
+ continue;
+
+ $sellerInvoice = $this->findOneWhere([
+ 'invoice_id' => $invoice->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ ]);
+
+ if (! $sellerInvoice) {
+ $sellerInvoices[] = $sellerInvoice = parent::create([
+ 'total_qty' => $item->qty,
+ 'state' => 'paid',
+ 'invoice_id' => $invoice->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ ]);
+ } else {
+ $sellerInvoice->total_qty += $item->qty;
+
+ $sellerInvoice->save();
+ }
+
+ $sellerInvoiceItem = $this->invoiceItemRepository->create([
+ 'marketplace_invoice_id' => $sellerInvoice->id,
+ 'invoice_item_id' => $item->id,
+ ]);
+
+ $this->orderItemRepository->collectTotals($sellerOrderItem);
+ }
+
+ foreach ($sellerInvoices as $sellerInvoice) {
+ $this->collectTotals($sellerInvoice);
+ }
+
+ foreach ($sellers as $seller) {
+ if ($seller) {
+ foreach ($this->orderRepository->findWhere(['order_id' => $invoice->order->id, 'marketplace_seller_id' => $seller->id]) as $order) {
+ // $order->sellerCount = count($sellers);
+
+ $this->orderRepository->collectTotals($order);
+
+ $this->orderRepository->updateOrderStatus($order);
+ }
+ }
+ }
+
+ foreach ($sellerInvoices as $sellerInvoice) {
+ Event::dispatch('marketplace.sales.invoice.save.after', $sellerInvoice);
+ }
+ }
+
+ /**
+ * @param mixed $sellerInvoice
+ * @return mixed
+ */
+ public function collectTotals($sellerInvoice)
+ {
+ $sellerInvoice->sub_total = $sellerInvoice->base_sub_total = 0;
+ $sellerInvoice->tax_amount = $sellerInvoice->base_tax_amount = 0;
+ $sellerInvoice->shipping_amount = $sellerInvoice->base_shipping_amount = 0;
+ $sellerInvoice->grand_total = $sellerInvoice->base_grand_total = 0;
+ $sellerInvoice->discount_amount = $sellerInvoice->base_discount_amount = 0;
+
+ foreach ($sellerInvoice->items as $sellerInvoiceItem) {
+ $sellerInvoice->sub_total += $sellerInvoiceItem->item->total;
+ $sellerInvoice->base_sub_total += $sellerInvoiceItem->item->base_total;
+
+ $sellerInvoice->tax_amount += $sellerInvoiceItem->item->tax_amount;
+ $sellerInvoice->base_tax_amount += $sellerInvoiceItem->item->base_tax_amount;
+
+ $sellerInvoice->discount_amount += $sellerInvoiceItem->item->discount_amount;
+ $sellerInvoice->base_discount_amount += $sellerInvoiceItem->item->base_discount_amount;
+ }
+
+ $sellerInvoice->shipping_amount = $sellerInvoice->order->shipping_amount;
+ $sellerInvoice->base_shipping_amount = $sellerInvoice->order->base_shipping_amount;
+
+ if ($sellerInvoice->order->shipping_amount) {
+ foreach ($sellerInvoice->order->invoices as $prevInvoice) {
+ if ((float) $prevInvoice->shipping_amount) {
+ $sellerInvoice->shipping_amount = 0;
+ $sellerInvoice->base_shipping_amount = 0;
+ }
+ }
+ }
+
+ $sellerInvoice->grand_total = $sellerInvoice->sub_total + $sellerInvoice->tax_amount + $sellerInvoice->shipping_amount - $sellerInvoice->discount_amount;
+ $sellerInvoice->base_grand_total = $sellerInvoice->base_sub_total + $sellerInvoice->base_tax_amount + $sellerInvoice->base_shipping_amount - $sellerInvoice->base_discount_amount;
+
+ $sellerInvoice->save();
+
+ return $sellerInvoice;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/MpProductRepository.php b/packages/Webkul/Marketplace/src/Repositories/MpProductRepository.php
new file mode 100644
index 000000000..577e7f353
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/MpProductRepository.php
@@ -0,0 +1,720 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class MpProductRepository extends Repository
+{
+ /**
+ * AttributeRepository object
+ *
+ * @var object
+ */
+ protected $attribute;
+
+ /**
+ * AttributeOptionRepository object
+ *
+ * @var object
+ */
+ protected $attributeOption;
+
+ /**
+ * ProductAttributeValueRepository object
+ *
+ * @var object
+ */
+ protected $attributeValue;
+
+ /**
+ * ProductFlatRepository object
+ *
+ * @var object
+ */
+ protected $productInventory;
+
+ /**
+ * ProductImageRepository object
+ *
+ * @var object
+ */
+ protected $productImage;
+
+ /**
+ * ProductVideoRepository instance
+ *
+ * @var \Webkul\Product\Repositories\productVideoRepository
+ */
+ protected $productVideoRepository;
+
+ /**
+ * Create a new controller instance.
+ * @param \Webkul\Product\Repositories\ProductVideoRepository $productVideoRepository
+ *
+ * @return void
+ */
+ public function __construct(
+ AttributeRepository $attribute,
+ AttributeOptionRepository $attributeOption,
+ ProductAttributeValueRepository $attributeValue,
+ ProductInventoryRepository $productInventory,
+ ProductImageRepository $productImage,
+ ProductVideoRepository $productVideoRepository,
+ App $app
+ )
+ {
+ $this->attribute = $attribute;
+
+ $this->attributeOption = $attributeOption;
+
+ $this->attributeValue = $attributeValue;
+
+ $this->productInventory = $productInventory;
+
+ $this->productImage = $productImage;
+
+ $this->productVideoRepository = $productVideoRepository;
+
+ parent::__construct($app);
+ }
+
+ /**->where('product_flat.visible_individually', 1)
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Product\Contracts\Product';
+ }
+
+ /**
+ * @param array $data
+ * @return mixed
+ */
+ public function create(array $data)
+ {
+ //before store of the product
+ Event::dispatch('catalog.marketplace.product.create.before');
+
+ $product = $this->model->create($data);
+
+ $nameAttribute = $this->attribute->findOneByField('code', 'status');
+ $this->attributeValue->create([
+ 'product_id' => $product->id,
+ 'attribute_id' => $nameAttribute->id,
+ 'value' => 1
+ ]);
+
+ if (isset($data['super_attributes'])) {
+ $super_attributes = [];
+
+ foreach ($data['super_attributes'] as $attributeCode => $attributeOptions) {
+ $attribute = $this->attribute->findOneByField('code', $attributeCode);
+
+ $super_attributes[$attribute->id] = $attributeOptions;
+
+ $product->super_attributes()->attach($attribute->id);
+ }
+
+ foreach (array_permutation($super_attributes) as $permutation) {
+ $this->createVariant($product, $permutation);
+ }
+ }
+
+ //after store of the product
+ Event::dispatch('catalog.marketplace.product.create.after', $product);
+
+ return $product;
+ }
+
+ /**
+ * @param array $data
+ * @param $id
+ * @param string $attribute
+ * @return mixed
+ */
+ public function update(array $data, $id, $attribute = "id")
+ {
+ $data['locale'] = app()->getLocale();
+
+ Event::dispatch('catalog.marketplace.product.update.before', $id);
+
+ $product = $this->find($id);
+
+
+ if ($product->type == 'downloadable' || $product->type == 'virtual' ) {
+
+ $product = $product->getTypeInstance()->update($data, $id, $attribute);
+
+ } else {
+
+ if ($product->parent_id && $this->checkVariantOptionAvailabiliy($data, $product)) {
+ $data['parent_id'] = NULL;
+ }
+
+ if (empty($data['new'])) {
+ $data['new'] = 0;
+ }
+ if (empty($data['featured'])) {
+ $data['featured'] = 0;
+ }
+ if (empty($data['visible_individually'])) {
+ $data['visible_individually'] = 0;
+ }
+ if (empty($data['guest_checkout'])) {
+ $data['guest_checkout'] = 0;
+ }
+ if(empty($data['status'])) {
+ $data['status'] = 0;
+ }
+
+ $product->update($data);
+
+ $attributes = $product->attribute_family->custom_attributes;
+
+ foreach ($attributes as $attribute) {
+ if (! isset($data[$attribute->code]) || (in_array($attribute->type, ['date', 'datetime']) && ! $data[$attribute->code]))
+ continue;
+
+ if ($attribute->type == 'multiselect' || $attribute->type == 'checkbox') {
+ $data[$attribute->code] = implode(",", $data[$attribute->code]);
+ }
+
+ if ($attribute->type == 'image' || $attribute->type == 'file') {
+ $dir = 'product';
+ if (gettype($data[$attribute->code]) == 'object') {
+ $data[$attribute->code] = request()->file($attribute->code)->store($dir);
+ } else {
+ $data[$attribute->code] = NULL;
+ }
+ }
+
+ $attributeValue = $this->attributeValue->findOneWhere([
+ 'product_id' => $product->id,
+ 'attribute_id' => $attribute->id,
+ 'channel' => $attribute->value_per_channel ? $data['channel'] : null,
+ 'locale' => $attribute->value_per_locale ? $data['locale'] : null
+ ]);
+
+ if (! $attributeValue) {
+ $this->attributeValue->create([
+ 'product_id' => $product->id,
+ 'attribute_id' => $attribute->id,
+ 'value' => $data[$attribute->code],
+ 'channel' => $attribute->value_per_channel ? $data['channel'] : null,
+ 'locale' => $attribute->value_per_locale ? $data['locale'] : null
+ ]);
+ } else {
+ $this->attributeValue->update([
+ ProductAttributeValue::$attributeTypeFields[$attribute->type] => $data[$attribute->code]
+ ], $attributeValue->id
+ );
+
+ if ($attribute->type == 'image' || $attribute->type == 'file') {
+ Storage::delete($attributeValue->text_value);
+ }
+ }
+ }
+
+ }
+
+ $route = request()->route() ? request()->route()->getName() : "";
+
+ if ($route != 'admin.catalog.products.massupdate') {
+ if (isset($data['categories'])) {
+ $product->categories()->sync($data['categories']);
+ }
+
+ if (isset($data['up_sell'])) {
+ $product->up_sells()->sync($data['up_sell']);
+ } else {
+ $data['up_sell'] = [];
+ $product->up_sells()->sync($data['up_sell']);
+ }
+
+ if (isset($data['cross_sell'])) {
+ $product->cross_sells()->sync($data['cross_sell']);
+ } else {
+ $data['cross_sell'] = [];
+ $product->cross_sells()->sync($data['cross_sell']);
+ }
+
+ if (isset($data['related_products'])) {
+ $product->related_products()->sync($data['related_products']);
+ } else {
+ $data['related_products'] = [];
+ $product->related_products()->sync($data['related_products']);
+ }
+
+ $previousVariantIds = $product->variants->pluck('id');
+
+ if (isset($data['variants'])) {
+ foreach ($data['variants'] as $variantId => $variantData) {
+ if (str_contains($variantId, 'variant_')) {
+ $permutation = [];
+ foreach ($product->super_attributes as $superAttribute) {
+ $permutation[$superAttribute->id] = $variantData[$superAttribute->code];
+ }
+
+ $this->createVariant($product, $permutation, $variantData);
+ } else {
+ if (is_numeric($index = $previousVariantIds->search($variantId))) {
+ $previousVariantIds->forget($index);
+ }
+
+ $variantData['channel'] = $data['channel'];
+ $variantData['locale'] = $data['locale'];
+
+ $this->updateVariant($variantData, $variantId);
+ }
+ }
+ }
+
+ foreach ($previousVariantIds as $variantId) {
+ $this->delete($variantId);
+ }
+
+ $this->productInventory->saveInventories($data, $product);
+
+ $this->productImage->uploadImages($data, $product);
+
+ $this->productVideoRepository->uploadVideos($data, $product);
+
+ app(ProductCustomerGroupPriceRepository::class)->saveCustomerGroupPrices($data,
+ $product);
+ }
+
+ if (isset($data['channels'])) {
+ $product['channels'] = $data['channels'];
+ }
+
+ Event::dispatch('catalog.marketplace.product.update.after', $product);
+
+ return $product;
+ }
+
+ /**
+ * @param $id
+ * @return mixed
+ */
+ public function delete($id)
+ {
+ Event::dispatch('catalog.marketplace.product.delete.before', $id);
+
+ parent::delete($id);
+
+ Event::dispatch('catalog.marketplace.product.delete.after', $id);
+ }
+
+ /**
+ * @param mixed $product
+ * @param array $permutation
+ * @param array $data
+ * @return mixed
+ */
+ public function createVariant($product, $permutation, $data = [])
+ {
+ if (! count($data)) {
+ $data = [
+ "sku" => $product->sku . '-variant-' . implode('-', $permutation),
+ "name" => "",
+ "inventories" => [],
+ "price" => 0,
+ "weight" => 0,
+ "status" => 1
+ ];
+ }
+
+ $variant = $this->model->create([
+ 'parent_id' => $product->id,
+ 'type' => 'simple',
+ 'attribute_family_id' => $product->attribute_family_id,
+ 'sku' => $data['sku'],
+ ]);
+
+ foreach (['sku', 'name', 'price', 'weight', 'status'] as $attributeCode) {
+ $attribute = $this->attribute->findOneByField('code', $attributeCode);
+
+ if ($attribute->value_per_channel) {
+ if ($attribute->value_per_locale) {
+ foreach (core()->getAllChannels() as $channel) {
+ foreach (core()->getAllLocales() as $locale) {
+ $this->attributeValue->create([
+ 'product_id' => $variant->id,
+ 'attribute_id' => $attribute->id,
+ 'channel' => $channel->code,
+ 'locale' => $locale->code,
+ 'value' => $data[$attributeCode]
+ ]);
+ }
+ }
+ } else {
+ foreach (core()->getAllChannels() as $channel) {
+ $this->attributeValue->create([
+ 'product_id' => $variant->id,
+ 'attribute_id' => $attribute->id,
+ 'channel' => $channel->code,
+ 'value' => $data[$attributeCode]
+ ]);
+ }
+ }
+ } else {
+ if ($attribute->value_per_locale) {
+ foreach (core()->getAllLocales() as $locale) {
+ $this->attributeValue->create([
+ 'product_id' => $variant->id,
+ 'attribute_id' => $attribute->id,
+ 'locale' => $locale->code,
+ 'value' => $data[$attributeCode]
+ ]);
+ }
+ } else {
+ $this->attributeValue->create([
+ 'product_id' => $variant->id,
+ 'attribute_id' => $attribute->id,
+ 'value' => $data[$attributeCode]
+ ]);
+ }
+ }
+ }
+ foreach ($permutation as $attributeId => $optionId) {
+ $this->attributeValue->create([
+ 'product_id' => $variant->id,
+ 'attribute_id' => $attributeId,
+ 'value' => $optionId
+ ]);
+ }
+
+ $this->productInventory->saveInventories($data, $variant);
+
+ return $variant;
+ }
+
+ /**
+ * @param array $data
+ * @param $id
+ * @return mixed
+ */
+ public function updateVariant(array $data, $id)
+ {
+ $variant = $this->find($id);
+
+ $variant->update(['sku' => $data['sku']]);
+
+ foreach (['sku', 'name', 'price', 'weight', 'status'] as $attributeCode) {
+ $attribute = $this->attribute->findOneByField('code', $attributeCode);
+
+ $attributeValue = $this->attributeValue->findOneWhere([
+ 'product_id' => $id,
+ 'attribute_id' => $attribute->id,
+ 'channel' => $attribute->value_per_channel ? $data['channel'] : null,
+ 'locale' => $attribute->value_per_locale ? $data['locale'] : null
+ ]);
+
+ if (! $attributeValue) {
+ $this->attributeValue->create([
+ 'product_id' => $id,
+ 'attribute_id' => $attribute->id,
+ 'value' => $data[$attribute->code],
+ 'channel' => $attribute->value_per_channel ? $data['channel'] : null,
+ 'locale' => $attribute->value_per_locale ? $data['locale'] : null
+ ]);
+ } else {
+ $this->attributeValue->update([
+ ProductAttributeValue::$attributeTypeFields[$attribute->type] => $data[$attribute->code]
+ ], $attributeValue->id);
+ }
+ }
+
+ $this->productInventory->saveInventories($data, $variant);
+
+ return $variant;
+ }
+
+ /**
+ * @param array $data
+ * @param mixed $product
+ * @return mixed
+ */
+ public function checkVariantOptionAvailabiliy($data, $product)
+ {
+ $parent = $product->parent;
+
+ $superAttributeCodes = $parent->super_attributes->pluck('code');
+
+ $isAlreadyExist = false;
+
+ foreach ($parent->variants as $variant) {
+ if ($variant->id == $product->id)
+ continue;
+
+ $matchCount = 0;
+
+ foreach ($superAttributeCodes as $attributeCode) {
+ if (! isset($data[$attributeCode]))
+ return false;
+
+ if ($data[$attributeCode] == $variant->{$attributeCode})
+ $matchCount++;
+ }
+
+ if ($matchCount == $superAttributeCodes->count()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @param integer $categoryId
+ * @return Collection
+ */
+ public function getAll($categoryId = null)
+ {
+ $params = request()->input();
+
+ $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($params, $categoryId) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ $qb = $query->distinct()
+ ->addSelect('product_flat.*')
+ ->addSelect(DB::raw('IF( product_flat.special_price_from IS NOT NULL
+ AND product_flat.special_price_to IS NOT NULL , IF( NOW( ) >= product_flat.special_price_from
+ AND NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , IF( product_flat.special_price_from IS NULL , IF( product_flat.special_price_to IS NULL , IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , IF( NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) ) , IF( product_flat.special_price_to IS NULL , IF( NOW( ) >= product_flat.special_price_from, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , product_flat.price ) ) ) AS final_price'))
+
+ ->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
+ ->leftJoin('product_categories', 'products.id', '=', 'product_categories.product_id')
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->whereNotNull('product_flat.url_key');
+
+ if ($categoryId) {
+ $qb->where('product_categories.category_id', $categoryId);
+ }
+
+ if (is_null(request()->input('status'))) {
+ $qb->where('product_flat.status', 1);
+ }
+
+ if (is_null(request()->input('visible_individually'))) {
+ $qb->where('product_flat.visible_individually', 1);
+ }
+
+ $queryBuilder = $qb->leftJoin('product_flat as flat_variants', function($qb) use($channel, $locale) {
+ $qb->on('product_flat.id', '=', 'flat_variants.parent_id')
+ ->where('flat_variants.channel', $channel)
+ ->where('flat_variants.locale', $locale);
+ });
+
+ if (isset($params['search'])) {
+ $qb->where('product_flat.name', 'like', '%' . urldecode($params['search']) . '%');
+ }
+
+ if (isset($params['sort'])) {
+ $attribute = $this->attribute->findOneByField('code', $params['sort']);
+
+ if ($params['sort'] == 'price') {
+ if ($attribute->code == 'price') {
+ $qb->orderBy('final_price', $params['order']);
+ } else {
+ $qb->orderBy($attribute->code, $params['order']);
+ }
+ } else {
+ $qb->orderBy($params['sort'] == 'created_at' ? 'product_flat.created_at' : $attribute->code, $params['order']);
+ }
+ }
+
+ $qb = $qb->leftJoin('products as variants', 'products.id', '=', 'variants.parent_id');
+
+ $qb = $qb->where(function($query1) use($qb) {
+ $aliases = [
+ 'products' => 'filter_',
+ 'variants' => 'variant_filter_'
+ ];
+
+ foreach($aliases as $table => $alias) {
+ $query1 = $query1->orWhere(function($query2) use($qb, $table, $alias) {
+
+ foreach ($this->attribute->getProductDefaultAttributes(array_keys(request()->input())) as $code => $attribute) {
+ $aliasTemp = $alias . $attribute->code;
+
+ $qb = $qb->leftJoin('product_attribute_values as ' . $aliasTemp, $table . '.id', '=', $aliasTemp . '.product_id');
+
+ $column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
+
+ $temp = explode(',', request()->get($attribute->code));
+
+ if ($attribute->type != 'price') {
+ $query2 = $query2->where($aliasTemp . '.attribute_id', $attribute->id);
+
+ $query2 = $query2->where(function($query3) use($aliasTemp, $column, $temp) {
+ foreach($temp as $code => $filterValue) {
+ $columns = $aliasTemp . '.' . $column;
+ $query3 = $query3->orwhereRaw("find_in_set($filterValue, $columns)");
+ }
+ });
+ } else {
+ $query2 = $query2->where($aliasTemp . '.' . $column, '>=', core()->convertToBasePrice(current($temp)))
+ ->where($aliasTemp . '.' . $column, '<=', core()->convertToBasePrice(end($temp)))
+ ->where($aliasTemp . '.attribute_id', $attribute->id);
+ }
+ }
+ });
+ }
+ });
+
+ return $qb->groupBy('product_flat.id');
+ })->paginate(isset($params['limit']) ? $params['limit'] : 9);
+
+ return $results;
+ }
+
+ /**
+ * Retrive product from slug
+ *
+ * @param string $slug
+ * @return mixed
+ */
+ public function findBySlugOrFail($slug, $columns = null)
+ {
+ $product = app('Webkul\Product\Repositories\ProductFlatRepository')->findOneWhere([
+ 'url_key' => $slug,
+ 'locale' => app()->getLocale(),
+ 'channel' => core()->getCurrentChannelCode(),
+ ]);
+
+ if (! $product) {
+ throw (new ModelNotFoundException)->setModel(
+ get_class($this->model), $slug
+ );
+ }
+
+ return $product;
+ }
+
+ /**
+ * Returns newly added product
+ *
+ * @return Collection
+ */
+ public function getNewProducts()
+ {
+ $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ return $query->distinct()
+ ->addSelect('product_flat.*')
+ ->where('product_flat.status', 1)
+ ->where('product_flat.visible_individually', 1)
+ ->where('product_flat.new', 1)
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->orderBy('product_id', 'desc');
+ })->paginate(4);
+
+ return $results;
+ }
+
+ /**
+ * Returns featured product
+ *
+ * @return Collection
+ */
+ public function getFeaturedProducts()
+ {
+ $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ return $query->distinct()
+ ->addSelect('product_flat.*')
+ ->where('product_flat.status', 1)
+ ->where('product_flat.visible_individually', 1)
+ ->where('product_flat.featured', 1)
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->orderBy('product_id', 'desc');
+ })->paginate(4);
+
+ return $results;
+ }
+
+ /**
+ * Search Product by Attribute
+ *
+ * @return Collection
+ */
+ public function searchProductByAttribute($term)
+ {
+ $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($term) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ return $query->distinct()
+ ->addSelect('product_flat.*')
+ ->where('product_flat.status', 1)
+ ->where('product_flat.visible_individually', 1)
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->whereNotNull('product_flat.url_key')
+ ->where('product_flat.name', 'like', '%' . urldecode($term) . '%')
+ ->orderBy('product_id', 'desc');
+ })->paginate(16);
+
+ return $results;
+ }
+
+ /**
+ * Returns product's super attribute with options
+ *
+ * @param Product $product
+ * @return Collection
+ */
+ public function getSuperAttributes($product)
+ {
+ $superAttrbutes = [];
+
+ foreach ($product->super_attributes as $key => $attribute) {
+ $superAttrbutes[$key] = $attribute->toArray();
+
+ foreach ($attribute->options as $option) {
+ $superAttrbutes[$key]['options'][] = [
+ 'id' => $option->id,
+ 'admin_name' => $option->admin_name,
+ 'sort_order' => $option->sort_order,
+ 'swatch_value' => $option->swatch_value,
+ ];
+ }
+ }
+
+ return $superAttrbutes;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/OrderItemRepository.php b/packages/Webkul/Marketplace/src/Repositories/OrderItemRepository.php
new file mode 100644
index 000000000..58a1ac1bf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/OrderItemRepository.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class OrderItemRepository extends Repository
+{
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\OrderItem';
+ }
+
+ /**
+ * @param mixed $sellerOrderItem
+ * @return mixed
+ */
+ public function collectTotals($sellerOrderItem)
+ {
+ $commissionPercentage = $sellerOrderItem->order->commission_percentage;
+
+ $sellerOrderItem->commission_invoiced = $sellerOrderItem->base_commission_invoiced = 0;
+ $sellerOrderItem->seller_total_invoiced = $sellerOrderItem->base_seller_total_invoiced = 0;
+
+ foreach ($sellerOrderItem->item->invoice_items as $invoiceItem) {
+ $sellerOrderItem->commission_invoiced += $commission = ($invoiceItem->total * $commissionPercentage) / 100;
+ $sellerOrderItem->base_commission_invoiced += $baseCommission = ($invoiceItem->base_total * $commissionPercentage) / 100;
+
+ $sellerOrderItem->seller_total_invoiced += $invoiceItem->total + $invoiceItem->tax_amount - $commission;
+ $sellerOrderItem->base_seller_total_invoiced += $invoiceItem->base_total + $invoiceItem->base_tax_amount - $baseCommission;
+ }
+
+ $sellerOrderItem->save();
+
+ return $sellerOrderItem;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/OrderRepository.php b/packages/Webkul/Marketplace/src/Repositories/OrderRepository.php
new file mode 100644
index 000000000..b91a2c1b5
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/OrderRepository.php
@@ -0,0 +1,504 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class OrderRepository extends Repository
+{
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * OrderItemRepository object
+ *
+ * @var Object
+ */
+ protected $orderItemRepository;
+
+ /**
+ * TransactionRepository object
+ *
+ * @var Object
+ */
+ protected $transactionRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Object
+ */
+ protected $productRepository;
+
+ /**
+ * Order object
+ *
+ * @var Object
+ */
+ protected $order;
+
+ /**
+ * OrderItem object
+ *
+ * @var Object
+ */
+ protected $orderItem;
+
+ /**
+ * CoreProductRepository Object
+ */
+ protected $coreProductRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Product\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Product\Repositories\OrderItemRepository $orderItemRepository
+ * @param Webkul\Product\Repositories\TransactionRepository $transactionRepository
+ * @param Webkul\Product\Repositories\ProductRepository $productRepository
+ * @param Webkul\Sales\Repositories\OrderItemRepository $orderItem
+ * @param Webkul\Sales\Repositories\OrderRepository $Order;
+ * @param Illuminate\Container\Container $app
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ OrderItemRepository $orderItemRepository,
+ TransactionRepository $transactionRepository,
+ ProductRepository $productRepository,
+ OrderItem $orderItem,
+ Order $order,
+ App $app,
+ CoreProductRepository $coreProductRepository
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->transactionRepository = $transactionRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->orderItem = $orderItem;
+
+ $this->order = $order;
+
+ $this->coreProductRepository = $coreProductRepository;
+
+ parent::__construct($app);
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Order';
+ }
+
+ /**
+ * @param array $data
+ * @return mixed
+ */
+ public function create(array $data)
+ {
+ $order = $data['order'];
+
+ Event::dispatch('marketplace.sales.order.save.before', $data);
+
+ $sellerOrders = [];
+
+ $commissionPercentage = core()->getConfigData('marketplace.settings.general.commission_per_unit');
+
+ foreach ($order->items()->get() as $item) {
+ if (isset($item->additional['seller_info']) && !$item->additional['seller_info']['is_owner']) {
+ $seller = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ } else {
+ $seller = $this->productRepository->getSellerByProductId($item->product_id);
+ }
+
+ if (!isset($seller ))
+ continue;
+
+ if (! $seller->is_approved)
+ continue;
+
+ if ($item->product->type == 'configurable') {
+ $sellerProduct=$this->productRepository->findOneWhere([
+ 'product_id'=>$item->additional['selected_configurable_option'],
+ 'marketplace_seller_id'=>$seller->id,
+ ]);
+ }else{
+ $sellerProduct=$this->productRepository->findOneWhere([
+ 'product_id'=>$item->product->id,
+ 'marketplace_seller_id'=>$seller->id,
+ ]);
+ }
+
+ if (! $sellerProduct->is_approved)
+ continue;
+
+ $product = $this->coreProductRepository->findOneByField('id', $item->product_id);
+
+ if (!$sellerProduct->haveSufficientQuantity($item->additional['quantity']) && $product->haveSufficientQuantity($item->additional['quantity'])) {
+ continue;
+ }
+
+ if ($seller->commission_enable) {
+ $commissionPercentage = $seller->commission_percentage;
+ }
+
+ $sellerOrder = $this->findOneWhere([
+ 'order_id' => $order->id,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+
+ if (! $sellerOrder) {
+ $sellerOrders[] = $sellerOrder = parent::create([
+ 'status' => 'pending',
+ 'seller_payout_status' => 'pending',
+ 'order_id' => $order->id,
+ 'marketplace_seller_id' => $seller->id,
+ 'commission_percentage' => $commissionPercentage,
+ 'is_withdrawal_requested' => 0,
+ 'shipping_amount' => $order->shipping_amount,
+ 'base_shipping_amount' => $order->base_shipping_amount
+ ]);
+ }
+
+ $commission = $baseCommission = 0;
+ $sellerTotal = $baseSellerTotal = 0;
+
+ if (isset($commissionPercentage)) {
+ $commission = ($item->total * $commissionPercentage) / 100;
+ $baseCommission = ($item->base_total * $commissionPercentage) / 100;
+
+ $sellerTotal = $item->total - $commission;
+ $baseSellerTotal = $item->base_total - $baseCommission;
+ }
+
+ $sellerOrderItem = $this->orderItemRepository->create([
+ 'marketplace_product_id' => $sellerProduct->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'order_item_id' => $item->id,
+ 'commission' => $commission,
+ 'base_commission' => $baseCommission,
+ 'seller_total' => $sellerTotal + $item->tax_amount - $item->discount_amount,
+ 'base_seller_total' => $baseSellerTotal + $item->base_tax_amount - $item->base_discount_amount
+ ]);
+
+ if ($childItem = $item->child) {
+ $childSellerProduct = $this->productRepository->findOneWhere([
+ 'product_id' => $childItem->product->id,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+
+ $childSellerOrderItem = $this->orderItemRepository->create([
+ 'marketplace_product_id' => $childSellerProduct->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'order_item_id' => $childItem->id,
+ 'parent_id' => $sellerOrderItem->id
+ ]);
+ }
+ }
+
+ foreach ($sellerOrders as $order) {
+ $this->collectTotals($order);
+
+ Event::dispatch('marketplace.sales.order.save.after', $order);
+ }
+
+ session()->forget('marketplace_shipping_rates');
+ }
+
+ /**
+ * @param array $data
+ * @return mixed
+ */
+ public function cancel(array $data)
+ {
+ $order = $data['order'];
+
+ $sellerOrders = $this->findWhere(['order_id' => $order->id]);
+
+ foreach ($sellerOrders as $sellerOrder) {
+ Event::dispatch('marketplace.sales.order.cancel.before', $sellerOrder);
+
+ $this->updateOrderStatus($sellerOrder);
+
+ Event::dispatch('marketplace.sales.order.cancel.after', $sellerOrder);
+ }
+ }
+
+ /**
+ * @param int $orderId
+ * @return mixed
+ */
+ public function sellerCancelOrder($orderId)
+ {
+ $seller = $this->sellerRepository->findOneWhere([
+ 'customer_id' => auth()->guard('customer')->user()->id
+ ]);
+
+ $sellerOrders = $this->findWhere([
+ 'order_id' => $orderId,
+ 'marketplace_seller_id' => $seller->id
+ ]);
+
+ foreach ($sellerOrders as $sellerOrder) {
+ if (! $sellerOrder->canCancel())
+ return false;
+
+ Event::dispatch('marketplace.sales.order.cancel.before', $sellerOrder);
+
+ foreach ($sellerOrder->items as $item) {
+ if ($item->item->qty_to_cancel) {
+ if ($item->product) {
+ $this->orderItem->returnQtyToProductInventory($item->item);
+ }
+
+ $item->item->qty_canceled += $item->item->qty_to_cancel;
+
+ $item->item->save();
+ }
+ }
+
+ $this->updateOrderStatus($sellerOrder);
+
+ $result = $this->order->isInCanceledState($sellerOrder->order);
+
+ if ($result)
+ $sellerOrder->order->update(["status" => "canceled"]);
+
+ Event::dispatch('marketplace.sales.order.cancel.after', $sellerOrder);
+
+ return true;
+ }
+ }
+
+ /**
+ * @param mixed $order
+ * @return void
+ */
+ public function isInCompletedState($order)
+ {
+ $totalQtyOrdered = 0;
+ $totalQtyInvoiced = 0;
+ $totalQtyShipped = 0;
+ $totalQtyRefunded = 0;
+ $totalQtyCanceled = 0;
+
+ foreach ($order->items as $sellerOrderItem) {
+ $totalQtyOrdered += $sellerOrderItem->item->qty_ordered;
+ $totalQtyInvoiced += $sellerOrderItem->item->qty_invoiced;
+ $totalQtyShipped += $sellerOrderItem->item->qty_shipped;
+ $totalQtyRefunded += $sellerOrderItem->item->qty_refunded;
+ $totalQtyCanceled += $sellerOrderItem->item->qty_canceled;
+ }
+
+ if ($totalQtyOrdered != ($totalQtyRefunded + $totalQtyCanceled) &&
+ $totalQtyOrdered == $totalQtyInvoiced + $totalQtyRefunded + $totalQtyCanceled &&
+ $totalQtyOrdered == $totalQtyShipped + $totalQtyRefunded + $totalQtyCanceled)
+ return true;
+
+ return false;
+ }
+
+ /**
+ * @param mixed $order
+ * @return void
+ */
+ public function isInCanceledState($order)
+ {
+ $totalQtyOrdered = 0;
+ $totalQtyCanceled = 0;
+
+ foreach ($order->items as $sellerOrderItem) {
+ $totalQtyOrdered += $sellerOrderItem->item->qty_ordered;
+ $totalQtyCanceled += $sellerOrderItem->item->qty_canceled;
+ }
+
+ if ($totalQtyOrdered == $totalQtyCanceled)
+ return true;
+
+ return false;
+ }
+
+ /**
+ * @param mixed $order
+ * @return void
+ */
+ public function isInClosedState($order)
+ {
+ $totalQtyOrdered = 0;
+ $totalQtyRefunded = 0;
+ $totalQtyCanceled = 0;
+
+ foreach ($order->items as $sellerOrderItem) {
+ $totalQtyOrdered += $sellerOrderItem->item->qty_ordered;
+ $totalQtyRefunded += $sellerOrderItem->item->qty_refunded;
+ $totalQtyCanceled += $sellerOrderItem->item->qty_canceled;
+ }
+
+ if ($totalQtyOrdered == $totalQtyRefunded + $totalQtyCanceled)
+ return true;
+
+ return false;
+ }
+
+ /**
+ * @param mixed $order
+ * @return void
+ */
+ public function updateOrderStatus($order)
+ {
+ $status = 'processing';
+
+ if ($this->isInCompletedState($order))
+ $status = 'completed';
+
+ if ($this->isInCanceledState($order))
+ $status = 'canceled';
+ elseif ($this->isInClosedState($order))
+ $status = 'closed';
+
+ $order->status = $status;
+ $order->save();
+ }
+
+ /**
+ * Updates marketplace order totals
+ *
+ * @param Order $order
+ * @return void
+ */
+ public function collectTotals($order)
+ {
+ $order->grand_total = $order->base_grand_total = 0;
+ $order->sub_total = $order->base_sub_total = 0;
+ $order->tax_amount = $order->base_tax_amount = 0;
+ $order->discount_amount_invoiced = $order->base_discount_amount_invoiced = 0;
+ $order->commission = $order->base_commission = 0;
+ $order->seller_total = $order->base_seller_total = 0;
+ $order->total_item_count = $order->total_qty_ordered = 0;
+ $order->discount_amount = $order->base_discount_amount = 0;
+
+ $shippingCodes = explode('_', $order->order->shipping_method);
+ $carrier = current($shippingCodes);
+ $shippingMethod = end($shippingCodes);
+
+ $marketplaceShippingRates = session()->get('marketplace_shipping_rates');
+
+ if (isset($marketplaceShippingRates[$carrier])
+ && isset($marketplaceShippingRates[$carrier][$shippingMethod])
+ && isset($marketplaceShippingRates[$carrier][$shippingMethod][$order->marketplace_seller_id])) {
+ $sellerShippingRate = $marketplaceShippingRates[$carrier][$shippingMethod][$order->marketplace_seller_id];
+
+ $order->shipping_amount = $sellerShippingRate['amount'];
+ $order->base_shipping_amount = $sellerShippingRate['base_amount'];
+ }
+
+ foreach ($order->items()->get() as $sellerOrderItem) {
+ $item = $sellerOrderItem->item;
+ $order->discount_amount += $item->discount_amount;
+ $order->base_discount_amount += $item->base_discount_amount;
+ $order->grand_total += $item->total + $item->tax_amount - $item->discount_amount;
+
+ $order->base_grand_total += $item->base_total + $item->base_tax_amount - $item->base_discount_amount;
+
+ $order->sub_total += $item->total;
+ $order->base_sub_total += $item->base_total;
+
+ $order->tax_amount += $item->tax_amount;
+ $order->base_tax_amount += $item->base_tax_amount;
+
+ $order->commission += $sellerOrderItem->commission;
+ $order->base_commission += $sellerOrderItem->base_commission;
+
+ $order->seller_total += $sellerOrderItem->seller_total;
+ $order->base_seller_total += $sellerOrderItem->base_seller_total;
+
+ $order->total_qty_ordered += $item->qty_ordered;
+
+ $order->total_item_count += 1;
+ }
+
+ if ($order->shipping_amount > 0) {
+ $order->grand_total += $order->shipping_amount;
+ $order->base_grand_total += $order->base_shipping_amount;
+
+ // $order->seller_total += $order->shipping_amount;
+ // $order->base_seller_total += $order->base_shipping_amount;
+ }
+
+ $order->sub_total_invoiced = $order->base_sub_total_invoiced = 0;
+ $order->shipping_invoiced = $order->base_shipping_invoiced = 0;
+ $order->commission_invoiced = $order->base_commission_invoiced = 0;
+ $order->seller_total_invoiced = $order->base_seller_total_invoiced = 0;
+ $order->base_grand_total_invoiced = $order->grand_total_invoiced = 0;
+ $order->base_tax_amount_invoiced = $order->tax_amount_invoiced = 0;
+
+ foreach ($order->invoices as $invoice) {
+ $order->sub_total_invoiced += $invoice->sub_total;
+ $order->base_sub_total_invoiced += $invoice->base_sub_total;
+
+ $order->shipping_invoiced += $invoice->shipping_amount;
+ $order->base_shipping_invoiced += $invoice->base_shipping_amount;
+
+ $order->tax_amount_invoiced += $invoice->tax_amount;
+ $order->base_tax_amount_invoiced += $invoice->base_tax_amount;
+
+ $order->discount_amount_invoiced += $invoice->discount_amount;
+ $order->base_discount_amount_invoiced += $invoice->base_discount_amount;
+
+ $order->commission_invoiced += $commissionInvoiced = ($invoice->sub_total * $order->commission_percentage) / 100;
+ $order->base_commission_invoiced += $baseCommissionInvoiced = ($invoice->base_sub_total * $order->commission_percentage) / 100;
+
+ $order->seller_total_invoiced += $invoice->sub_total - $commissionInvoiced - $invoice->discount_amount + $invoice->shipping_amount + $invoice->tax_amount;
+ $order->base_seller_total_invoiced += $invoice->base_sub_total - $baseCommissionInvoiced - $invoice->base_discount_amount + $invoice->base_tax_amount;
+ }
+
+ $order->grand_total_invoiced = $order->sub_total_invoiced + $order->shipping_invoiced + $order->tax_amount_invoiced - $order->discount_amount_invoiced;
+ $order->base_grand_total_invoiced = $order->base_sub_total_invoiced + $order->base_shipping_invoiced + $order->base_tax_amount_invoiced - $order->base_discount_amount_invoiced;
+
+ foreach ($order->refunds as $refund) {
+ $order->sub_total_refunded += $refund->sub_total;
+ $order->base_sub_total_refunded += $refund->base_sub_total;
+
+ $order->shipping_refunded += $refund->shipping_amount;
+ $order->base_shipping_refunded += $refund->base_shipping_amount;
+
+ $order->tax_amount_refunded += $refund->tax_amount;
+ $order->base_tax_amount_refunded += $refund->base_tax_amount;
+
+ $order->discount_refunded += $refund->discount_amount;
+ $order->base_discount_refunded += $refund->base_discount_amount;
+ }
+
+ $order->grand_total_refunded = $order->sub_total_refunded + $order->shipping_refunded + $order->tax_amount_refunded - $order->discount_refunded;
+
+ $order->base_grand_total_refunded = $order->base_sub_total_refunded + $order->base_shipping_refunded + $order->base_tax_amount_refunded - $order->base_discount_refunded;
+
+ $order->save();
+
+ return $order;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/PaymentRequestRepository.php b/packages/Webkul/Marketplace/src/Repositories/PaymentRequestRepository.php
new file mode 100644
index 000000000..4a9ff8a63
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/PaymentRequestRepository.php
@@ -0,0 +1,81 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class PaymentRequestRepository extends Repository
+{
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\PaymentRequest';
+ }
+
+ /**
+ * Pay seller
+ *
+ * @param integer $data
+ * @return boolean
+ */
+ public function paySeller($data)
+ {
+ $orderRepository = app('Webkul\Marketplace\Repositories\OrderRepository');
+
+ $sellerOrder = $orderRepository->findOneWhere([
+ 'order_id' => $data['order_id'],
+ 'marketplace_seller_id' => $data['seller_id']
+ ]);
+
+ if (! $sellerOrder) {
+ session()->flash('error', trans('marketplace::app.admin.orders.order-not-exist'));
+
+ return;
+ }
+
+ $totalPaid = $this->scopeQuery(function($query) use($sellerOrder) {
+ return $query->where('marketplace_transactions.marketplace_seller_id', $sellerOrder->marketplace_seller_id)
+ ->where('marketplace_transactions.marketplace_order_id', $sellerOrder->id);
+ })->sum('base_total');
+
+ $amount = $sellerOrder->base_seller_total_invoiced - $totalPaid ;
+
+ if (! $amount) {
+ session()->flash('error', trans('marketplace::app.admin.orders.no-amount-to-paid'));
+
+ return;
+ }
+
+ Event::dispatch('marketplace.sales.transaction.create.before', $data);
+
+ $transaction = $this->create([
+ 'type' => isset($data['type']) ? $data['type'] : 'manual',
+ 'method' => isset($data['method']) ? $data['method'] : 'manual',
+ 'transaction_id' => $data['order_id'] . '-' . Str::random(10),
+ 'comment' => $data['comment'],
+ 'base_total' => $amount,
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'marketplace_seller_id' => $sellerOrder->marketplace_seller_id
+ ]);
+
+ if (($amount + $totalPaid) == $sellerOrder->base_seller_total) {
+ $orderRepository->update(['seller_payout_status' => 'paid'], $sellerOrder->id);
+ }
+
+ Event::dispatch('marketplace.sales.transaction.create.after', $transaction);
+
+ return $transaction;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductDownloadableLinkRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductDownloadableLinkRepository.php
new file mode 100644
index 000000000..97382e9cf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductDownloadableLinkRepository.php
@@ -0,0 +1,74 @@
+ $file) {
+ if (request()->hasFile($type)) {
+ return [
+ $type => $path = request()->file($type)->store('product_downloadable_links/' . $productId, 'private'),
+ $type . '_name' => $file->getClientOriginalName(),
+ $type . '_url' => Storage::url($path),
+ ];
+ }
+ }
+
+ return [];
+ }
+
+ /**
+ * Save links.
+ *
+ * @param array $data
+ * @param \Webkul\Product\Models\Product $product
+ * @return void
+ */
+ public function saveLinks(array $data, $product)
+ {
+ $previousLinkIds = $product->downloadable_links()->pluck('id');
+
+ if (isset($data['downloadable_links'])) {
+ foreach ($data['downloadable_links'] as $linkId => $data) {
+ if (Str::contains($linkId, 'link_')) {
+ $this->create(array_merge([
+ 'product_id' => $product->id,
+ ], $data));
+ } else {
+ if (is_numeric($index = $previousLinkIds->search($linkId))) {
+ $previousLinkIds->forget($index);
+ }
+
+ $this->update($data, $linkId);
+ }
+ }
+ }
+
+ foreach ($previousLinkIds as $linkId) {
+ $this->delete($linkId);
+ }
+ }
+}
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductDownloadableSampleRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductDownloadableSampleRepository.php
new file mode 100644
index 000000000..25a259dc1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductDownloadableSampleRepository.php
@@ -0,0 +1,68 @@
+hasFile('file')) {
+ return [
+ 'file' => $path = request()->file('file')->store('product_downloadable_links/' . $productId),
+ 'file_name' => request()->file('file')->getClientOriginalName(),
+ 'file_url' => Storage::url($path),
+ ];
+ }
+
+ return [];
+ }
+
+ /**
+ * @param array $data
+ * @param Webkul\Product\Contracts\Product $product
+ * @return void
+ */
+ public function saveSamples(array $data, $product)
+ {
+ $previousSampleIds = $product->downloadable_samples()->pluck('id');
+
+ if (isset($data['downloadable_samples'])) {
+ foreach ($data['downloadable_samples'] as $sampleId => $data) {
+ if (Str::contains($sampleId, 'sample_')) {
+ $this->create(array_merge([
+ 'product_id' => $product->id,
+ ], $data));
+ } else {
+ if (is_numeric($index = $previousSampleIds->search($sampleId))) {
+ $previousSampleIds->forget($index);
+ }
+
+ $this->update($data, $sampleId);
+ }
+ }
+ }
+
+ foreach ($previousSampleIds as $sampleId) {
+ $this->delete($sampleId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductFlagReasonRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductFlagReasonRepository.php
new file mode 100644
index 000000000..de4702a5e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductFlagReasonRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductFlagReasonRepository extends Repository
+{
+ protected $guarded = ['id', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\ProductFlagReason';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductFlagRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductFlagRepository.php
new file mode 100644
index 000000000..81aa688d5
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductFlagRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductFlagRepository extends Repository
+{
+ protected $guarded = ['id', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\ProductFlag';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductImageRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductImageRepository.php
new file mode 100644
index 000000000..3d0d03c9e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductImageRepository.php
@@ -0,0 +1,73 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductImageRepository extends Repository
+{
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\ProductImage';
+ }
+
+ /**
+ * @param array $data
+ * @param mixed $product
+ * @return mixed
+ */
+ public function uploadImages($data, $product)
+ {
+ $previousImageIds = $product->images()->pluck('id');
+
+ if (isset($data['images'])) {
+ foreach ($data['images'] as $imageId => $image) {
+ $file = 'images.' . $imageId;
+ $dir = 'assign-product/' . $product->id;
+
+ if (str_contains($imageId, 'image_')) {
+ if (request()->hasFile($file)) {
+ $this->create([
+ 'path' => request()->file($file)->store($dir),
+ 'marketplace_product_id' => $product->id
+ ]);
+ }
+ } else {
+ if (is_numeric($index = $previousImageIds->search($imageId))) {
+ $previousImageIds->forget($index);
+ }
+
+ if (request()->hasFile($file)) {
+ if ($imageModel = $this->find($imageId)) {
+ Storage::delete($imageModel->path);
+ }
+
+ $this->update([
+ 'path' => request()->file($file)->store($dir)
+ ], $imageId);
+ }
+ }
+ }
+ }
+
+ foreach ($previousImageIds as $imageId) {
+ if ($imageModel = $this->find($imageId)) {
+ Storage::delete($imageModel->path);
+
+ $this->delete($imageId);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php
new file mode 100644
index 000000000..c7069bf93
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php
@@ -0,0 +1,625 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ProductRepository extends Repository
+{
+ /**
+ * AttributeRepository object
+ *
+ * @var object
+ */
+ protected $attribute;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Object
+ */
+ protected $productRepository;
+
+ /**
+ * ProductInventoryRepository object
+ *
+ * @var object
+ */
+ protected $productInventoryRepository;
+
+ /**
+ * ProductImageRepository object
+ *
+ * @var Object
+ */
+ protected $productImageRepository;
+
+ /**
+ * ProductVideoRepository instance
+ *
+ * @var \Webkul\Product\Repositories\productVideoRepository
+ */
+ protected $productVideoRepository;
+
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductVideoRepository instance
+ *
+ * @var object
+ */
+ protected $mpVideoRepository;
+
+ /**
+ * ProductDownloadableLinkRepository instance
+ *
+ * @var \Webkul\Marketplace\Repositories\ProductDownloadableLinkRepository
+ */
+ protected $productDownloadableLinkRepository;
+
+ /**
+ * ProductDownloadableSampleRepository instance
+ *
+ * @var \Webkul\Marketplace\Repositories\ProductDownloadableSampleRepository
+ */
+ protected $productDownloadableSampleRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Attribute\Repositories\AttributeRepository $attribute
+ * @param Webkul\Product\Repositories\ProductRepository $productRepository
+ * @param Webkul\Product\Repositories\ProductInventoryRepository $productInventoryRepository
+ * @param Webkul\Marketplace\Repositories\ProductImageRepository $productImageRepository
+ * @param \Webkul\Product\Repositories\ProductVideoRepository $productVideoRepository
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Illuminate\Container\Container $app
+ * @return void
+ */
+ public function __construct(
+ App $app,
+ AttributeRepository $attribute,
+ SellerRepository $sellerRepository,
+ MpVideoRepository $mpVideoRepository,
+ BaseProductRepository $productRepository,
+ ProductVideoRepository $productVideoRepository,
+ ProductImageRepository $productImageRepository,
+ ProductInventoryRepository $productInventoryRepository,
+ ProductDownloadableLinkRepository $productDownloadableLinkRepository,
+ ProductDownloadableSampleRepository $productDownloadableSampleRepository
+ )
+ {
+ parent::__construct($app);
+
+ $this->attribute = $attribute;
+
+ $this->sellerRepository = $sellerRepository;
+
+ $this->mpVideoRepository = $mpVideoRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->productImageRepository = $productImageRepository;
+
+ $this->productVideoRepository = $productVideoRepository;
+
+ $this->productInventoryRepository = $productInventoryRepository;
+
+ $this->productDownloadableLinkRepository = $productDownloadableLinkRepository;
+
+ $this->productDownloadableSampleRepository = $productDownloadableSampleRepository;
+
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Product';
+ }
+
+ /**
+ * @return mixed
+ */
+ public function create(array $data)
+ {
+ Event::dispatch('marketplace.catalog.product.create.before');
+
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+
+ $sellerProduct = parent::create(array_merge($data, [
+ 'marketplace_seller_id' => $seller->id,
+ 'is_approved' => core()->getConfigData('marketplace.settings.general.product_approval_required') ? 0 : 1
+ ]));
+
+ foreach ($sellerProduct->product->variants as $baseVariant) {
+ parent::create([
+ 'parent_id' => $sellerProduct->id,
+ 'product_id' => $baseVariant->id,
+ 'is_owner' => 1,
+ 'marketplace_seller_id' => $seller->id,
+ 'is_approved' => core()->getConfigData('marketplace.settings.general.product_approval_required') ? 0 : 1
+ ]);
+ }
+
+ Event::dispatch('marketplace.catalog.product.create.after', $sellerProduct);
+
+ return $sellerProduct;
+ }
+
+ /**
+ * @param integer $id
+ * @return mixed
+ */
+ public function update(array $data, $id, $attribute = "id")
+ {
+ Event::dispatch('marketplace.catalog.product.update.before', $id);
+
+ $sellerProduct = $this->find($id);
+
+ foreach ($sellerProduct->product->variants as $baseVariant) {
+
+ if (! $sellerChildProduct = $this->getMarketplaceProductByProduct($baseVariant->id)) {
+ parent::create([
+ 'parent_id' => $sellerProduct->id,
+ 'product_id' => $baseVariant->id,
+ 'is_owner' => 1,
+ 'marketplace_seller_id' => $sellerProduct->seller->id,
+ 'is_approved' => $sellerProduct->is_approved
+ ]);
+ }
+ }
+
+ Event::dispatch('marketplace.catalog.product.update.after', $sellerProduct);
+
+ return $sellerProduct;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function createAssign(array $data)
+ {
+ Event::dispatch('marketplace.catalog.assign-product.create.before');
+
+ if (isset($data['seller_id']) && auth()->guard('admin')->user()) {
+ $seller = $this->sellerRepository->findOneByField('id', $data['seller_id']);
+ unset($data['seller_id']);
+ } else if (auth()->guard('customer')->user()) {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+ }
+
+ $sellerProduct = parent::create(array_merge($data, [
+ 'marketplace_seller_id' => $seller->id,
+ 'is_approved' => core()->getConfigData('marketplace.settings.general.product_approval_required') ? 0 : 1
+ ]));
+
+ if (isset($data['selected_variants'])) {
+ foreach ($data['selected_variants'] as $baseVariantId) {
+ $sellerChildProduct = parent::create(array_merge($data['variants'][$baseVariantId], [
+ 'parent_id' => $sellerProduct->id,
+ 'condition' => $sellerProduct->condition,
+ 'product_id' => $baseVariantId,
+ 'is_owner' => 0,
+ 'marketplace_seller_id' => $seller->id,
+ 'is_approved' => core()->getConfigData('marketplace.settings.general.product_approval_required') ? 0 : 1
+ ]));
+
+ $this->productInventoryRepository->saveInventories(array_merge($data['variants'][$baseVariantId], [
+ 'vendor_id' => $sellerChildProduct->marketplace_seller_id
+ ]), $sellerChildProduct->product);
+ }
+ }
+
+ $this->productInventoryRepository->saveInventories(array_merge($data, [
+ 'vendor_id' => $sellerProduct->marketplace_seller_id
+ ]), $sellerProduct->product);
+
+ $this->productImageRepository->uploadImages($data, $sellerProduct);
+
+ $this->mpVideoRepository->uploadVideos($data, $sellerProduct);
+
+ Event::dispatch('marketplace.catalog.assign-product.create.after', $sellerProduct);
+
+ return $sellerProduct;
+ }
+
+ /**
+ * @param integer $id
+ * @return mixed
+ */
+ public function updateAssign(array $data, $id, $attribute = "id")
+ {
+ Event::dispatch('marketplace.catalog.assign-product.update.before', $id);
+
+ $sellerProduct = $this->find($id);
+
+ parent::update($data, $id);
+
+ $previousBaseVariantIds = $sellerProduct->variants->pluck('product_id');
+
+
+ if (isset($data['downloadable_links'])) {
+ $this->productDownloadableLinkRepository->saveLinks($data, $sellerProduct);
+
+ $this->productDownloadableSampleRepository->saveSamples($data, $sellerProduct);
+ }
+
+ if (isset($data['selected_variants'])) {
+ foreach ($data['selected_variants'] as $baseVariantId) {
+ $variantData = $data['variants'][$baseVariantId];
+
+ if (is_numeric($index = $previousBaseVariantIds->search($baseVariantId))) {
+ $previousBaseVariantIds->forget($index);
+ }
+
+ $sellerChildProduct = $this->findOneWhere([
+ 'product_id' => $baseVariantId,
+ 'marketplace_seller_id' => $sellerProduct->marketplace_seller_id,
+ 'is_owner' => 0
+ ]);
+
+ if ($sellerChildProduct) {
+ parent::update(array_merge($variantData, [
+ 'price' => $variantData['price'],
+ 'condition' => $sellerProduct->condition
+ ]), $sellerChildProduct->id);
+
+ $this->productInventoryRepository->saveInventories(array_merge($variantData, [
+ 'vendor_id' => $sellerChildProduct->marketplace_seller_id
+ ]), $sellerChildProduct->product);
+ } else {
+ $sellerChildProduct = parent::create(array_merge($variantData, [
+ 'parent_id' => $sellerProduct->id,
+ 'product_id' => $baseVariantId,
+ 'condition' => $sellerProduct->condition,
+ 'is_approved' => $sellerProduct->id_approved,
+ 'is_owner' => 0,
+ 'marketplace_seller_id' => $sellerProduct->seller->id,
+ ]));
+
+ $this->productInventoryRepository->saveInventories(array_merge($variantData, [
+ 'vendor_id' => $sellerChildProduct->marketplace_seller_id
+ ]), $sellerChildProduct->product);
+ }
+ }
+ }
+
+ if ($previousBaseVariantIds->count()) {
+ $sellerProduct->variants()
+ ->whereIn('product_id', $previousVariantIds)
+ ->delete();
+ }
+
+ $this->productImageRepository->uploadImages($data, $sellerProduct);
+
+ $this->mpVideoRepository->uploadVideos($data, $sellerProduct);
+
+ $this->productInventoryRepository->saveInventories(array_merge($data, [
+ 'vendor_id' => $sellerProduct->marketplace_seller_id
+ ]), $sellerProduct->product);
+
+ Event::dispatch('marketplace.catalog.assign-product.update.after', $sellerProduct);
+
+ return $sellerProduct;
+ }
+
+ /**
+ * @param integer $sellerId
+ * @return Collection
+ */
+ public function getPopularProducts($sellerId, $pageTotal = 4)
+ {
+ return app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($sellerId) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ $qb = $query->distinct()
+ ->addSelect('product_flat.*')
+ ->leftJoin('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id')
+ ->where('product_flat.visible_individually', 1)
+ ->where('product_flat.status', 1)
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->whereNotNull('product_flat.url_key')
+ ->where('marketplace_products.marketplace_seller_id', $sellerId)
+ ->where('marketplace_products.is_approved', 1)
+ ->whereIn('product_flat.product_id', $this->getTopSellingProducts($sellerId))
+ ->orderBy('id', 'desc');
+
+ return $qb;
+ })->paginate($pageTotal);
+ }
+
+ /**
+ * Returns top selling products
+ *
+ * @param integer $sellerId
+ * @return mixed
+ */
+ public function getTopSellingProducts($sellerId)
+ {
+ $seller = $this->sellerRepository->find($sellerId);
+
+ $result = app('Webkul\Marketplace\Repositories\OrderItemRepository')->getModel()
+ ->leftJoin('marketplace_products', 'marketplace_order_items.marketplace_product_id', 'marketplace_products.id')
+ ->leftJoin('order_items', 'marketplace_order_items.order_item_id', 'order_items.id')
+ ->leftJoin('marketplace_orders', 'marketplace_order_items.marketplace_order_id', 'marketplace_orders.id')
+ ->select(DB::raw('SUM(qty_ordered) as total_qty_ordered'), 'marketplace_products.product_id')
+ ->where('marketplace_orders.marketplace_seller_id', $seller->id)
+ ->where('marketplace_products.is_approved', 1)
+ ->whereNull('order_items.parent_id')
+ ->groupBy('marketplace_products.product_id')
+ ->orderBy('total_qty_ordered', 'DESC')
+ ->limit(4)
+ ->get();
+
+ return $result->pluck('product_id')->toArray();
+ }
+
+ /**
+ * Returns the total products of the seller
+ *
+ * @param Seller $seller
+ * @return integer
+ */
+ public function getTotalProducts($seller)
+ {
+ return $seller->products()->where('is_approved', 1)->where('parent_id', NULL)->count();
+ }
+
+ /**
+ * Returns the all products of the seller
+ *
+ * @param integer $seller
+ * @return Collection
+ */
+ public function findAllBySeller($seller)
+ {
+ $params = request()->input();
+
+ $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($seller, $params) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ $qb = $query->distinct()
+ ->addSelect('product_flat.*')
+ ->join('product_flat as variants', 'product_flat.id', '=', DB::raw('COALESCE(' . DB::getTablePrefix() . 'variants.parent_id, ' . DB::getTablePrefix() . 'variants.id)'))
+ ->leftJoin('product_categories', 'product_categories.product_id', '=', 'product_flat.product_id')
+ ->leftJoin('product_attribute_values', 'product_attribute_values.product_id', '=', 'variants.product_id')
+ ->addSelect(DB::raw('IF( product_flat.special_price_from IS NOT NULL
+ AND product_flat.special_price_to IS NOT NULL , IF( NOW( ) >= product_flat.special_price_from
+ AND NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , IF( product_flat.special_price_from IS NULL , IF( product_flat.special_price_to IS NULL , IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , IF( NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) ) , IF( product_flat.special_price_to IS NULL , IF( NOW( ) >= product_flat.special_price_from, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , product_flat.price ) ) ) AS price1'))
+
+ ->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
+ ->leftJoin('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id')
+ ->where('product_flat.visible_individually', 1)
+ ->where('product_flat.status', 1)
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->whereNotNull('product_flat.url_key')
+ ->where('marketplace_products.marketplace_seller_id', $seller->id)
+ ->where('marketplace_products.is_approved', 1);
+
+ $qb->addSelect(DB::raw('(CASE WHEN marketplace_products.is_owner = 0 THEN marketplace_products.price ELSE product_flat.price END) AS price2'));
+
+ $queryBuilder = $qb->leftJoin('product_flat as flat_variants', function($qb) use($channel, $locale) {
+ $qb->on('product_flat.id', '=', 'flat_variants.parent_id')
+ ->where('flat_variants.channel', $channel)
+ ->where('flat_variants.locale', $locale);
+ });
+
+ if (isset($params['sort'])) {
+ $attribute = $this->attribute->findOneByField('code', $params['sort']);
+
+ if ($params['sort'] == 'price') {
+ $qb->orderBy($attribute->code, $params['order']);
+ } else {
+ $qb->orderBy($params['sort'] == 'created_at' ? 'product_flat.created_at' : $attribute->code, $params['order']);
+ }
+ }
+
+ // $qb = $qb->where(function($query1) {
+ // foreach (['product_flat', 'flat_variants'] as $alias) {
+ // $query1 = $query1->orWhere(function($query2) use($alias) {
+ // $attributes = $this->attribute->getProductDefaultAttributes(array_keys(request()->input()));
+
+ // foreach ($attributes as $attribute) {
+ // $column = $alias . '.' . $attribute->code;
+
+ // $queryParams = explode(',', request()->get($attribute->code));
+
+ // if ($attribute->type != 'price') {
+ // $query2 = $query2->where(function($query3) use($column, $queryParams) {
+ // foreach ($queryParams as $filterValue) {
+ // $query3 = $query3->orWhere($column, $filterValue);
+ // }
+ // });
+ // } else {
+ // $query2 = $query2->where($column, '>=', core() ->convertToBasePrice(current($queryParams)))->where($column, '<=', core()->convertToBasePrice(end($queryParams)));
+ // }
+ // }
+ // });
+ // }
+ // });
+
+ //brand attribute added code
+ $attributeFilters = $this->attribute
+ ->getProductDefaultAttributes(array_keys(
+ request()->input()
+ ));
+
+ if (count($attributeFilters) > 0) {
+ $qb = $qb->where(function ($filterQuery) use ($attributeFilters) {
+
+ foreach ($attributeFilters as $attribute) {
+ $filterQuery->orWhere(function ($attributeQuery) use ($attribute) {
+
+ $column = DB::getTablePrefix() . 'product_attribute_values.' . ProductAttributeValueProxy::modelClass()::$attributeTypeFields[$attribute->type];
+
+ $filterInputValues = explode(',', request()->get($attribute->code));
+
+ # define the attribute we are filtering
+ $attributeQuery = $attributeQuery->where('product_attribute_values.attribute_id', $attribute->id);
+
+ # apply the filter values to the correct column for this type of attribute.
+ if ($attribute->type != 'price') {
+
+ $attributeQuery->where(function ($attributeValueQuery) use ($column, $filterInputValues) {
+ foreach ($filterInputValues as $filterValue) {
+ if (! is_numeric($filterValue)) {
+ continue;
+ }
+ $attributeValueQuery->orWhereRaw("find_in_set(?, {$column})", [$filterValue]);
+ }
+ });
+
+ } else {
+ $attributeQuery->where($column, '>=', core()->convertToBasePrice(current($filterInputValues)))
+ ->where($column, '<=', core()->convertToBasePrice(end($filterInputValues)));
+ }
+ });
+ }
+
+ });
+
+ $qb->groupBy('variants.id');
+ $qb->havingRaw('COUNT(*) = ' . count($attributeFilters));
+ }
+
+ return $qb->groupBy('product_flat.id');
+ })->paginate(isset($params['limit']) ? $params['limit'] : 9);
+
+ return $results;
+ }
+
+ /**
+ * Search Product by Attribute
+ *
+ * @return Collection
+ */
+ public function searchProducts($term)
+ {
+ $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($term) {
+ $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
+
+ $locale = request()->get('locale') ?: app()->getLocale();
+
+ return $query->distinct()
+ ->addSelect('product_flat.*')
+ ->where('product_flat.status', 1)
+ ->where('product_flat.channel', $channel)
+ ->where('product_flat.locale', $locale)
+ ->whereNotNull('product_flat.url_key')
+ ->where('product_flat.name', 'like', '%' . $term . '%')
+ ->orderBy('product_id', 'desc');
+ })->paginate(16);
+
+ return $results;
+ }
+
+ /**
+ * Returns seller by product
+ *
+ * @param integer $productId
+ * @return boolean
+ */
+ public function getSellerByProductId($productId)
+ {
+ $product = parent::findOneWhere([
+ 'product_id' => $productId,
+ // 'is_owner' => 1
+ ]);
+
+ if (! $product) {
+ return;
+ }
+
+ return $product->seller;
+ }
+
+ /**
+ * Returns count of seller that selling the same product
+ *
+ * @param Product $product
+ * @return integer
+ */
+ public function getSellerCount($product)
+ {
+ return $this->scopeQuery(function($query) use($product) {
+ return $query
+ // ->leftJoin('marketplace_sellers', 'marketplace_sellers.id', 'marketplace_products.marketplace_seller_id')
+ ->where('marketplace_products.product_id', $product->id)
+ ->where('marketplace_products.is_owner', 0)
+ ->where('marketplace_products.is_approved', 1);
+ // ->where('marketplace_sellers.is_approved', 0);
+ })->count();
+ }
+
+ /**
+ * Returns the seller products of the product
+ *
+ * @param Product $product
+ * @return Collection
+ */
+ public function getSellerProducts($product)
+ {
+ return $this->findWhere([
+ 'product_id' => $product->id,
+ 'is_owner' => 0,
+ 'is_approved' => 1
+ ]);
+ }
+
+ /**
+ * Returns the seller products of the product id
+ *
+ * @param integer $productId
+ * @param integer $sellerId
+ * @return Collection
+ */
+ public function getMarketplaceProductByProduct($productId, $sellerId = null)
+ {
+ if ($sellerId) {
+ $seller = $this->sellerRepository->find($sellerId);
+ } else {
+ if (auth()->guard('customer')->check()) {
+ $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id);
+ } else {
+ return;
+ }
+ }
+
+ return $this->findOneWhere([
+ 'product_id' => $productId,
+ // 'is_owner' => 1,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductVideoRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductVideoRepository.php
new file mode 100644
index 000000000..9c73b1a75
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ProductVideoRepository.php
@@ -0,0 +1,60 @@
+assignVideos()->pluck('id');
+
+ if (isset($data['videos'])) {
+ foreach ($data['videos'] as $videoId => $video) {
+ $file = 'videos.' . $videoId;
+ $dir = 'product/assign/' . $product->id;
+
+ if ($video instanceof UploadedFile) {
+ if (request()->hasFile($file)) {
+ $this->create([
+ 'path' => request()->file($file)->store($dir),
+ 'marketplace_product_id' => $product->id,
+ 'type' => 'video'
+ ]);
+ }
+ } else {
+ if (is_numeric($index = $previousVideoIds->search($videoId))) {
+ $previousVideoIds->forget($index);
+ }
+ }
+ }
+ }
+
+ foreach ($previousVideoIds as $videoId) {
+ if ($videoModel = $this->find($videoId)) {
+ Storage::delete($videoModel->path);
+
+ $this->delete($videoId);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/RefundItemRepository.php b/packages/Webkul/Marketplace/src/Repositories/RefundItemRepository.php
new file mode 100644
index 000000000..68b82434d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/RefundItemRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class RefundItemRepository extends Repository
+{
+ protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\RefundItem';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/RefundRepository.php b/packages/Webkul/Marketplace/src/Repositories/RefundRepository.php
new file mode 100644
index 000000000..e679c911b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/RefundRepository.php
@@ -0,0 +1,231 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class RefundRepository extends Repository
+{
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Object
+ */
+ protected $productRepository;
+
+ /**
+ * OrderRepository object
+ *
+ * @var Object
+ */
+ protected $orderRepository;
+
+ /**
+ * OrderItemRepository object
+ *
+ * @var Object
+ */
+ protected $orderItemRepository;
+
+ /**
+ * InvoiceItemRepository object
+ *
+ * @var Object
+ */
+ protected $invoiceItemRepository;
+
+ /**
+ * RefundItemRepository object
+ *
+ * @var Object
+ */
+ protected $refundItemRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\ProductRepository $productRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\OrderItemRepository $orderItemRepository
+ * @param Webkul\Marketplace\Repositories\InvoiceItemRepository $invoiceItemRepository
+ * @param Webkul\Marketplace\Repositories\RefundItemRepository $refundItemRepository
+ * @param Illuminate\Container\Container $app
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ ProductRepository $productRepository,
+ OrderRepository $orderRepository,
+ OrderItemRepository $orderItemRepository,
+ InvoiceItemRepository $invoiceItemRepository,
+ RefundItemRepository $refundItemRepository,
+ App $app
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->invoiceItemRepository = $invoiceItemRepository;
+
+ $this->refundItemRepository = $refundItemRepository;
+
+ parent::__construct($app);
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Refund';
+ }
+
+ /**
+ * @param array $data
+ * @return mixed
+ */
+ public function create(array $data)
+ {
+ $refund = $data['refund'];
+
+ Event::dispatch('marketplace.sales.refund.save.before', $data);
+
+ $sellerRefunds = [];
+
+ foreach ($refund->items()->get() as $item) {
+ if (isset($item->additional['seller_info']) && !$item->additional['seller_info']['is_owner']) {
+ $seller = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ $sellers[] = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ } else {
+ $seller = $this->productRepository->getSellerByProductId($item->product_id);
+ $sellers[] = $this->productRepository->getSellerByProductId($item->product_id);
+ }
+
+ if (! $seller)
+ continue;
+
+ $sellerOrder = $this->orderRepository->findOneWhere([
+ 'order_id' => $refund->order->id,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+
+ if (! $sellerOrder)
+ continue;
+
+ $sellerOrderItem = $this->orderItemRepository->findOneWhere([
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'order_item_id' => $item->order_item->id,
+ ]);
+
+ if (! $sellerOrderItem)
+ continue;
+
+ $sellerRefund = $this->findOneWhere([
+ 'refund_id' => $refund->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ ]);
+
+ if (! $sellerRefund) {
+ $sellerRefunds[] = $sellerRefund = parent::create([
+ 'total_qty' => $item->qty,
+ 'state' => 'refunded',
+ 'refund_id' => $refund->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'adjustment_refund' => core()->convertPrice($data['refund']['adjustment_refund'], $sellerOrder->order_currency_code),
+ 'base_adjustment_refund' => $data['refund']['adjustment_refund'],
+ 'adjustment_fee' => core()->convertPrice($data['refund']['adjustment_fee'], $sellerOrder->order_currency_code),
+ 'base_adjustment_fee' => $data['refund']['adjustment_fee'],
+ 'shipping_amount' => core()->convertPrice($data['refund']['shipping_amount'], $sellerOrder->order_currency_code),
+ 'base_shipping_amount' => $data['refund']['shipping_amount']
+ ]);
+ } else {
+ $sellerRefund->total_qty += $item->qty;
+
+ $sellerRefund->save();
+ }
+
+ $sellerRefundItem = $this->refundItemRepository->create([
+ 'marketplace_refund_id' => $sellerRefund->id,
+ 'refund_item_id' => $item->id,
+ ]);
+
+ $this->orderItemRepository->collectTotals($sellerOrderItem);
+ }
+
+ foreach ($sellerRefunds as $sellerRefund) {
+ $this->collectTotals($sellerRefund);
+ }
+
+ foreach ($sellers as $seller) {
+ if ($seller) {
+ foreach ($this->orderRepository->findWhere(['order_id' => $refund->order->id, 'marketplace_seller_id' => $seller->id]) as $order) {
+ // $order->sellerCount = count($sellers);
+
+ $this->orderRepository->collectTotals($order);
+
+ $this->orderRepository->updateOrderStatus($order);
+
+ $this->orderRepository->update(['seller_payout_status' => 'refunded'], $order->id);
+ }
+ }
+ }
+
+ foreach ($sellerRefunds as $sellerRefund) {
+ Event::dispatch('marketplace.sales.refund.save.after', $sellerRefund);
+ }
+ }
+
+ /**
+ * @param mixed $sellerRefund
+ * @return mixed
+ */
+ public function collectTotals($sellerRefund)
+ {
+ $sellerRefund->sub_total = $sellerRefund->base_sub_total = 0;
+ $sellerRefund->tax_amount = $sellerRefund->base_tax_amount = 0;
+ $sellerRefund->grand_total = $sellerRefund->base_grand_total = 0;
+ $sellerRefund->discount_amount = $sellerRefund->base_discount_amount = 0;
+
+ foreach ($sellerRefund->items as $sellerRefundItem) {
+ $sellerRefund->sub_total += $sellerRefundItem->item->total;
+ $sellerRefund->base_sub_total += $sellerRefundItem->item->base_total;
+
+ $sellerRefund->tax_amount += $sellerRefundItem->item->tax_amount;
+ $sellerRefund->base_tax_amount += $sellerRefundItem->item->base_tax_amount;
+
+ $sellerRefund->discount_amount += $sellerRefundItem->item->discount_amount;
+ $sellerRefund->base_discount_amount += $sellerRefundItem->item->base_discount_amount;
+ }
+
+ $sellerRefund->grand_total = $sellerRefund->sub_total + $sellerRefund->tax_amount + $sellerRefund->shipping_amount + $sellerRefund->adjustment_refund - $sellerRefund->adjustment_fee - $sellerRefund->discount_amount;
+
+ $sellerRefund->base_grand_total = $sellerRefund->base_sub_total + $sellerRefund->base_tax_amount + $sellerRefund->base_shipping_amount + $sellerRefund->base_adjustment_refund - $sellerRefund->base_adjustment_fee - $sellerRefund->base_discount_amount;
+
+ $sellerRefund->save();
+
+ return $sellerRefund;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ReviewRepository.php b/packages/Webkul/Marketplace/src/Repositories/ReviewRepository.php
new file mode 100644
index 000000000..057ca6e28
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ReviewRepository.php
@@ -0,0 +1,112 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ReviewRepository extends Repository
+{
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Review';
+ }
+
+ /**
+ * @param integer $categoryId
+ * @return Collection
+ */
+ public function getRecentReviews($sellerId = null)
+ {
+ return $this->scopeQuery(function($query) use($sellerId) {
+ return $query->distinct()->where('marketplace_seller_id', $sellerId)->where('status', 'approved')->orderBy('id', 'desc');
+ })->paginate(5);
+ }
+
+ /**
+ * Returns the seller's avg rating
+ *
+ * @param Seller $seller
+ * @return float
+ */
+ public function getReviews($seller)
+ {
+ return $seller->reviews()->where('status', 'approved');
+ }
+
+ /**
+ * Returns the seller's avg rating
+ *
+ * @param Seller $seller
+ * @return float
+ */
+ public function getAverageRating($seller)
+ {
+ return number_format(round($seller->reviews()->where('status', 'approved')->average('rating'), 2), 1);
+ }
+
+ /**
+ * Returns the total review of the seller
+ *
+ * @param Seller $seller
+ * @return integer
+ */
+ public function getTotalReviews($seller)
+ {
+ return $seller->reviews()->where('status', 'approved')->count();
+ }
+
+ /**
+ * Returns the total rating of the seller
+ *
+ * @param Seller $seller
+ * @return integer
+ */
+ public function getTotalRating($seller)
+ {
+ return $seller->reviews()->where('status','approved')->sum('rating');
+ }
+
+ /**
+ * Returns the Percentage rating of the seller
+ *
+ * @param Seller $seller
+ * @return integer
+ */
+ public function getPercentageRating($seller)
+ {
+ $reviews = $seller->reviews()->where('status','approved')
+ ->select('rating', DB::raw('count(*) as total'))
+ ->groupBy('rating')
+ ->orderBy('rating','desc')
+ ->get();
+
+ for ($i = 5; $i >= 1; $i--) {
+ if (! $reviews->isEmpty()) {
+ foreach ($reviews as $review) {
+ if ($review->rating == $i) {
+ $percentage[$i] = round(($review->total / $this->getTotalReviews($seller)) * 100);
+ break;
+ } else {
+ $percentage[$i] = 0;
+ }
+ }
+ } else {
+ $percentage[$i] = 0;
+ }
+ }
+
+ return $percentage;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/SellerCategoryRepository.php b/packages/Webkul/Marketplace/src/Repositories/SellerCategoryRepository.php
new file mode 100644
index 000000000..f643ec72a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/SellerCategoryRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerCategoryRepository extends Repository
+{
+ protected $guarded = ['id', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\SellerCategory';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/SellerFlagReasonRepository.php b/packages/Webkul/Marketplace/src/Repositories/SellerFlagReasonRepository.php
new file mode 100644
index 000000000..8802fa036
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/SellerFlagReasonRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerFlagReasonRepository extends Repository
+{
+ protected $guarded = ['id', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\SellerFlagReason';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/SellerFlagRepository.php b/packages/Webkul/Marketplace/src/Repositories/SellerFlagRepository.php
new file mode 100644
index 000000000..9efe51070
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/SellerFlagRepository.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerFlagRepository extends Repository
+{
+ protected $guarded = ['id', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\SellerFlag';
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php b/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php
new file mode 100644
index 000000000..8f52cfd6a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php
@@ -0,0 +1,225 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class SellerRepository extends Repository
+{
+ /**
+ * OrderItemRepository object
+ *
+ * @var Object
+ */
+ protected $orderItemRepository;
+
+ /**
+ * ProductInventoryRepository object
+ *
+ * @var array
+ */
+ protected $productInventoryRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\OrderItemRepository $orderItemRepository
+ * @param Webkul\Product\Repositories\ProductInventoryRepository $productInventoryRepository
+ * @param Illuminate\Container\Container $app
+ * @return void
+ */
+ public function __construct(
+ OrderItemRepository $orderItemRepository,
+ ProductInventoryRepository $productInventoryRepository,
+ App $app
+ )
+ {
+ $this->orderItemRepository = $orderItemRepository;
+
+ $this->productInventoryRepository = $productInventoryRepository;
+
+ parent::__construct($app);
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Seller';
+ }
+
+ /**
+ * Retrive seller from url
+ *
+ * @param string $url
+ * @return mixed
+ */
+ public function findByUrlOrFail($url, $columns = null)
+ {
+ if ($seller = $this->findOneByField('url', $url)) {
+ return $seller;
+ }
+
+ throw (new ModelNotFoundException)->setModel(
+ get_class($this->model), $url
+ );
+ }
+
+ /**
+ * @param array $data
+ * @param $id
+ * @param string $attribute
+ * @return mixed
+ */
+ public function update(array $data, $id, $attribute = "id")
+ {
+ Event::dispatch('marketplace.seller.profile.update.before', $id);
+
+ $seller = $this->find($id);
+
+ parent::update($data, $id);
+
+ $this->uploadImages($data, $seller);
+
+ $this->uploadImages($data, $seller, 'banner');
+
+ Event::dispatch('marketplace.seller.profile.update.after', $seller);
+
+ return $seller;
+ }
+
+ /**
+ * Checks if customer is registered as seller or not
+ *
+ * @param integer $customerId
+ * @return boolean
+ */
+ public function isSeller($customerId)
+ {
+ $isSeller = $this->getModel()->where('customer_id', $customerId)
+ ->limit(1)
+ ->select(\DB::raw(1))
+ ->exists();
+
+ return $isSeller ? $this->isSellerApproved($customerId) : false;
+ }
+
+ /**
+ * Checks if seller is approved or not
+ *
+ * @param $customerId
+ * @return boolean
+ */
+ public function isSellerApproved($customerId)
+ {
+ $isSellerApproved = $this->getModel()->where('customer_id', $customerId)
+ ->where('is_approved', 1)
+ ->limit(1)
+ ->select(\DB::raw(1))
+ ->exists();
+
+ return $isSellerApproved ? true : false;
+ }
+
+ /**
+ * @param array $data
+ * @param mixed $seller
+ * @return void
+ */
+ public function uploadImages($data, $seller, $type = "logo")
+ {
+ if (isset($data[$type])) {
+ foreach ($data[$type] as $imageId => $image) {
+ $file = $type . '.' . $imageId;
+ $dir = 'seller/' . $seller->id;
+
+ if (request()->hasFile($file)) {
+ if ($seller->{$type}) {
+ Storage::delete($seller->{$type});
+ }
+
+ $seller->{$type} = request()->file($file)->store($dir);
+ $seller->save();
+ }
+ }
+ } else {
+ if ($seller->{$type}) {
+ Storage::delete($seller->{$type});
+ }
+
+ $seller->{$type} = null;
+ $seller->save();
+ }
+ }
+
+ /**
+ * Returns top 4 popular sellers
+ *
+ * @return Collection
+ */
+ public function getPopularSellers()
+ {
+ $result = $this->getModel()
+ ->leftJoin('marketplace_orders', 'marketplace_sellers.id', 'marketplace_orders.marketplace_seller_id')
+ ->leftJoin('marketplace_order_items', 'marketplace_orders.id', 'marketplace_order_items.marketplace_order_id')
+ ->leftJoin('order_items', 'marketplace_order_items.order_item_id', 'order_items.id')
+ ->addSelect('marketplace_sellers.*')
+ ->addSelect(DB::raw('SUM(qty_ordered) as total_qty_ordered'))
+ ->groupBy('marketplace_sellers.id')
+ ->where('marketplace_sellers.shop_title', '<>', NULL)
+ // ->where('marketplace_sellers.is_approved', 0)
+ ->orderBy('total_qty_ordered', 'DESC')
+ ->limit(4)
+ ->get();
+
+ return $result;
+ }
+
+ /**
+ * @param $id
+ * @return mixed
+ */
+ public function delete($id)
+ {
+ Event::dispatch('marketplace.seller.delete.before', $id);
+
+ parent::delete($id);
+
+ Event::dispatch('marketplace.seller.delete.after', $id);
+ }
+
+ /**
+ * @param $id
+ * @return mixed
+ */
+ public function deleteInventory($id)
+ {
+ $inventories = $this->productInventoryRepository->findWhere([
+ 'vendor_id' => $id
+ ]);
+
+ if (count($inventories)) {
+ foreach ($inventories as $inventory) {
+ if (isset ($inventory)) {
+ $this->productInventoryRepository->delete($inventory->id);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ShipmentItemRepository.php b/packages/Webkul/Marketplace/src/Repositories/ShipmentItemRepository.php
new file mode 100644
index 000000000..5307ea316
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ShipmentItemRepository.php
@@ -0,0 +1,81 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ShipmentItemRepository extends Repository
+{
+ protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\ShipmentItem';
+ }
+
+ /**
+ * @param array $data
+ * @return void
+ */
+ public function updateProductInventory($data)
+ {
+ $orderedInventory = $data['product']->ordered_inventories()
+ ->where('channel_id', $data['shipment']->order->channel->id)
+ ->first();
+
+ if ($orderedInventory) {
+ if (($orderedQty = $orderedInventory->qty - $data['qty']) < 0) {
+ $orderedQty = 0;
+ }
+
+ $orderedInventory->update([
+ 'qty' => $orderedQty
+ ]);
+ } else {
+ $data['product']->ordered_inventories()->create([
+ 'qty' => $data['qty'],
+ 'product_id' => $data['product']->id,
+ 'channel_id' => $data['shipment']->order->channel->id
+ ]);
+ }
+
+ $sellerInventory = $data['product']->inventories()
+ ->where('vendor_id', $data['vendor_id'])
+ ->where('inventory_source_id', $data['shipment']->inventory_source_id)
+ ->first();
+
+
+ if (!$sellerInventory)
+ return;
+
+ if (($qty = $sellerInventory->qty - $data['qty']) < 0) {
+ $qty = 0;
+ }
+
+ $sellerInventory->update([
+ 'qty' => $qty
+ ]);
+
+ $adminInventory = $data['product']->inventories()
+ ->where('vendor_id', 0)
+ ->where('inventory_source_id', $data['shipment']->inventory_source_id)
+ ->first();
+
+ if ($adminInventory) {
+ $adminInventory->update([
+ 'qty' => $adminInventory->qty + $data['qty']
+ ]);
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/ShipmentRepository.php b/packages/Webkul/Marketplace/src/Repositories/ShipmentRepository.php
new file mode 100644
index 000000000..31f850403
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/ShipmentRepository.php
@@ -0,0 +1,165 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class ShipmentRepository extends Repository
+{
+ /**
+ * SellerRepository object
+ *
+ * @var Object
+ */
+ protected $sellerRepository;
+
+ /**
+ * ProductRepository object
+ *
+ * @var Object
+ */
+ protected $productRepository;
+
+ /**
+ * OrderRepository object
+ *
+ * @var Object
+ */
+ protected $orderRepository;
+
+ /**
+ * ShipmentItemRepository object
+ *
+ * @var Object
+ */
+ protected $shipmentItemRepository;
+
+ /**
+ * Create a new repository instance.
+ *
+ * @param Webkul\Marketplace\Repositories\SellerRepository $sellerRepository
+ * @param Webkul\Marketplace\Repositories\ProductRepository $productRepository
+ * @param Webkul\Marketplace\Repositories\OrderRepository $orderRepository
+ * @param Webkul\Marketplace\Repositories\ShipmentItemRepository $shipmentItemRepository
+ * @param Illuminate\Container\Container $app
+ * @return void
+ */
+ public function __construct(
+ SellerRepository $sellerRepository,
+ ProductRepository $productRepository,
+ OrderRepository $orderRepository,
+ ShipmentItemRepository $shipmentItemRepository,
+ App $app
+ )
+ {
+ $this->sellerRepository = $sellerRepository;
+
+ $this->productRepository = $productRepository;
+
+ $this->orderRepository = $orderRepository;
+
+ $this->shipmentItemRepository = $shipmentItemRepository;
+
+ parent::__construct($app);
+ }
+
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Shipment';
+ }
+
+ /**
+ * @param array $data
+ * @return mixed
+ */
+ public function create(array $data)
+ {
+ $shipment = $data['shipment'];
+
+ Event::dispatch('marketplace.sales.shipment.save.before', $data);
+
+ $sellerShipments = [];
+
+ foreach ($shipment->items()->get() as $item) {
+ if (isset($item->additional['seller_info']) && !$item->additional['seller_info']['is_owner']) {
+ $seller = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ $sellers[] = $this->sellerRepository->find($item->additional['seller_info']['seller_id']);
+ } else {
+ $seller = $this->productRepository->getSellerByProductId($item->product_id);
+ $sellers[] = $this->productRepository->getSellerByProductId($item->product_id);
+ }
+
+ if (! $seller)
+ continue;
+
+ $sellerOrder = $this->orderRepository->findOneWhere([
+ 'order_id' => $shipment->order->id,
+ 'marketplace_seller_id' => $seller->id,
+ ]);
+
+ if (! $sellerOrder)
+ continue;
+
+ $sellerShipment = $this->findOneWhere([
+ 'shipment_id' => $shipment->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ ]);
+
+ if (! $sellerShipment) {
+ $sellerShipments[] = $sellerShipment = parent::create([
+ 'total_qty' => $item->qty,
+ 'shipment_id' => $shipment->id,
+ 'marketplace_order_id' => $sellerOrder->id,
+ ]);
+ } else {
+ $sellerShipment->total_qty += $item->qty;
+
+ $sellerShipment->save();
+ }
+
+ $sellerShipmentItem = $this->shipmentItemRepository->create([
+ 'marketplace_shipment_id' => $sellerShipment->id,
+ 'shipment_item_id' => $item->id,
+ ]);
+
+
+ $product = ($item->order_item->type == 'configurable')
+ ? $item->order_item->child->product
+ : $item->order_item->product;
+
+ $this->shipmentItemRepository->updateProductInventory([
+ 'shipment' => $shipment,
+ 'product' => $product,
+ 'qty' => $item->qty,
+ 'vendor_id' => $seller->id
+ ]);
+ }
+
+ foreach ($sellers as $seller) {
+ if ($seller) {
+ $sellerOrders = $this->orderRepository->findWhere(['order_id' => $shipment->order->id, 'marketplace_seller_id' => $seller->id]);
+
+ foreach ($sellerOrders as $sellerOrder) {
+ $this->orderRepository->updateOrderStatus($sellerOrder);
+ }
+ }
+ }
+
+ foreach ($sellerShipments as $sellerShipment) {
+ Event::dispatch('marketplace.sales.shipment.save.after', $sellerShipment);
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Repositories/TransactionRepository.php b/packages/Webkul/Marketplace/src/Repositories/TransactionRepository.php
new file mode 100644
index 000000000..7df703b5d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Repositories/TransactionRepository.php
@@ -0,0 +1,81 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class TransactionRepository extends Repository
+{
+ /**
+ * Specify Model class name
+ *
+ * @return mixed
+ */
+ function model()
+ {
+ return 'Webkul\Marketplace\Contracts\Transaction';
+ }
+
+ /**
+ * Pay seller
+ *
+ * @param integer $data
+ * @return boolean
+ */
+ public function paySeller($data)
+ {
+ $orderRepository = app('Webkul\Marketplace\Repositories\OrderRepository');
+
+ $sellerOrder = $orderRepository->findOneWhere([
+ 'order_id' => $data['order_id'],
+ 'marketplace_seller_id' => $data['seller_id']
+ ]);
+
+ if (! $sellerOrder) {
+ session()->flash('error', trans('marketplace::app.admin.orders.order-not-exist'));
+
+ return;
+ }
+
+ $totalPaid = $this->scopeQuery(function($query) use($sellerOrder) {
+ return $query->where('marketplace_transactions.marketplace_seller_id', $sellerOrder->marketplace_seller_id)
+ ->where('marketplace_transactions.marketplace_order_id', $sellerOrder->id);
+ })->sum('base_total');
+
+ $amount = $sellerOrder->base_seller_total_invoiced - $totalPaid ;
+
+ if (! $amount) {
+ session()->flash('error', trans('marketplace::app.admin.orders.no-amount-to-paid'));
+
+ return;
+ }
+
+ Event::dispatch('marketplace.sales.transaction.create.before', $data);
+
+ $transaction = $this->create([
+ 'type' => isset($data['type']) ? $data['type'] : 'manual',
+ 'method' => isset($data['method']) ? $data['method'] : 'manual',
+ 'transaction_id' => $data['order_id'] . '-' . Str::random(10),
+ 'comment' => $data['comment'],
+ 'base_total' => $amount,
+ 'marketplace_order_id' => $sellerOrder->id,
+ 'marketplace_seller_id' => $sellerOrder->marketplace_seller_id
+ ]);
+
+ if (($amount + $totalPaid) == $sellerOrder->base_seller_total) {
+ $orderRepository->update(['seller_payout_status' => 'paid'], $sellerOrder->id);
+ }
+
+ Event::dispatch('marketplace.sales.transaction.create.after', $transaction);
+
+ return $transaction;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Default-Product-Image.png b/packages/Webkul/Marketplace/src/Resources/assets/images/Default-Product-Image.png
new file mode 100644
index 000000000..8f6da118a
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/Default-Product-Image.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Group 5 Copy.png b/packages/Webkul/Marketplace/src/Resources/assets/images/Group 5 Copy.png
new file mode 100644
index 000000000..358aca265
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/Group 5 Copy.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Dashboard.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Dashboard.svg
new file mode 100644
index 000000000..0878093a7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Dashboard.svg
@@ -0,0 +1,15 @@
+
+
+
+ Icon-Dashboard
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Marketplace-Active.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Marketplace-Active.svg
new file mode 100644
index 000000000..1a1a25f7d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Marketplace-Active.svg
@@ -0,0 +1,19 @@
+
+
+
+ Icon-Marketplace-Active
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Marketplace.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Marketplace.svg
new file mode 100644
index 000000000..27797a9df
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Marketplace.svg
@@ -0,0 +1,19 @@
+
+
+
+ Icon-Marketplace
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Pencil-Large.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Pencil-Large.svg
new file mode 100644
index 000000000..3c9ee9a97
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Pencil-Large.svg
@@ -0,0 +1,13 @@
+
+
+
+ Icon-Pencil-Large
+ Created with Sketch.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Trash.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Trash.svg
new file mode 100644
index 000000000..0267d04ce
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-Trash.svg
@@ -0,0 +1,14 @@
+
+
+
+ Icon-Trash
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-remove.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-remove.svg
new file mode 100644
index 000000000..30faa6d06
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/Icon-remove.svg
@@ -0,0 +1,14 @@
+
+
+
+ Icon-remove
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/add-products.png b/packages/Webkul/Marketplace/src/Resources/assets/images/add-products.png
new file mode 100644
index 000000000..4437c1020
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/add-products.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/add-shop.png b/packages/Webkul/Marketplace/src/Resources/assets/images/add-shop.png
new file mode 100644
index 000000000..be4148c42
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/add-shop.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/banner copy.png b/packages/Webkul/Marketplace/src/Resources/assets/images/banner copy.png
new file mode 100644
index 000000000..525cfab4c
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/banner copy.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/branding.png b/packages/Webkul/Marketplace/src/Resources/assets/images/branding.png
new file mode 100644
index 000000000..162e4537f
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/branding.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/bulk-customization3.png b/packages/Webkul/Marketplace/src/Resources/assets/images/bulk-customization3.png
new file mode 100644
index 000000000..c33ee588d
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/bulk-customization3.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/contact.png b/packages/Webkul/Marketplace/src/Resources/assets/images/contact.png
new file mode 100644
index 000000000..99c4a26dd
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/contact.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/copy-icon.png b/packages/Webkul/Marketplace/src/Resources/assets/images/copy-icon.png
new file mode 100644
index 000000000..a4933138d
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/copy-icon.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/copy-icon@2x.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/copy-icon@2x.svg
new file mode 100644
index 000000000..4a1110817
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/copy-icon@2x.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/customer-orders.png b/packages/Webkul/Marketplace/src/Resources/assets/images/customer-orders.png
new file mode 100644
index 000000000..8ffde8ef9
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/customer-orders.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/customize-profile.png b/packages/Webkul/Marketplace/src/Resources/assets/images/customize-profile.png
new file mode 100644
index 000000000..313313683
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/customize-profile.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/dashbord.png b/packages/Webkul/Marketplace/src/Resources/assets/images/dashbord.png
new file mode 100644
index 000000000..7af83864e
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/dashbord.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/default-banner.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/default-banner.svg
new file mode 100644
index 000000000..2fc56c769
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/default-banner.svg
@@ -0,0 +1,118 @@
+
+
+
+ default-banner
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/default-logo.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/default-logo.svg
new file mode 100644
index 000000000..098cafd74
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/default-logo.svg
@@ -0,0 +1,21 @@
+
+
+
+ seller-logo-defautl
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/default-velocity-logo.png b/packages/Webkul/Marketplace/src/Resources/assets/images/default-velocity-logo.png
new file mode 100644
index 000000000..31ae64f74
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/default-velocity-logo.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/four.png b/packages/Webkul/Marketplace/src/Resources/assets/images/four.png
new file mode 100644
index 000000000..d8d4cd59f
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/four.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/l3-add-products.png b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-add-products.png
new file mode 100644
index 000000000..3139a1fe4
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-add-products.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/l3-add-shop.png b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-add-shop.png
new file mode 100644
index 000000000..202156318
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-add-shop.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/l3-create-an-account.png b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-create-an-account.png
new file mode 100644
index 000000000..e5f4244ec
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-create-an-account.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/l3-customize-profile.png b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-customize-profile.png
new file mode 100644
index 000000000..8f4c52afe
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-customize-profile.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/l3-start-selling.png b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-start-selling.png
new file mode 100644
index 000000000..5bdb2674a
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/l3-start-selling.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/layout-3-banner.png b/packages/Webkul/Marketplace/src/Resources/assets/images/layout-3-banner.png
new file mode 100644
index 000000000..7f707e4a1
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/layout-3-banner.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-facebook.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-facebook.svg
new file mode 100644
index 000000000..ecafd7ebc
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-facebook.svg
@@ -0,0 +1,10 @@
+
+
+
+ facebook
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-google+.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-google+.svg
new file mode 100644
index 000000000..fc2d26234
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-google+.svg
@@ -0,0 +1,10 @@
+
+
+
+ google+
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-instagram.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-instagram.svg
new file mode 100644
index 000000000..126e5cb7e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-instagram.svg
@@ -0,0 +1,10 @@
+
+
+
+ instagram
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-linked-in.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-linked-in.svg
new file mode 100644
index 000000000..e5bdf25b3
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-linked-in.svg
@@ -0,0 +1,10 @@
+
+
+
+ linked-in
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-pinterest.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-pinterest.svg
new file mode 100644
index 000000000..f14a77999
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-pinterest.svg
@@ -0,0 +1,10 @@
+
+
+
+ pintrest
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-skype.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-skype.svg
new file mode 100644
index 000000000..cbbd302e6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-skype.svg
@@ -0,0 +1,10 @@
+
+
+
+ skype
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-twiter.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-twiter.svg
new file mode 100644
index 000000000..affe4b0e3
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-twiter.svg
@@ -0,0 +1,10 @@
+
+
+
+ twiter
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-velocity-banner.png b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-velocity-banner.png
new file mode 100644
index 000000000..094c43b4a
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-velocity-banner.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/mp-youtube.svg b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-youtube.svg
new file mode 100644
index 000000000..a782adf43
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/images/mp-youtube.svg
@@ -0,0 +1,10 @@
+
+
+
+ youtube
+ Created with Sketch.
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/offers.png b/packages/Webkul/Marketplace/src/Resources/assets/images/offers.png
new file mode 100644
index 000000000..81908ad38
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/offers.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/one.png b/packages/Webkul/Marketplace/src/Resources/assets/images/one.png
new file mode 100644
index 000000000..7b4bc11ec
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/one.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/product.png b/packages/Webkul/Marketplace/src/Resources/assets/images/product.png
new file mode 100644
index 000000000..901b48bff
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/product.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/query.png b/packages/Webkul/Marketplace/src/Resources/assets/images/query.png
new file mode 100644
index 000000000..6bb77c67f
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/query.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/revenue.png b/packages/Webkul/Marketplace/src/Resources/assets/images/revenue.png
new file mode 100644
index 000000000..90adf2ff8
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/revenue.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/social.png b/packages/Webkul/Marketplace/src/Resources/assets/images/social.png
new file mode 100644
index 000000000..283b42728
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/social.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/start-selling.png b/packages/Webkul/Marketplace/src/Resources/assets/images/start-selling.png
new file mode 100644
index 000000000..7d37258b4
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/start-selling.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/three.png b/packages/Webkul/Marketplace/src/Resources/assets/images/three.png
new file mode 100644
index 000000000..05ba6e333
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/three.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/images/two.png b/packages/Webkul/Marketplace/src/Resources/assets/images/two.png
new file mode 100644
index 000000000..79b5261af
Binary files /dev/null and b/packages/Webkul/Marketplace/src/Resources/assets/images/two.png differ
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/js/app.js b/packages/Webkul/Marketplace/src/Resources/assets/js/app.js
new file mode 100644
index 000000000..d7626bfce
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/js/app.js
@@ -0,0 +1,5 @@
+import VueCarousel from 'vue-carousel';
+Vue.directive("debounce", require("./directives/debounce"));
+
+Vue.use(VueCarousel);
+Vue.component('seller-category', require('./components/seller-category'));
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/js/components/seller-category-item.vue b/packages/Webkul/Marketplace/src/Resources/assets/js/components/seller-category-item.vue
new file mode 100644
index 000000000..8498361d7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/js/components/seller-category-item.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/js/components/seller-category.vue b/packages/Webkul/Marketplace/src/Resources/assets/js/components/seller-category.vue
new file mode 100644
index 000000000..39da295f8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/js/components/seller-category.vue
@@ -0,0 +1,11 @@
+
+
+ dsjfn
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/js/debounce.js b/packages/Webkul/Marketplace/src/Resources/assets/js/debounce.js
new file mode 100644
index 000000000..60a01b535
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/js/debounce.js
@@ -0,0 +1,12 @@
+module.exports = function debounce (fn, delay) {
+ var timeoutID = null
+
+ return function () {
+ clearTimeout(timeoutID)
+ var args = arguments
+ var that = this
+ timeoutID = setTimeout(function () {
+ fn.apply(that, args)
+ }, delay)
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/js/directives/debounce.vue b/packages/Webkul/Marketplace/src/Resources/assets/js/directives/debounce.vue
new file mode 100644
index 000000000..7b0f35e64
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/js/directives/debounce.vue
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/js/directives/modal.vue b/packages/Webkul/Marketplace/src/Resources/assets/js/directives/modal.vue
new file mode 100644
index 000000000..2467b4734
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/js/directives/modal.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/sass/_variables.scss b/packages/Webkul/Marketplace/src/Resources/assets/sass/_variables.scss
new file mode 100644
index 000000000..04bdf0f1a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/sass/_variables.scss
@@ -0,0 +1,4 @@
+// Body
+$border-color: rgba(162, 162, 162, 0.2);
+$font-light: #A5A5A5;
+$disc-price: #FF6472;
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/sass/admin.scss b/packages/Webkul/Marketplace/src/Resources/assets/sass/admin.scss
new file mode 100644
index 000000000..4d0570237
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/sass/admin.scss
@@ -0,0 +1,30 @@
+@import "icons";
+@import "variables";
+
+.navbar-left {
+ width: 100px;
+
+ ul.menubar li.menu-item {
+ padding: 10px 7px;
+ }
+}
+
+.content-container {
+ padding-left: 100px;
+}
+
+.product-price {
+ span {
+ font-size: 20px;
+ }
+
+ .regular-price {
+ color: $font-light;
+ text-decoration: line-through;
+ margin-right: 10px;
+ }
+
+ .special-price {
+ color: $disc-price;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/sass/default.scss b/packages/Webkul/Marketplace/src/Resources/assets/sass/default.scss
new file mode 100644
index 000000000..7f21705d2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/sass/default.scss
@@ -0,0 +1,1285 @@
+@import "icons";
+@import "variables";
+
+.account-head {
+ .account-action {
+ position: relative;
+ top: -20px;
+ }
+}
+
+.modal-container {
+ top: 40px;
+ text-align: left;
+}
+
+.pagination {
+ .paginate_button {
+ background: #ffffff;
+ border: 2px solid #f3f3f3;
+ padding: 7px 14px;
+ margin-right: 5px;
+ font-size: 16px;
+ display: inline-block;
+ color: #8e8e8e;
+ vertical-align: middle;
+ text-decoration: none;
+ cursor: pointer;
+
+ &.previous,
+ &.next {
+ padding: 6px 9px;
+ }
+
+ &.current {
+ background: #0041ff;
+ color: #fff;
+ border-color: #0041ff;
+ }
+
+ .icon {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ }
+}
+
+div.dataTables_wrapper div.dataTables_filter {
+ display: none;
+}
+
+#earningTable_length {
+ padding: 15px;
+
+ select {
+ width: 100px;
+ resize: none;
+ font-size: 16px;
+ padding: 5px 16px;
+ border-radius: 1px;
+ background: #fff;
+ border: 1px solid #ccc;
+ margin-bottom: 20px;
+ }
+}
+
+div.dataTables_wrapper div.dataTables_info {
+ display: none;
+}
+
+#earningTable {
+ thead tr {
+ background-color:#3a3a3a;
+ }
+ .grid_head {
+ font-weight: 700;
+ padding: 12px 10px;
+ background: #f8f9fa;
+ color: #3a3a3a;
+ }
+
+ .grid_head::after {
+ display: none;
+ }
+}
+
+
+//responsive css for account action and for table
+
+@media only screen and (max-width: 770px){
+ .account-head {
+ .account-action {
+ margin: 4px !important;
+ margin-right: 0px !important;
+ position: unset;
+
+ .control-group.date {
+ width: 49% !important;
+ margin-left: 0px !important;
+ }
+
+ .control-group.date::after, .control-group.datetime::after {
+ position: initial !important;
+ }
+ }
+ }
+
+ .table {
+ .grid-container {
+ margin-top: 10px;
+
+ .filter-row-one {
+ display: block;
+ }
+ }
+ }
+
+ .dropdown-list.top-right {
+ bottom: auto;
+ right: auto;
+ }
+
+ .dropdown-filters {
+ margin-top: 10px;
+ }
+}
+
+.profile-container {
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ margin-bottom: 80px;
+
+ .profile-top-block {
+ width: 100%;
+
+ .profile-information {
+ float: left;
+
+ .profile-logo-block {
+ width: 120px;
+ height: 120px;
+ float: left;
+ border-radius: 10px;
+ overflow: hidden;
+
+ img {
+ width: 120px;
+ height: 120px;
+ }
+ }
+
+ .profile-information-block {
+ float: left;
+ margin-top: 32px;
+ margin-left: 20px;
+
+ .shop-title {
+ font-size: 24px;
+ display: block;
+ margin-bottom: 5px;
+ }
+ }
+ }
+
+ .review-information {
+ float: right;
+ text-align: center;
+ padding-top: 25px;
+
+ .number {
+ font-size: 34px;
+ }
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+ }
+ }
+
+ .profile-left-block {
+ width: 25%;
+ float: left;
+ margin-top: 60px;
+ min-height: 1px;
+ text-align: center;
+
+ h2 {
+ &.shop-title {
+ margin-bottom: 5px !important;
+ }
+ }
+
+ a {
+ &.shop-title {
+ font-size: 24px;
+ color: #0031F0;
+ display: block;
+ margin-bottom: 5px;
+ }
+ }
+
+ .content {
+ position: relative;
+ border: 1px solid #E8E8E8;
+ padding: 20px;
+ padding-top: 80px;
+
+ .profile-logo-block {
+ width: 120px;
+ height: 120px;
+ border-radius: 10px;
+ overflow: hidden;
+ position: absolute;
+ top: -60px;
+ left: 50%;
+ margin-left: -60px;
+
+ img {
+ width: 120px;
+ height: 120px;
+ }
+ }
+
+ .profile-information-block {
+ .row {
+ margin-bottom: 20px;
+ display: block !important;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ &.social-links {
+ a {
+ display: inline-block;
+ }
+ }
+ }
+
+ h2 {
+ font-size: 24px;
+ margin: 0;
+ }
+
+ .review-info {
+ .number {
+ font-size: 34px;
+ }
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .profile-right-block {
+ width: 80%;
+ padding-left: 20px;
+ display: block;
+
+ img {
+ height: 100%;
+ width: 100%;
+ max-height: 500px;
+ object-fit: cover;
+ }
+ }
+}
+
+// responsive css for profile-container
+@media only screen and (max-width: 770px){
+ .profile-container {
+ flex-direction: column;
+
+ .profile-top-block {
+ display: flex;
+ flex-direction: column;
+
+ .review-information {
+ text-align: left;
+ }
+ }
+
+ .profile-left-block {
+ width: 80%;
+ margin-right: auto;
+ margin-left: auto;
+ }
+
+ .profile-right-block {
+ width: 100%;
+ padding-left: 0px;
+ margin-top: 20px;
+ }
+ }
+}
+
+.section {
+ .section-heading {
+ width: 100%;
+ text-transform: uppercase;
+ margin-bottom: 20px;
+ display: inline-block;
+
+ h2 {
+ font-size: 18px;
+ font-weight: 500;
+ float: left;
+ margin: 0;
+
+ .seperator {
+ position: absolute;
+ border-bottom: 1px solid #E8E8E8;
+ width: 50px;
+ margin-top: 20px;
+ }
+ }
+ }
+}
+
+.product-items {
+ margin-bottom: 40px;
+
+ .section-heading {
+ .btn {
+ float: right;
+ }
+ }
+}
+
+.profile-details {
+ width: 100%;
+ display: inline-block;
+ margin-bottom: 20px;
+
+ .profile-details-left-block {
+ width: 50%;
+ float: left;
+ padding-right: 15px;
+
+ .slider-container {
+ padding: 25px 25px 0px 25px;
+ margin-bottom: 20px;
+ border: 1px solid #E8E8E8;
+ position: relative;
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+
+ .VueCarousel-inner {
+ margin-bottom: 20px;
+ }
+
+ .VueCarousel-pagination {
+ display: inline-block;
+
+ .VueCarousel-dot-container {
+ float: left;
+
+ .VueCarousel-dot {
+ margin-top: 0 !important;
+ }
+ }
+ }
+
+ a {
+ position: absolute;
+ right: 40px;
+ bottom: 14px;
+ }
+ }
+
+ .accordian-header {
+ padding: 10px 0;
+ }
+
+ .accordian-content {
+ padding: 20px 0;
+ }
+ }
+
+ .profile-details-right-block {
+ width: 50%;
+ float: left;
+ padding-left: 15px;
+ }
+}
+
+// responsive css for profile-deatils
+@media only screen and (max-width: 770px){
+ .profile-details {
+ flex-direction: block;
+
+ .profile-details-left-block {
+ width: 100%;
+ padding-right: 0px;
+ }
+
+ .profile-details-right-block {
+ width: 100%;
+ padding-left: 0px;
+ margin-top: 10px;
+ }
+ }
+}
+
+.stars {
+ .star {
+ font-size: 25px;
+ color: #d4d4d4;
+ transition: all .2s;
+ }
+
+ .star:before {
+ content: '\2605';
+ }
+}
+
+.control-group {
+ span.locale {
+ display: none;
+ }
+}
+
+.dropdown-list.product-search-list {
+ .dropdown-container {
+ padding: 0 0 0 10px;
+ max-height: 344px;
+
+ li {
+
+ img {
+ width: 52px;
+ height: 60px;
+ }
+ }
+
+ .table table tbody td {
+ vertical-align: middle;
+
+ &.last {
+ width: 120px;
+
+ a {
+ margin: 0;
+ }
+
+ .btn {
+ color: #fff;
+ }
+ }
+ }
+ }
+}
+
+.product-information {
+ .product-image {
+ max-height: 350px;
+ max-width: 280px;
+ margin-right: 20px;
+ float: left;
+ background: #F2F2F2;
+
+ img {
+ display: block;
+ width: 100%;
+ }
+ }
+
+ .product-details {
+ .product-name {
+ font-size: 24px;
+ }
+
+ .product-price {
+ font-size: 18px;
+ margin-top: 10px;
+ }
+ }
+}
+
+.product-detail {
+ .modal-container {
+ padding-left: 20px!important;
+ z-index: 1000;
+ }
+}
+
+.product-offer-container {
+ margin-bottom: 20px;
+ width: 100%;
+
+ .product {
+ width: 100%;
+ display: inline-block;
+ padding: 20px;
+ border-radius: 3px;
+ border: 1px solid #E8E8E8;
+
+ .product-information {
+ float: left;
+
+ .product-logo-block {
+ width: 162px;
+ height: 162px;
+ float: left;
+ overflow: hidden;
+ background: #F2F2F2;
+ border: 1px solid #E8E8E8;
+
+ img {
+ width: 160px;
+ height: 160px;
+ }
+ }
+
+ .product-information-block {
+ float: left;
+ margin-left: 20px;
+
+ .product-title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #242424;
+ display: block;
+ margin-bottom: 5px;
+ }
+
+ .price {
+ margin-top: 10px;
+
+ .product-price {
+ font-size: 24px;
+ }
+ }
+
+ .stock-status {
+ margin-bottom: 15px;
+ font-weight: 600;
+ color: #FC6868;
+
+ &.active {
+ color: #4CAF50;
+ }
+ }
+
+ .options {
+
+ }
+ }
+ }
+
+ .review-information {
+ float: right;
+ text-align: center;
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+
+ .total-reviews {
+ margin-top: 10px;
+ }
+ }
+ }
+
+ .seller-product-list {
+ width: 75%;
+
+ h2.heading {
+ margin-top: 30px;
+ }
+
+ .content {
+ .seller-product-item {
+ padding: 10px;
+ border-bottom: 1px solid #E8E8E8;
+
+ .product-info-top {
+ table tbody td {
+ vertical-align: middle;
+ &:first-child {
+ padding-left: 0;
+ }
+
+ &:last-child {
+ padding-right: 0;
+ }
+
+ .product-price {
+ span {
+ font-size: 20px;
+ }
+
+ .regular-price {
+ color: $font-light;
+ text-decoration: line-through;
+ margin-right: 10px;
+ }
+
+ .special-price {
+ color: $disc-price;
+ }
+ }
+
+ .control-group {
+ width: 60px;
+ display: inline-block;
+ float: left;
+ }
+
+ .btn.btn-black {
+ padding: 9px 20px;
+ margin-left: 10px;
+ float: left;
+ text-transform: uppercase;
+ }
+
+ .stock-status {
+ font-weight: 600;
+ color: #FC6868;
+ margin-left: 10px;
+ float: left;
+ padding: 9px 0px;
+ }
+ }
+
+ .profile-logo-block {
+ width: 60px;
+ height: 60px;
+ float: left;
+ border-radius: 5px;
+ overflow: hidden;
+
+ img {
+ width: 60px;
+ height: 60px;
+ }
+ }
+
+ .profile-information-block {
+ float: left;
+ margin-top: 8px;
+ margin-left: 10px;
+
+ .review-information {
+ margin-top: 3px;
+ color: #5E5E5E;
+
+ .star-icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+ }
+
+ .control {
+ height: 38px;
+ width: 60px;
+ text-align: center;
+ }
+ }
+
+ .product-info-bottom {
+ .product {
+ margin-top: 20px;
+ padding: 0;
+ border: 0;
+
+ .product-images-block {
+ width: 164px;
+ height: 164px;
+ overflow: hidden;
+ float: none;
+ display: inline-block;
+ vertical-align: middle;
+
+ .VueCarousel-wrapper {
+ border: 1px solid #E8E8E8;
+ position: relative;
+ }
+
+ .VueCarousel-pagination {
+ position: absolute;
+ top: 100px;
+ }
+
+ .product-image {
+ width: 100%;
+ height: 162px;
+ float: left;
+ overflow: hidden;
+ background: #F2F2F2;
+
+ img {
+ height: 100%;
+ }
+ }
+ }
+
+ .product-information-block {
+ // min-height: 162px;
+ float: none;
+ display: inline-block;
+ vertical-align: middle;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+.dashboard {
+
+ .page-header {
+ margin-bottom: 0 !important;
+ padding-bottom: 15px;
+ border-bottom: 1px solid $border-color;
+ }
+
+ .page-content {
+ margin-top: 15px;
+ }
+
+ .card {
+ height: 445px;
+ background: #FFFFFF;
+ border: 1px solid #E7E7E7;
+ border-radius: 2px;
+ padding: 10px 0px 0px 10px;
+
+ .card-title {
+ font-size: 14px;
+ color: #A2A2A2;
+ letter-spacing: -0.26px;
+ text-transform: uppercase;
+ }
+
+ .card-info {
+ width: 100%;
+ height: 100%;
+ display: inline-block;
+
+ &.center {
+ text-align: center;
+ }
+
+ ul {
+ li {
+ border-bottom: 1px solid $border-color;
+ width: 100%;
+ display: inline-block;
+ padding: 10px 0;
+ position: relative;
+
+ .image {
+ height: 60px;
+ width: 60px;
+ float: left;
+ margin-right: 15px;
+
+ &.product {
+ background: #F2F2F2;
+ }
+
+ img {
+ width: 100%;
+ }
+ }
+
+ .description {
+ margin-top: 10px;
+
+ .name {
+ color: #0041FF;
+ }
+
+ .info {
+ color: #3A3A3A;
+ margin-top: 5px;
+ }
+ }
+
+ .icon.angle-right-icon {
+ position: absolute;
+ right: 30px;
+ top: 50%;
+ margin-top: -8px;
+ }
+
+ &:last-child {
+ border-bottom: 0;
+ }
+ }
+ }
+
+ .no-result-found {
+ margin-top: 146px;
+
+ p {
+ margin: 0;
+ color: #A2A2A2;
+ }
+ }
+ }
+ }
+
+ .dashboard-stats {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(308px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 10px;
+ grid-row-gap: 5px;
+
+ .dashboard-card {
+ height: 100px;
+ background: #FFFFFF;
+ border: 1px solid #E7E7E7;
+ border-radius: 5px;
+ position: relative;
+ padding: 15px;
+
+
+ .title {
+ font-size: 14px;
+ color: #A2A2A2;
+ text-transform: uppercase;
+ }
+
+ .data {
+ padding-top: 3px;
+ font-size: 32px;
+ color: #0041FF;
+
+ .progress {
+ font-size: 14px;
+ color: #8E8E8E;
+ float: right;
+ margin-top: 9px;
+
+ .icon {
+ vertical-align: middle;
+ }
+ }
+ }
+ }
+ }
+
+ .graph-stats {
+ margin-top: 10px;
+ width: 100%;
+ display: inline-block;
+ }
+
+ .sale-stock {
+ width: 100%;
+ display: inline-block;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(308px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 10px;
+ grid-row-gap: 5px;
+ margin-top: 10px;
+ }
+}
+
+//responsive css for dashboard
+@media only screen and (max-width: 770px) {
+ .dashboard {
+ .card {
+ height: 100%;
+ }
+ }
+}
+
+.account-content .account-action .control-group.date {
+ width: 180px;
+ display: inline-block;
+ margin-bottom: 0;
+ margin-left: 20px;
+
+ .control {
+ width: 100%;
+ margin: 0;
+ }
+}
+
+.seller-central-container {
+ .banner-container {
+ position: relative;
+ margin-bottom: 75px;
+
+ img.banner {
+ width: 100%;
+ min-height: 500px;
+ max-height: 550px;
+ object-fit: cover;
+ }
+
+ .banner-content {
+ display: inline-block;
+ position: absolute;
+ width: 60%;
+ height: 60%;
+ padding: 45px;
+ top: 20%;
+ right: 20%;
+ background: rgba(255,255,255,0.55);
+ text-align: center;
+
+ h1 {
+ margin: 0;
+ font-size: 34px;
+ color: #000000;
+ }
+
+ p {
+ color: #000000;
+ margin: 20px 0;
+ }
+
+ .btn {
+ margin-top: 20px;
+ }
+ }
+ }
+
+ .feature-container {
+ margin-bottom: 80px;
+ text-align: center;
+
+ .feature-heading {
+ margin-bottom: 60px;
+
+ h2 {
+ font-size: 24px;
+ color: #242424;
+ }
+
+ p {
+ color: #5E5E5E;
+ max-width: 600px;
+ margin: auto;
+ }
+ }
+
+ .feature-list {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 65px;
+ grid-row-gap: 65px;
+
+ li {
+ img {
+
+ }
+
+ .feature-label {
+ color: #242424;
+ margin-top: 15px;
+ }
+ }
+ }
+ }
+
+ .popular-sellers-container {
+ margin-bottom: 80px;
+
+ .popular-sellers-heading {
+ font-size: 18px;
+ color: #242424;
+ text-transform: uppercase;
+ margin-bottom: 20px;
+ }
+
+ .popular-sellers-list {
+ .popular-seller-item {
+ width: 100%;
+ border: 1px solid #E8E8E8;
+ padding: 20px;
+ margin-bottom: 10px;
+ display: inline-block;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ .profile-information {
+ float: left;
+ margin-right: 40px;
+
+ .profile-logo-block {
+ width: 120px;
+ height: 120px;
+ float: left;
+ border-radius: 10px;
+ overflow: hidden;
+ }
+
+ .profile-information-block {
+ float: left;
+ margin-left: 20px;
+
+ .shop-title {
+ font-size: 24px;
+ display: block;
+ margin-bottom: 5px;
+ }
+
+ .social-links {
+ margin-top: 20px;
+ margin-left: -13px;
+ }
+
+ .btn {
+ margin-top: 20px;
+ }
+ }
+ }
+
+ .seller-products {
+ display: inline-block;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 10px;
+ grid-row-gap: 5px;
+
+ .seller-product-item {
+ background: #f2f2f2;
+
+ img {
+ width: 100%;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .setup-step-container {
+ text-align: center;
+ margin-bottom: 40px;
+
+ .setup-heading {
+ margin-bottom: 60px;
+
+ h2 {
+ font-size: 24px;
+ color: #242424;
+ }
+
+ p {
+ color: #5E5E5E;
+ max-width: 600px;
+ margin: auto;
+ }
+ }
+
+ .setup-step-list {
+ display: inline-block;
+ position: relative;
+ text-align: left;
+
+ &:before {
+ width: 2px;
+ height: 380px;
+ position: absolute;
+ content: "";
+ background-color: #E8E8E8;
+ z-index: -1;
+ left: 30px;
+ top: 5px;
+ }
+
+ li {
+ width: 100%;
+
+ .circle {
+ width: 64px;
+ height: 64px;
+ border: 1px solid #E8E8E8;
+ background: #ffffff;
+ line-height: 63px;
+ color: #5E5E5E;
+ display: inline-block;
+ border-radius: 50%;
+ margin-right: 20px;
+ margin-bottom: 25px;
+ text-align: center;
+ }
+
+ &.active {
+ color: #0041ff;
+ border-color: #0041ff;
+
+ .circle {
+ background: #0041ff;
+ color: #ffffff;
+ }
+ }
+ }
+ }
+ }
+
+ .open-shop-information-container {
+ width: 100%;
+ border: 1px solid #E8E8E8;
+ padding: 40px;
+ text-align: center;
+
+ p {
+ margin: 0;
+ margin-bottom: 40px;
+ color: #5E5E5E;
+ }
+ }
+}
+
+// responsive css for seller-center
+@media only screen and (max-width: 700px) {
+ .seller-profile-edit {
+ flex-direction: column;
+ height: 90px !important;
+ }
+
+ .account-content .account-layout {
+ width: 100%;
+ }
+}
+
+@media only screen and (max-width: 530px) {
+ .seller-profile-edit {
+ flex-direction: column;
+ height: 200px !important;
+
+ .account-action {
+ display: flex;
+ flex-direction: column;
+
+ .btn-lg {
+ margin-top: 10px;
+ text-align: center;
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 1140px) {
+ .seller-central-container {
+ .banner-container {
+ .banner-content {
+ p {
+ margin: 10px 0;
+ }
+
+ .btn {
+ margin-top: 10px;
+ }
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 775px) {
+ .seller-central-container {
+ .popular-sellers-container {
+ .popular-sellers-list {
+ .popular-seller-item {
+ display: flex;
+ flex-direction: column;
+
+ .profile-information {
+ float: none;
+ margin-left: auto;
+ margin-right: auto;
+ margin-bottom: 20px;
+ }
+ }
+ }
+ }
+
+ .banner-container {
+ .banner-content {
+ padding: 30px;
+
+ h1 {
+ font-size: 28px;
+ }
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 600px) {
+ .seller-central-container {
+ .banner-container {
+ .banner-content {
+ padding: 20px;
+ width: 65%;
+ height: 65%;
+ top: 17.5%;
+ right: 17.5%;
+
+ h1 {
+ font-size: 24px;
+ }
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 480px) {
+ .seller-central-container {
+ .about-marketplace-container {
+ div {
+ display: flex !important;
+ flex-direction: column !important;
+ width: 100% !important;
+ padding: 0px !important;
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 430px) {
+ .seller-central-container {
+ .banner-container {
+ .banner-content {
+ padding: 20px;
+ width: 70%;
+ height: 70%;
+ top: 15%;
+ right: 15%;
+
+ h1 {
+ font-size: 20px;
+ }
+ }
+ }
+ }
+}
+
+//control group resposive
+@media only screen and (max-width: 770px){
+ .control-group.date::after, .control-group.datetime::after {
+ position: absolute;
+ top: 33px;
+ right: 3px;
+ }
+}
+
+.filter-row-one .dropdown-filters {
+ position: relative;
+ right: 1px;
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/sass/icons.scss b/packages/Webkul/Marketplace/src/Resources/assets/sass/icons.scss
new file mode 100644
index 000000000..68553533b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/sass/icons.scss
@@ -0,0 +1,65 @@
+.social-icon {
+ width: 36px;
+ height: 36px;
+}
+
+.copy-icon {
+ background-image: url("../images/copy-icon.png");
+ width: 24px;
+ height: 24px;
+}
+
+.mp-facebook-icon {
+ background-image: url("../images/mp-facebook.svg");
+}
+
+.mp-twitter-icon {
+ background-image: url("../images/mp-twiter.svg");
+}
+
+.mp-instagram-icon {
+ background-image: url("../images/mp-instagram.svg");
+}
+
+.mp-pinterest-icon {
+ background-image: url("../images/mp-pinterest.svg");
+}
+
+.mp-skype-icon {
+ background-image: url("../images/mp-skype.svg");
+}
+
+.mp-linked-in-icon {
+ background-image: url("../images/mp-linked-in.svg");
+}
+
+.mp-youtube-icon {
+ background-image: url("../images/mp-youtube.svg");
+}
+
+.marketplace-icon {
+ width: 48px;
+ height: 48px;
+ display: inline-block;
+ background-size: cover;
+ background-image: url("../images/Icon-Marketplace.svg");
+}
+
+.active {
+ .marketplace-icon {
+ background-image: url("../images/Icon-Marketplace-Active.svg");
+ }
+
+ &.marketplace-icon {
+ background-image: url("../images/Icon-Marketplace-Active.svg");
+ }
+}
+
+.earnings::before {
+ content: '\1f4b5';
+}
+.navigation {
+ .customers::before{
+ content: "\E995";
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/sass/media.scss b/packages/Webkul/Marketplace/src/Resources/assets/sass/media.scss
new file mode 100644
index 000000000..1fdb835c4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/sass/media.scss
@@ -0,0 +1,431 @@
+@media only screen and (max-width: 1140px) {
+ .seller-central-container {
+ .banner-container {
+ .banner-content {
+ p {
+ margin: 10px 0;
+ }
+
+ .btn {
+ margin-top: 10px;
+ }
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 770px) {
+ .account-head {
+ .account-action {
+ margin: 4px !important;
+ margin-right: 0px !important;
+ position: unset;
+
+ .control-group.date {
+ width: 49% !important;
+ margin-left: 0px !important;
+ }
+
+ .control-group.date::after,
+ .control-group.datetime::after {
+ position: initial !important;
+ }
+ }
+ }
+
+ .table {
+ .grid-container {
+ margin-top: 10px;
+
+ .filter-row-one {
+ display: block;
+ }
+ }
+ }
+
+ .dropdown-list.top-right {
+ bottom: auto;
+ right: auto;
+ }
+
+ .dropdown-filters {
+ margin-top: 10px;
+ }
+
+ .profile-container {
+ flex-direction: column;
+
+ .profile-top-block {
+ display: flex;
+ flex-direction: column;
+
+ .review-information {
+ text-align: left;
+ }
+ }
+
+ .profile-left-block {
+ width: 80%;
+ margin-right: auto;
+ margin-left: auto;
+ }
+
+ .profile-right-block {
+ width: 100%;
+ padding-left: 0px;
+ margin-top: 20px;
+ }
+ }
+
+ .dashboard {
+ .card {
+ height: 100%;
+ }
+ }
+
+ .profile-details {
+ flex-direction: block;
+
+ .profile-details-left-block {
+ width: 100%;
+ padding-right: 0px;
+ }
+
+ .profile-details-right-block {
+ width: 100%;
+ padding-left: 0px;
+ margin-top: 10px;
+ }
+ }
+
+ .seller-central-container {
+ .popular-sellers-container {
+ .popular-sellers-list {
+ .popular-seller-item {
+ display: flex;
+ flex-direction: column;
+
+ .profile-information {
+ float: none;
+ margin-left: auto;
+ margin-right: auto;
+ margin-bottom: 20px;
+ }
+ }
+ }
+ }
+
+ .banner-container {
+ .banner-content {
+ padding: 30px;
+
+ h1 {
+ font-size: 28px;
+ }
+ }
+ }
+ }
+
+ .control-group.date::after,
+ .control-group.datetime::after {
+ position: absolute;
+ top: 33px;
+ right: 3px;
+ }
+
+ .seller-profile-edit {
+ flex-direction: column;
+ height: 90px !important;
+ }
+
+ .account-content .account-layout {
+ width: 100%;
+ }
+}
+
+
+
+@media only screen and (max-width: 600px) {
+ .seller-central-container {
+ .banner-container {
+ .banner-content {
+ padding: 20px;
+ width: 65%;
+ height: 65%;
+ top: 17.5%;
+ right: 17.5%;
+
+ h1 {
+ font-size: 24px;
+ }
+ }
+ }
+ }
+}
+
+@media only screen and (max-width: 530px) {
+ .seller-profile-edit {
+ flex-direction: column;
+ height: 200px !important;
+
+ .account-action {
+ display: flex;
+ flex-direction: column;
+
+ a {
+ &.theme-btn {
+ margin-bottom: 3px;
+ z-index: 0;
+ }
+ }
+
+ button {
+ &.theme-btn {
+ z-index: 0;
+ }
+ }
+
+
+ .btn-lg {
+ margin-top: 10px;
+ text-align: center;
+ }
+ }
+ }
+
+ .velocity-popular-sellers-container {
+
+ .wrapper {
+ width: 100%;
+ }
+ }
+
+ table {
+ td {
+ display: block !important;
+ }
+ }
+
+}
+
+@media only screen and (max-width: 480px) {
+ .seller-central-container {
+ .about-marketplace-container {
+ div {
+ display: flex !important;
+ flex-direction: column !important;
+ width: 100% !important;
+ padding: 0px !important;
+ }
+ }
+ }
+
+ .velocity-popular-sellers-container .wrapper {
+ width: 100% ;
+
+ .profile-image img {
+ margin: 76px 0px 0px 62px !important;
+ }
+
+ .profile-upper-layout-2 {
+
+ .profile-image img {
+ margin: unset !important;
+ }
+ }
+ }
+
+ .velocity-card-layout-2 {
+ grid-template-columns: auto !important;
+ justify-items: center;
+
+ .center-info {
+ text-align: center !important;
+ }
+ }
+
+ .seller-central-container {
+ .banner-container.layout2 {
+ max-height: unset;
+
+ .banner-content-layout-2 {
+ h1{
+ font-size: 40px;
+ line-height: 45px;
+ }
+ p{
+ font-size: 16px;
+ line-height: 20px;
+ }
+ }
+ }
+ .seller-registration-form {
+ width: 100%;
+ margin-bottom: 15px;
+
+ .VueCarousel-navigation {
+ width: auto !important;
+ }
+ }
+
+ .sell-products {
+
+ .selling-header {
+ h3 {
+ font-size: 22px;
+ line-height: 24px;
+ }
+ }
+ .sell-steps {
+ grid-template-columns: 0.1fr 0.9fr;
+
+ .sell-image {
+ width: 100%;
+ height: 100%;
+ }
+
+ .step {
+ .step-bar {
+ height: 140px;
+ margin-left: 45.5px;
+ }
+
+ .step-number {
+ margin-left: 20px;
+ }
+ }
+ }
+ .sell-content {
+ grid-column-start: 1;
+ grid-column-end: 3;
+
+ h4 {
+ font-size: 22px;
+ line-height: 24px;
+ }
+ p {
+ font-size: 16px;
+ line-height: 24px;
+ }
+ }
+ }
+
+ .feature-list-layout-2 {
+ .feature-list-li-layout-2 {
+ grid-template-columns: auto !important;
+ justify-items: center;
+
+ .feature-label {
+ text-align: center!important;
+ }
+ }
+ }
+
+ .query-section {
+ width: 90%;
+ margin: auto;
+ height: auto;
+
+ .query-container.container {
+ width: 100%;
+ height: auto;
+ padding-bottom: 45px;
+ grid-template-columns: auto auto;
+
+ h3 {
+ font-size: 16px !important;
+ line-height: 20px !important;
+ }
+ p{
+ font-size: 12px !important;
+ }
+
+ .query-button {
+ grid-column-start: 2;
+ }
+ }
+
+ }
+
+ .banner-container-layout-3 {
+ height: 300px;
+
+ .banner-content {
+ width: 55%;
+ left: 15px;
+ top: 50px;
+ padding-right: 15px;
+
+ h1 {
+ font-size: 22px;
+ line-height: 25px;
+ }
+ p{
+ font-size: 16px;
+ line-height: 20px;
+ }
+ }
+
+ .banner-image {
+ right: 15px;
+ width: 40%;
+ top: 50px;
+ }
+ .account-action {
+ a {
+ height: 42px !important;
+ width: 140px !important;
+ font-size: 16px !important;
+ line-height: 20px !important;
+ }
+ }
+ }
+
+ .feature-container.container.layout-3 {
+ h2,h5 {
+ font-size: 22px;
+ line-height: 25px;
+ }
+ p{
+ font-size: 16px;
+ }
+
+ .feature-list-layout-3 {
+
+ .card {
+ width: 100%;
+ margin-bottom: 30px;
+
+ .card-title {
+ font-size: 22px;
+ line-height: 25px;
+ }
+
+ .card-text {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ }
+ }
+ }
+ }
+
+}
+
+@media only screen and (max-width: 430px) {
+ .seller-central-container {
+ .banner-container {
+ .banner-content {
+ padding: 20px;
+ width: 70%;
+ height: 70%;
+ top: 15%;
+ right: 15%;
+
+ h1 {
+ font-size: 20px;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/assets/sass/velocity.scss b/packages/Webkul/Marketplace/src/Resources/assets/sass/velocity.scss
new file mode 100644
index 000000000..b6f4c5fdb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/assets/sass/velocity.scss
@@ -0,0 +1,2495 @@
+@import "icons";
+@import "variables";
+@import "../../../../../Velocity/src/Resources/assets/sass/main/variables";
+@import "../../../../../Velocity/src/Resources/assets/sass/components/shared.scss";
+@import "../../../../../Velocity/src/Resources/assets/sass/main/rango.scss";
+
+
+.account-head {
+ .account-action {
+ top: -20px;
+ float: right;
+ }
+}
+
+.cross-icon:hover {
+ cursor: pointer;
+}
+
+span.trash-icon:hover {
+ cursor: pointer;
+}
+
+// .modal-container {
+// top: 40px;
+// }
+
+//responsive css for account action and for table
+
+
+
+.profile-container {
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ margin-top: 30px;
+ // margin-bottom: 80px;
+
+ .profile-top-block {
+ width: 100%;
+
+ .profile-information {
+ float: left;
+
+ .profile-logo-block {
+ width: 120px;
+ height: 120px;
+ float: left;
+ border-radius: 10px;
+ overflow: hidden;
+
+ img {
+ width: 120px;
+ height: 120px;
+ }
+ }
+
+ .profile-information-block {
+ float: left;
+ margin-top: 32px;
+ margin-left: 20px;
+
+ .shop-title {
+ font-size: 24px;
+ display: block !important;
+ margin-bottom: 5px;
+ }
+ }
+ }
+
+ .review-information {
+ float: right;
+ text-align: center;
+ padding-top: 25px;
+
+ .number {
+ font-size: 34px;
+ }
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+ }
+ }
+
+ .profile-left-block {
+ width: 22%;
+ float: left;
+ margin-top: 60px;
+ min-height: 1px;
+ text-align: center;
+ padding: 15px;
+
+ h2 {
+ &.shop-title {
+ margin-bottom: 5px !important;
+ }
+ }
+
+ a {
+ &.shop-title {
+ font-size: 24px;
+ color: #0031F0;
+ display: block !important;
+ margin-bottom: 5px;
+ }
+ }
+
+ .content {
+ position: relative;
+ border: 1px solid #E8E8E8;
+ padding: 20px;
+ padding-top: 80px;
+
+ .profile-logo-block {
+ width: 120px;
+ height: 120px;
+ border-radius: 10px;
+ overflow: hidden;
+ position: absolute;
+ top: -60px;
+ left: 50%;
+ margin-left: -60px;
+
+ img {
+ width: 120px;
+ height: 120px;
+ }
+ }
+
+ .profile-information-block {
+ .row {
+ margin-bottom: 20px;
+ display: block !important;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ &.social-links {
+ a {
+ display: inline-block;
+ }
+ }
+ }
+
+ h2 {
+ font-size: 24px;
+ margin: 0;
+ }
+
+ .review-info {
+ .number {
+ font-size: 34px;
+ }
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+ }
+ }
+ }
+
+ .seller-flag {
+ .modal-container {
+ text-align: left;
+ }
+ }
+ }
+
+ .profile-right-block {
+ width: 77.5%;
+ padding: 15px;
+ display: block;
+
+ img {
+ height: 100%;
+ width: 100%;
+ max-height: 500px;
+ object-fit: cover;
+ }
+ }
+}
+
+
+.section {
+ .section-heading {
+ width: 100%;
+ text-transform: uppercase;
+ margin-bottom: 20px;
+ display: inline-block;
+
+ h2 {
+ font-size: 18px;
+ font-weight: 500;
+ float: left;
+ margin: 0;
+
+ .seperator {
+ position: absolute;
+ border-bottom: 1px solid #E8E8E8;
+ width: 50px;
+ margin-top: 20px;
+ }
+ }
+ }
+}
+
+.product-items {
+ margin-bottom: 40px;
+
+ .section-heading {
+ .btn {
+ float: right;
+ }
+ }
+}
+
+.profile-details {
+ width: 100%;
+ display: inline-block;
+ margin-bottom: 20px;
+
+ .profile-details-left-block {
+ width: 50%;
+ float: left;
+ padding-right: 15px;
+
+ .slider-container {
+ border: 5px solid blue;
+ padding: 25px 25px 0px 25px;
+ margin-bottom: 20px;
+ border: 1px solid #E8E8E8;
+ position: relative;
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+
+ .VueCarousel-inner {
+ margin-bottom: 20px;
+ }
+
+ .VueCarousel-pagination {
+ display: inline-block;
+
+ .VueCarousel-dot-container {
+ float: left;
+
+ .VueCarousel-dot {
+ margin-top: 0 !important;
+ }
+ }
+ }
+
+ a {
+ position: absolute;
+ right: 40px;
+ bottom: 14px;
+ }
+ }
+
+ .accordian-header {
+ padding: 10px 0;
+ border-bottom: 1px solid #CCCCCC !important;
+ }
+
+ .accordian-content {
+ padding: 20px 0;
+ }
+ }
+
+ .profile-details-right-block {
+ width: 50%;
+ float: left;
+ padding-left: 15px;
+ }
+}
+
+
+
+.stars {
+ .star {
+ font-size: 25px;
+ color: #d4d4d4;
+ transition: all .2s;
+ }
+
+ .star:before {
+ content: '\2605';
+ }
+}
+
+.control-group {
+ span.locale {
+ display: none;
+ }
+}
+
+.dropdown-list.product-search-list {
+ .dropdown-container {
+ max-height: 344px;
+
+ li {
+
+
+ img {
+ width: 52px;
+ height: 60px;
+ }
+ }
+
+ .table table {
+ border: 1px solid #CCCCCC;
+ }
+
+ tbody td {
+ vertical-align: middle;
+
+ &.last {
+ width: 140px;
+
+ a {
+ margin: 0;
+ }
+
+ .btn {
+ color: #fff;
+ }
+ }
+ }
+ }
+}
+
+.product-information {
+ .product-image {
+ max-height: 350px;
+ max-width: 280px;
+ margin-right: 20px;
+ float: left;
+ background: #F2F2F2;
+
+ img {
+ display: block;
+ width: 100%;
+ }
+ }
+
+ .product-details {
+ .product-name {
+ font-size: 24px;
+ }
+
+ .product-price {
+ font-size: 18px;
+ margin-top: 10px;
+ }
+
+ }
+
+}
+
+.report-section {
+ font-size: 14px;
+
+ .material-icons {
+ font-size: 16px;
+ position: absolute;
+ left: 0;
+ top: 2px;
+ }
+
+ .seller-logo {
+ text-align: center;
+
+ img {
+ display: inline-block;
+ width: 130px;
+ padding: 5px;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
+ position: relative;
+ font-size: 0px;
+ overflow: hidden;
+ vertical-align: middle;
+ }
+ }
+
+ .seller-flag-info {
+ .seller-store-name {
+ a {
+ color: #363636;
+ font-size: 25px;
+ }
+ }
+
+ .seller-location {
+ a {
+ display: inline-block;
+ position: relative;
+ font-weight: 600;
+ padding-left: 22px;
+ color: #555;
+ margin: 2px 0;
+ text-transform: capitalize;
+ }
+ }
+
+ .contact-seller {
+ padding: 2px 0;
+
+ a {
+ display: inline-block;
+ background: $light-link-color;
+ color: #fff;
+ padding: 3px 15px;
+ border-radius: 2px;
+ font-weight: 600;
+ text-align: center;
+ }
+ }
+
+ .report-flag {
+ display: inline-block;
+ padding-left: 22px;
+ position: relative;
+ }
+ }
+
+ .modal-container {
+ z-index: 1000;
+ }
+}
+
+.report-seller-products {
+ .seller-product-col-2 {
+ padding-left: 0px;
+ padding-right: 0px;
+
+ .seller-flag-product {
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
+ width: 84px;
+ height: 84px;
+ margin: 5px;
+ text-align: center;
+ border: 1px solid #ccc;
+
+ a {
+ span {
+ font-size: 1.0rem;
+ display: inline-block;
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+ }
+ }
+}
+
+.product-offer-container {
+ margin-bottom: 20px;
+ width: 100%;
+
+ .product {
+ width: 100%;
+ display: inline-block;
+ padding: 20px;
+ border-radius: 3px;
+ border: 1px solid #E8E8E8;
+
+ .product-information {
+ float: left;
+
+ .product-logo-block {
+ width: 162px;
+ height: 162px;
+ float: left;
+ overflow: hidden;
+ background: #F2F2F2;
+ border: 1px solid #E8E8E8;
+
+ img {
+ width: 160px;
+ height: 160px;
+ }
+ }
+
+ .product-information-block {
+ float: left;
+ margin-left: 20px;
+
+ .product-title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #242424;
+ display: block;
+ margin-bottom: 5px;
+ }
+
+ .price {
+ margin-top: 10px;
+
+ .product-price {
+ font-size: 24px;
+ }
+ }
+
+ .stock-status {
+ margin-bottom: 15px;
+ font-weight: 600;
+ color: #FC6868;
+
+ &.active {
+ color: #4CAF50;
+ }
+ }
+
+ .options {}
+ }
+ }
+
+ .review-information {
+ float: right;
+ text-align: center;
+
+ .stars {
+ vertical-align: top;
+ display: inline-block;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+
+ .total-reviews {
+ margin-top: 10px;
+ }
+ }
+ }
+
+ .seller-product-list {
+ width: 75%;
+
+ h2.heading {
+ margin-top: 30px;
+ }
+
+ .content {
+ .seller-product-item {
+ padding: 10px;
+ border-bottom: 1px solid #E8E8E8;
+
+ .product-info-top {
+ table tbody td {
+ vertical-align: middle;
+
+ &:first-child {
+ padding-left: 0;
+ }
+
+ &:last-child {
+ padding-right: 0;
+ }
+
+ .product-price {
+ span {
+ font-size: 20px;
+ }
+
+ .regular-price {
+ color: $font-light;
+ text-decoration: line-through;
+ margin-right: 10px;
+ }
+
+ .special-price {
+ color: $disc-price;
+ }
+ }
+
+ .control-group {
+ width: 60px;
+ display: inline-block;
+ float: left;
+ }
+
+ .btn.btn-black {
+ padding: 9px 20px;
+ margin-left: 10px;
+ float: left;
+ text-transform: uppercase;
+ }
+
+ .stock-status {
+ font-weight: 600;
+ color: #FC6868;
+ margin-left: 10px;
+ float: left;
+ padding: 9px 0px;
+ }
+ }
+
+ .profile-logo-block {
+ width: 60px;
+ height: 60px;
+ float: left;
+ border-radius: 5px;
+ overflow: hidden;
+
+ img {
+ width: 60px;
+ height: 60px;
+ }
+ }
+
+ .profile-information-block {
+ float: left;
+ margin-top: 8px;
+ margin-left: 10px;
+
+ .review-information {
+ margin-top: 3px;
+ color: #5E5E5E;
+
+ .star-icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
+ }
+
+ .control {
+ height: 38px;
+ width: 60px;
+ text-align: center;
+ }
+ }
+
+ .product-info-bottom {
+ .product {
+ margin-top: 20px;
+ padding: 0;
+ border: 0;
+
+ .product-images-block {
+ width: 164px;
+ height: 164px;
+ overflow: hidden;
+ float: none;
+ display: inline-block;
+ vertical-align: middle;
+
+ .VueCarousel-wrapper {
+ border: 1px solid #E8E8E8;
+ position: relative;
+ }
+
+ .VueCarousel-pagination {
+ position: absolute;
+ top: 100px;
+ }
+
+ .product-image {
+ width: 100%;
+ height: 162px;
+ float: left;
+ overflow: hidden;
+ background: #F2F2F2;
+
+ img {
+ height: 100%;
+ }
+ }
+ }
+
+ .product-information-block {
+ // min-height: 162px;
+ float: none;
+ display: inline-block;
+ vertical-align: middle;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+.dashboard {
+
+ .page-header {
+ margin-bottom: 0 !important;
+ padding-bottom: 15px;
+ border-bottom: 1px solid $border-color;
+ }
+
+ .page-content {
+ margin-top: 15px;
+ }
+
+ .card {
+ height: 445px;
+ background: #FFFFFF;
+ border: 1px solid #E7E7E7;
+ border-radius: 2px;
+ padding: 10px 0px 0px 10px;
+
+ .card-title {
+ font-size: 14px;
+ color: #A2A2A2;
+ letter-spacing: -0.26px;
+ text-transform: uppercase;
+ }
+
+ .card-info {
+ width: 100%;
+ height: 100%;
+ display: inline-block;
+
+ a {
+ display: block !important;
+ }
+
+ &.center {
+ text-align: center;
+ }
+
+ ul {
+ li {
+ border-bottom: 1px solid $border-color;
+ width: 100%;
+ display: inline-block;
+ padding: 10px 0;
+ position: relative;
+
+ .image {
+ height: 60px;
+ width: 60px;
+ float: left;
+ margin-right: 15px;
+
+ &.product {
+ background: #F2F2F2;
+ }
+
+ img {
+ width: 100%;
+ }
+ }
+
+ .description {
+ margin-top: 10px;
+
+ .name {
+ color: #0041FF;
+ }
+
+ .info {
+ color: #3A3A3A;
+ margin-top: 5px;
+ }
+ }
+
+ .icon.angle-right-icon {
+ position: absolute;
+ right: 30px;
+ top: 50%;
+ margin-top: -8px;
+ }
+
+ &:last-child {
+ border-bottom: 0;
+ }
+ }
+ }
+
+ .no-result-found {
+ margin-top: 146px;
+
+ p {
+ margin: 0;
+ color: #A2A2A2;
+ }
+ }
+ }
+ }
+
+ .dashboard-stats {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(308px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 10px;
+ grid-row-gap: 5px;
+
+ .dashboard-card {
+ height: 100px;
+ background: #FFFFFF;
+ border: 1px solid #E7E7E7;
+ border-radius: 5px;
+ position: relative;
+ padding: 15px;
+
+
+ .title {
+ font-size: 14px;
+ color: #A2A2A2;
+ text-transform: uppercase;
+ }
+
+ .data {
+ padding-top: 3px;
+ font-size: 32px;
+ color: #0041FF;
+
+ .progress {
+ font-size: 14px;
+ height: 2rem !important;
+ color: #8E8E8E;
+ float: right;
+ margin-top: 9px;
+
+ .icon {
+ vertical-align: middle;
+ }
+ }
+ }
+ }
+ }
+
+ .graph-stats {
+ margin-top: 10px;
+ width: 100%;
+ display: inline-block;
+ }
+
+ .sale-stock {
+ width: 100%;
+ display: inline-block;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(308px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 10px;
+ grid-row-gap: 5px;
+ margin-top: 10px;
+ }
+}
+
+.customer-reviews {
+ overflow: hidden !important;
+}
+
+.modal-container {
+ z-index: 999999 !important;
+}
+
+.align-vertical-top {
+ vertical-align: text-bottom !important;
+}
+
+.product-price {
+ height: 25px !important;
+}
+
+#mastercheckbox {
+ .checkbox {
+ input[type=checkbox] {
+ width: 90% !important;
+ }
+ }
+}
+
+.account-content .account-action .control-group.date {
+ width: 180px;
+ display: inline-block;
+ margin-bottom: 0;
+ margin-left: 20px;
+
+ .control {
+ width: 100%;
+ margin: 0;
+ }
+}
+
+.seller-central-container {
+ .banner-container {
+ position: relative;
+ margin-bottom: 75px;
+
+ img.banner {
+ width: 100%;
+ min-height: 500px;
+ max-height: 550px;
+ object-fit: cover;
+ }
+
+ .banner-content {
+ display: inline-block;
+ position: absolute;
+ width: 60%;
+ height: 60%;
+ padding: 45px;
+ top: 20%;
+ right: 20%;
+ background: rgba(255, 255, 255, 0.55);
+ text-align: center;
+
+ h1 {
+ margin: 0;
+ font-size: 34px;
+ color: #000000;
+ }
+
+ p {
+ color: #000000;
+ margin: 20px 0;
+ }
+
+ .btn {
+ margin-top: 20px;
+ }
+ }
+ }
+
+ .banner-container.layout2 {
+ position: relative;
+ background-color: #21A179;
+ ;
+ width: 100%;
+ min-height: 500px;
+ max-height: 550px;
+
+ .banner-content-layout-2 {
+ margin-left: 10%;
+ margin-top: 15%;
+ padding-right: 15%;
+ text-align: left;
+
+ h1 {
+ color: $white-color;
+ font-family: Source Sans Pro;
+ font-size: 50px;
+ font-style: normal;
+ font-weight: 700;
+ line-height: 63px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ p {
+ color: $white-color;
+ margin: 20px 0;
+ font-family: Source Sans Pro;
+ font-size: 24px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 30px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ }
+ }
+
+ .banner-container-layout-3 {
+ height: 550px;
+ width: 100%;
+ border-radius: 0px;
+ background-color: #F3F3F3;
+ position: relative;
+
+ .banner-image {
+ position: absolute;
+ right: 76px;
+ top: 31px;
+ }
+
+ .banner-content {
+ position: absolute;
+ left: 130px;
+ top: 144px;
+ width: 485px;
+
+ h1 {
+ font-family: Source Sans Pro;
+ font-size: 50px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 63px;
+ letter-spacing: 0px;
+ text-align: left;
+ }
+
+ p {
+ font-family: Source Sans Pro;
+ font-size: 23px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 29px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ .account-action {
+ a {
+ height: 47px;
+ width: 163px;
+ border-radius: 0px;
+ font-family: Source Sans Pro;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 23px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+ }
+ }
+ }
+
+ .sell-products {
+ .selling-header h3 {
+ font-family: Source Sans Pro;
+ font-size: 32px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 40px;
+ letter-spacing: 0px;
+ text-align: left;
+ margin-left: 5%;
+ margin-bottom: 72px;
+
+ }
+
+ .sell-steps {
+ display: grid;
+ grid-template-columns: 0.1fr 0.25fr 0.65fr;
+ column-gap: 40px;
+ margin-bottom: 60px;
+ }
+
+ .step-number {
+ height: 49px;
+ width: 49px;
+ border-radius: 0px;
+ background: #4D7EA8;
+ border-radius: 50%;
+ position: relative;
+ margin-left: 58px;
+ margin-bottom: 14px;
+
+ p {
+ font-family: Source Sans Pro;
+ font-size: 32px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 40px;
+ letter-spacing: 0px;
+ text-align: center;
+ color: $white-color;
+
+ }
+
+ }
+
+ .step-bar {
+ height: 237px;
+ width: 4px;
+ top: 937px;
+ border-radius: 14px;
+ background: #21A179;
+ margin-left: 83.5px;
+ }
+
+ .sell-image {
+
+ height: 300px;
+ width: 330px;
+ border-radius: 24px;
+ // margin-left: 43.5px;
+
+ img {
+ height: 100%;
+ border-radius: 24px;
+ }
+ }
+
+ .sell-content {
+ margin-top: 17.6%;
+ margin-left: 30px;
+
+ p {
+ font-family: Source Sans Pro;
+ font-size: 24px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 30px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ h4 {
+ font-family: Source Sans Pro;
+ font-size: 28px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 35px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+ }
+ }
+
+ .feature-container {
+ margin-bottom: 80px;
+ text-align: center;
+
+ .container {
+ padding-right: 5%;
+ padding-left: 5%;
+ }
+
+ .feature-list-layout-2 {
+
+ .feature-list-li-layout-2 {
+ display: grid;
+ grid-template-columns: 0.25fr 0.75fr;
+ margin-bottom: 40px;
+
+ .feature-label {
+ font-family: Source Sans Pro;
+ font-size: 28px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 35px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ ul li {
+
+ // list-style: none;
+ p {
+ font-family: Source Sans Pro;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 30px;
+ letter-spacing: 0px;
+ text-align: left;
+ margin: 0;
+
+ }
+ }
+ }
+ }
+
+ .feature-list-layout-3 {
+ .card {
+ margin: auto;
+ background: #FFFFFF;
+ border: 1px solid #C8C8C8;
+ box-sizing: border-box;
+ border-radius: 8px;
+ width: 360px;
+ padding-top: 36px;
+ padding-bottom: 36px;
+
+ img {
+ height: 94px;
+ width: 94px;
+ border-radius: 0px;
+ margin: auto;
+ }
+
+ .card-body {
+ p {
+ margin-bottom: 0;
+ }
+ }
+
+ .card-title {
+ font-family: Source Sans Pro;
+ font-size: 28px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 35px;
+ letter-spacing: 0px;
+ text-align: center;
+
+ }
+
+ .card-text {
+ font-family: Source Sans Pro;
+ font-size: 24px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 30px;
+ letter-spacing: 0px;
+ text-align: center;
+ color: #333333;
+
+
+ }
+ }
+ }
+
+ .feature-heading {
+ margin-bottom: 60px;
+
+ h2 {
+ font-size: 24px;
+ color: #242424;
+ }
+
+ p {
+ color: #5E5E5E;
+ max-width: 600px;
+ margin: auto;
+ }
+ }
+
+ .feature-list {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
+ grid-auto-rows: auto;
+ grid-column-gap: 65px;
+ grid-row-gap: 65px;
+
+ li {
+ img {}
+
+ .feature-label {
+ color: #242424;
+ margin-top: 15px;
+ }
+ }
+ }
+ }
+
+ .velocity-card-layout-2 {
+ display: grid;
+ grid-template-columns: 0.30fr auto;
+ column-gap: 12px;
+
+ .profile-image {
+ width: 100px;
+ height: 100px;
+ border-radius: 50%;
+
+ img {
+ border-radius: 50%;
+ }
+ }
+
+ .center-info {
+ font-family: Source Sans Pro;
+ font-size: 24px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 30px;
+ letter-spacing: 0px;
+ text-align: left;
+ display: grid;
+
+ a {
+ margin-top: 12px;
+ }
+
+ .shop-address {
+ font-family: Source Sans Pro;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 23px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ }
+
+ .review-info {
+ display: inline-flex;
+
+ .number {
+ font-family: Source Sans Pro;
+ font-size: 24px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 30px;
+ letter-spacing: 0px;
+ text-align: left;
+ margin-right: 6.5px;
+
+ }
+ }
+ }
+
+ .feature-container.layout-3 {
+ margin-top: 80px;
+
+ .feature-heading {
+ h2 {
+ font-family: Source Sans Pro;
+ font-size: 32px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 40px;
+ letter-spacing: 0px;
+ text-align: center;
+
+ }
+
+ p {
+ font-family: Source Sans Pro;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 23px;
+ letter-spacing: 0px;
+ text-align: center;
+ color: #000000D4;
+
+ }
+ }
+ }
+
+ .query-section.layout-3 {
+ background-color: #ffffff;
+ border: 1px solid #C8C8C8;
+ height: 260px;
+ }
+
+ .query-section {
+ margin-top: 82px;
+ margin-bottom: 82px;
+ background-color: #E8E8E8;
+ border-radius: 8px;
+ height: 189px;
+ width: 1075px;
+ margin-left: 127px;
+
+ .query-container.container {
+ display: grid;
+ grid-template-columns: auto auto auto;
+ column-gap: 30px;
+ width: 700px;
+ height: 114px;
+ padding-top: 38px;
+
+ button {
+ height: 36px;
+ width: 143px;
+ border-radius: 0px;
+ font-family: Source Sans Pro;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 20px;
+ margin-top: 35px;
+ letter-spacing: 0px;
+ text-align: center;
+
+ }
+
+ .query-content {
+ h3 {
+ font-family: Source Sans Pro;
+ font-size: 32px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 40px;
+ letter-spacing: 0px;
+ text-align: left;
+ }
+
+ p {
+ font-family: Source Sans Pro;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 23px;
+ letter-spacing: 0px;
+ margin: 0;
+ }
+
+ ul {
+ margin-left: 18px;
+ }
+ }
+
+
+ }
+ }
+
+ .setup-step-container {
+ text-align: center;
+ margin-bottom: 40px;
+
+ .setup-heading {
+ margin-bottom: 60px;
+
+ h2 {
+ font-size: 24px;
+ color: #242424;
+ }
+
+ p {
+ color: #5E5E5E;
+ max-width: 600px;
+ margin: auto;
+ }
+ }
+
+ .setup-step-list {
+ display: inline-block;
+ position: relative;
+ text-align: left;
+
+ &:before {
+ width: 2px;
+ height: 380px;
+ position: absolute;
+ content: "";
+ background-color: #E8E8E8;
+ z-index: -1;
+ left: 30px;
+ top: 5px;
+ }
+
+ li {
+ width: 100%;
+
+ .circle {
+ width: 64px;
+ height: 64px;
+ border: 1px solid #E8E8E8;
+ background: #ffffff;
+ line-height: 63px;
+ color: #5E5E5E;
+ display: inline-block;
+ border-radius: 50%;
+ margin-right: 20px;
+ margin-bottom: 25px;
+ text-align: center;
+ }
+
+ &.active {
+ color: #0041ff;
+ border-color: #0041ff;
+
+ .circle {
+ background: #0041ff;
+ color: #ffffff;
+ }
+ }
+ }
+ }
+ }
+
+ .open-shop-information-container {
+ width: 100%;
+ border: 1px solid #E8E8E8;
+ padding: 40px;
+ text-align: center;
+
+ p {
+ margin: 0;
+ margin-bottom: 40px;
+ color: #5E5E5E;
+ }
+ }
+
+ .seller-registration-form {
+ background: rgba(255, 255, 255, 0.9);
+ border: 1px solid #FFFFFF;
+ box-sizing: border-box;
+ border-radius: 16px;
+ padding: 45px;
+ margin-top: 69px;
+ width: 570px;
+ height: 400px;
+ position: relative;
+
+ .VueCarousel {
+ height: 75%;
+
+ .VueCarousel-navigation {
+ position: absolute !important;
+ left: 144px;
+ bottom: 40px;
+ width: 192px;
+
+ .VueCarousel-navigation-prev {
+ height: 36px;
+ width: 143px;
+ border-radius: 0px;
+ background-color: #26A37C;
+ color: $white-color;
+ // margin-left: 45px;
+ // display: none;
+
+ }
+
+ .VueCarousel-navigation-next {
+ height: 36px;
+ width: 143px;
+ border-radius: 0px;
+ background-color: #26A37C;
+ color: $white-color;
+ // margin-right: 45px;
+
+ }
+ }
+ }
+
+ .registration-btn {
+ height: 0px;
+ width: 143px;
+ border-radius: 0px;
+ background-color: #26A37C;
+ color: $white-color;
+ // margin-right: 45px;
+ border: none;
+ position: absolute;
+ right: 44px;
+ bottom: 57px;
+ // display: none;
+
+ }
+
+ .reg-heading {
+ h3 {
+ font-family: Source Sans Pro;
+ font-size: 32px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 40px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+
+ p {
+ font-family: Source Sans Pro;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 23px;
+ letter-spacing: 0px;
+ text-align: left;
+
+ }
+ }
+ }
+}
+
+.filter-row-one .dropdown-filters {
+ position: relative;
+ right: 1px;
+}
+
+//started
+
+//sell page
+.setup-step-container {
+ text-align: center;
+ margin-bottom: 40px;
+
+ .setup-heading {
+ margin-bottom: 60px;
+
+ h2 {
+ font-size: 24px;
+ color: #242424;
+ }
+
+ p {
+ color: #5E5E5E;
+ max-width: 600px;
+ margin: auto;
+ }
+ }
+
+ .velocity-setup-step-list {
+ position: relative;
+
+ &:before {
+ width: 2px;
+ height: 380px;
+ position: absolute;
+ content: "";
+ background-color: #E8E8E8;
+ z-index: -1;
+ left: 30px;
+ top: 5px;
+ }
+
+ li {
+ list-style-type: none;
+ display: inline-block;
+ padding: 10px;
+
+ img {
+ width: 70px;
+ text-align: center;
+ height: 70px;
+ }
+
+ span {
+ display: block;
+ }
+ }
+ }
+}
+
+.velocity-popular-sellers-container {
+
+ .popular-sellers-heading {
+ font-size: 22px;
+ text-align: center;
+ color: #242424;
+ text-transform: uppercase;
+ margin-bottom: 20px;
+ }
+
+ .wrapper {
+ width: 50%;
+ height: auto;
+ padding: 15px 100px 0px 100px;
+ display: inline-block;
+
+ .velocity-card {
+ border: 1px solid #dfe3e7;
+
+ .profile-upper {
+ background-color: #dfe3e7;
+ width: 100%;
+ height: 100px;
+ }
+
+ .profile-image {
+
+ img {
+ background-color: #dfe3e7;
+ width: 50px;
+ height: 50px;
+ border-radius: 32px;
+ margin: 76px 0px 0px 193px;
+ }
+ }
+
+ .profile-information {
+ width: 100%;
+ height: 150px;
+
+ .center-info {
+ padding: 45px;
+ text-align: center;
+
+ .shop-address {
+ display: block !important;
+ }
+ }
+ }
+ }
+ }
+}
+
+//other pages
+// .velocity-profile-left-block {
+// width: 25%;
+// float: left;
+// margin-top: 60px;
+// min-height: 1px;
+// text-align: center;
+
+// h2 {
+// &.shop-title {
+// margin-bottom: 5px !important;
+// }
+// }
+
+// a {
+// &.shop-title {
+// font-size: 24px;
+// color: #0031F0;
+// display: block !important;
+// margin-bottom: 5px;
+// }
+// }
+
+// .content {
+// position: relative;
+// border: 1px solid #E8E8E8;
+// padding: 20px;
+// padding-top: 80px;
+
+// .profile-logo-block {
+// width: 120px;
+// height: 120px;
+// border-radius: 10px;
+// overflow: hidden;
+// position: absolute;
+// top: 3px;
+// left: 50%;
+// margin-left: -60px;
+
+// img {
+// width: 99px;
+// height: 100px;
+// }
+// }
+
+// .profile-information-block {
+// padding-top: 25px;
+
+// .row {
+// margin-bottom: 20px;
+// display: block !important;
+
+// &.social-links {
+// a {
+// display: inline-block;
+// }
+// }
+// }
+
+// h2 {
+// font-size: 24px;
+// margin: 0;
+// }
+
+// .review-info {
+// .number {
+// font-size: 34px;
+// }
+
+// .stars {
+// vertical-align: top;
+// display: inline-block;
+
+// .icon {
+// width: 16px;
+// height: 16px;
+// }
+// }
+// }
+// }
+// }
+// }
+
+.review-form {
+ display: inline-block;
+ margin-left: 50px;
+
+ .line-bar {
+ height: 4px;
+ width: calc(100% - 100px);
+ margin-right: 5px;
+ margin-left: 5px;
+ background: #D8D8D8;
+ }
+
+ .heading {
+ font-size: 20px;
+
+ a {
+ &.right {
+ float: right;
+ }
+ }
+ }
+
+ .ratings-reviews {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .left-side {
+ // border: 1px solid green;
+ padding: 40px 20px 40px 20px;
+ width: 50%;
+
+ .rate {
+ display: block;
+ margin-left: 47px;
+ }
+ }
+
+ .right-side {
+ // border: 1px solid blue;
+ width: 50%;
+
+ .rater {
+ display: inline-flex;
+ align-items: center;
+ padding-top: 5px;
+ width: 100%;
+ }
+ }
+ }
+}
+
+
+
+div {
+ &.boolean {
+ label {
+ display: block;
+ }
+ }
+
+ label {
+ &.btn {
+ @extend .theme-btn;
+ padding: 5px 15px;
+ }
+ }
+}
+
+i {
+ &.icon {
+ @extend .rango-default;
+
+ font-size: 18px;
+ padding-right: 5px;
+
+ &.seller::before {
+ content: "\E995";
+ }
+
+ &.products::before {
+ content: "\E962";
+ }
+
+ &.transactions::before {
+ content: "\e92a";
+ }
+
+ &.dashboard::before {
+ content: "\e971";
+ }
+ }
+}
+
+.accordian {
+ border-bottom: 1px solid #CCCCCC;
+}
+
+.account-content {
+ .sidebar {
+ float: left;
+ z-index: 99;
+ border-right: 1px solid $border-general;
+
+ .customer-sidebar {
+ border-right: unset;
+
+ .account-details {
+ text-align: center;
+ padding: 25px 20px;
+
+ .customer-name {
+ width: 60px;
+ height: 60px;
+ margin: 0 auto;
+ font-size: 24px;
+ margin-bottom: 5px;
+ display: inline-block;
+ }
+
+ .customer-name-text {
+ color: $font-color;
+ }
+
+ .customer-email {
+ color: $grey-color;
+ }
+ }
+
+ .navigation {
+ width: 100%;
+
+ li {
+ width: 100%;
+
+ &:hover,
+ &.active {
+ color: $light-link-color;
+ background-color: $border-light;
+ }
+
+ i {
+ &.icon {
+ @extend .rango-default;
+
+ font-size: 18px;
+ padding-right: 5px;
+
+ &.profile::before {
+ content: "\E995";
+ }
+
+ &.address::before {
+ content: "\e949";
+ }
+
+ &.reviews::before {
+ content: "\e97d";
+ }
+
+ &.wishlist::before {
+ content: "\e93e";
+ }
+
+ &.orders::before {
+ content: "\e931";
+ }
+
+ &.downloadables::before {
+ content: "\e926";
+ }
+
+ &.compare::before {
+ content: "\e93b";
+ }
+ }
+ }
+
+ a {
+ padding: 10px 15px;
+ text-decoration: none;
+ color: black;
+ }
+ }
+
+ li:last-child {
+ margin-bottom: 0;
+ }
+ }
+ }
+ }
+}
+
+.action {
+ a {
+ display: inline-block !important;
+ }
+}
+
+span {
+ i {
+ &.icon {
+ display: inline-block;
+ background-size: cover;
+
+ &.cross-icon {
+ background-image: url("../images/Icon-remove.svg");
+ width: 18px;
+ height: 18px;
+ }
+
+ &.cross-icon :hover {
+ cursor: pointer;
+ }
+ }
+ }
+
+
+
+ &.icon {
+ display: inline-block;
+ background-size: cover;
+ }
+
+ &.trash-icon {
+ background-image: url("../images/Icon-Trash.svg");
+ width: 24px;
+ height: 24px;
+ }
+
+ &.pencil-lg-icon {
+ background-image: url("../images/Icon-Pencil-Large.svg");
+ width: 24px;
+ height: 24px;
+ }
+
+ .remove-icon {
+ background-image: url("../images/Icon-remove.svg");
+ width: 24px;
+ height: 24px;
+ }
+}
+
+
+
+
+i {
+ &.icon {
+ display: inline-block;
+ background-size: cover;
+
+ &.remove-icon {
+ background-image: url("../images/Icon-remove.svg") !important;
+ width: 24px;
+ height: 24px;
+ margin-right: -109px;
+ }
+ }
+}
+
+.table {
+ table {
+ width: 100% !important;
+ }
+}
+
+div {
+ &.btn-group {
+
+ &.full-width {
+ display: inline-flex !important;
+ }
+ }
+}
+
+section {
+ &.review {
+ &.review-layouter {
+ &.review-form {
+ margin-left: 0px;
+ margin-right: 20px;
+
+ .heading .right {
+ float: left;
+ }
+
+ .ratings-reviews .right-side .rater {
+ .star-name {
+ margin-right: 0px;
+ margin-left: 5px;
+ }
+ }
+ }
+ }
+ }
+}
+
+.menu-block-title {
+ padding-bottom: 10px;
+ font-size: 20px;
+ margin-left: 30px;
+}
+
+nav {
+ div.col-sm-6 {
+ &:last-child {
+ display: inline-flex !important;
+ justify-content: flex-end;
+ }
+
+ .mp-sell-header-ul {
+ margin: 0;
+ width: 50%;
+ }
+
+ .mp-sell-header-li {
+ cursor: pointer;
+ float: right;
+ text-align: right;
+ padding: 5px 0 0 0;
+ font-weight: 700;
+ font-size: 16px;
+ margin: 2px 15px 0 0;
+ }
+ }
+
+ ul {
+ display: inline;
+
+ li {
+ &.sell-button {
+ margin-left: 400px;
+ display: inline-block;
+ padding-right: 10px;
+ padding-top: 6px;
+ font-size: 16px;
+
+ a {
+ text-decoration: none;
+ color: black;
+ margin-top: 4px;
+ }
+ }
+ }
+ }
+
+ .dropdown {
+ float: right;
+ }
+}
+
+// li {
+// a {
+// // display: inline-block !important;
+// }
+// }
+
+.accordian-content {
+ td {
+ span {
+ &.label {
+ border: 1px solid #E7E7E7;
+ background: #E7E7E7;
+ border-radius: 2px;
+ padding: 6px;
+ color: #000311;
+ display: inline-block;
+ font-size: small;
+ }
+ }
+ }
+}
+
+// .form-group {
+// &.boolean {
+// border: 4px dashed red;
+// }
+// }
+.form-group {
+ textarea {
+ width: 100%;
+ resize: none;
+ padding: 5px 16px;
+
+ label {
+ border: 1px solid green;
+ display: block;
+ }
+ }
+
+ &.boolean {
+ label {
+ &.switch {
+ margin: 16px;
+ }
+ }
+ }
+
+ .switch {
+ position: relative;
+ display: inline-block;
+ width: 60px;
+ height: 34px;
+ margin-top: 10px;
+ margin-bottom: 5px;
+ }
+
+ .switch input {
+ opacity: 0;
+ width: 0;
+ height: 0;
+ }
+
+ .slider {
+ position: absolute;
+ cursor: pointer;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: #8e8e8e;
+ -webkit-transition: .2s;
+ transition: .2s;
+ }
+
+ .slider:before {
+ position: absolute;
+ content: "";
+ height: 26px;
+ width: 26px;
+ left: 4px;
+ bottom: 4px;
+ background-color: #ffffff;
+ -webkit-transition: .2s;
+ transition: .2s;
+ }
+
+ input:checked+.slider {
+ background-color: #0041FF;
+ }
+
+ input:focus+.slider {
+ box-shadow: 0 0 1px #0041FF;
+ }
+
+ input:checked+.slider:before {
+ -webkit-transform: translateX(26px);
+ -ms-transform: translateX(26px);
+ transform: translateX(26px);
+ }
+
+ /* Rounded sliders */
+ .slider.round {
+ border-radius: 34px;
+ }
+
+ .slider.round:before {
+ border-radius: 50%;
+ }
+}
+
+.mass-action-wrapper {
+
+ button {
+ z-index: 10;
+ border: none;
+ cursor: pointer;
+ font-weight: 600;
+ padding: 10px 20px;
+ vertical-align: top;
+ height: fit-content;
+ font-size: 11px;
+ border: 1px solid transparent;
+ color: #fff !important;
+ background-color: #26a37c !important
+ }
+}
+
+.seller-form-controls {
+
+ input[type="radio"] {
+ margin-left: 0px;
+ margin-top: 8px;
+
+ }
+}
+
+table {
+ &.table {
+ th {
+ input[type="checkbox"] {
+ margin: 16px 0px 0px -2px;
+ }
+ }
+ }
+}
+
+.dropdown-toggle {
+ cursor: pointer;
+}
+
+.dropdown-btn {
+ min-width: 150px;
+ text-align: left;
+ background: #ffffff;
+ border: 2px solid #C7C7C7;
+ border-radius: 3px;
+ font-size: 14px;
+ padding: 8px 12px 8px 10px;
+ cursor: pointer;
+ position: relative;
+}
+
+.filters-container {
+ .toolbar-wrapper {
+ div {
+ select {
+ padding: 5px 30px 4px 12px;
+ }
+ }
+ }
+}
+
+// .product-grid-3 {
+div {
+ &.product-grid-3 {
+ display: flex;
+ }
+}
+
+div {
+ &.grid-card {
+ float: left;
+ max-width: 200px;
+ }
+}
+
+// }
+
+.tree-container {
+ .tree-item {
+ padding-left: 30px;
+ display: inline-block;
+ margin-top: 10px;
+ width: 100%;
+
+ >.tree-item {
+ display: none;
+ }
+
+ &.active {
+ input[type="checkbox"] {
+ width: 20px !important;
+ margin-top: 9px;
+ }
+ }
+
+ &.active>.tree-item {
+ display: inline-block;
+ }
+
+ .checkbox {
+ margin: 0;
+ display: inline-block;
+ }
+
+ .radio {
+ margin: 0;
+ display: inline-block;
+ }
+
+ .expand-icon {
+ display: inline-block;
+ margin-right: 10px;
+ cursor: pointer;
+ background-image: url("../images/Expand-Light.svg");
+ width: 18px;
+ height: 18px;
+ vertical-align: middle;
+ }
+
+ .folder-icon {
+ vertical-align: middle;
+ margin-right: 10px;
+ }
+
+ &.active {
+ >.expand-icon {
+ background-image: url("../images/Expand-Light-On.svg");
+ }
+ }
+ }
+
+ >.tree-item {
+ padding-left: 0;
+ }
+}
+
+.availability {
+ button {
+ border: none;
+ color: white;
+ font-weight: 600;
+ cursor: default;
+ padding: 2px 11px;
+ background: $button-danger;
+
+ &.active {
+ background: $link-color;
+ }
+ }
+}
+
+div.dataTables_wrapper div.dataTables_filter {
+ display: none;
+}
+
+#earningTable_length {
+ select {
+ width: 100%;
+ resize: none;
+ font-size: 16px;
+ padding: 5px 16px;
+ border-radius: 1px;
+ background: #fff;
+ border: 1px solid #ccc;
+ }
+}
+
+#earningTable {
+ clear: none;
+
+ .sorting_asc::after {
+ display: none;
+ }
+
+ tr {
+ td {
+ padding: 8px;
+ line-height: 1.42857143;
+ vertical-align: top;
+ }
+ }
+}
+
+div.dataTables_wrapper div.dataTables_info {
+ display: none;
+}
+
+.pagination {
+ width: 100%;
+ display: block;
+
+ .paginate_button {
+ padding: 0 10px;
+ cursor: pointer;
+
+ &.current {
+ font-weight: 600;
+ color: $theme-color !important;
+ border-bottom: 2px solid $theme-color;
+ }
+
+ &.next,
+ &.previous {
+
+ .angle-right-icon,
+ .angle-left-icon {
+ @extend .rango-default;
+
+ margin: 0;
+ font-size: 24px;
+ background: unset;
+ text-align: center;
+ }
+ }
+
+ &.next {
+ .angle-right-icon::before {
+ content: "\E908";
+ }
+ }
+
+ &.previous {
+ .angle-left-icon::before {
+ content: "\E907";
+ }
+ }
+ }
+
+ a {
+ color: unset !important;
+ text-decoration: none !important;
+
+ i {
+ top: 2px;
+ font-size: 18px;
+ position: relative;
+ }
+ }
+
+ .angle-left-icon,
+ .angle-right-icon {
+
+
+ background: unset;
+ }
+
+ .angle-right-icon::before {
+ content: "\E908";
+ }
+
+ .angle-left-icon::before {
+ content: "\E907";
+ }
+}
+
+@import "media";
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/lang/en/app.php b/packages/Webkul/Marketplace/src/Resources/lang/en/app.php
new file mode 100644
index 000000000..056fee5a8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/lang/en/app.php
@@ -0,0 +1,739 @@
+ [
+ 'layouts' => [
+ 'become-seller' => 'Become Seller',
+ 'marketplace' => 'Marketplace',
+ 'profile' => 'Profile',
+ 'dashboard' => 'Dashboard',
+ 'products' => 'Products',
+ 'orders' => 'Orders',
+ 'reviews' => 'Reviews',
+ 'transactions' => 'Transactions',
+ 'sell' => 'Sell',
+ 'sellerFlag' => 'Seller Flag Reason',
+ 'productFlag' => 'Product Flag Reason',
+ 'earnings' => 'Earnings',
+ 'customers' => 'Customers',
+ 'seller-category' => 'Seller Categories',
+ 'paymentRequest' => 'Payment Details'
+ ],
+
+ 'dashboard' => [
+ 'total-payout' => 'Total Payout',
+ 'remaining-payout' => 'Remaining Payout'
+ ],
+
+ 'marketplace' => [
+ 'title' => 'Turn Your Passion Into a Business',
+ 'open-shop-label' => 'Open Shop Now',
+ 'features' => 'Attracting Features',
+ 'features-info' => 'Want to start an online business? Before any decision, please check our unbeatable features.',
+ 'popular-sellers' => 'Popular Sellers',
+ 'setup-title' => 'Really Easy to Setup',
+ 'setup-info' => 'Setting an ecommerce store and customization is really very easy.',
+ 'setup-1' => 'Create An Account',
+ 'setup-2' => 'Add Your Shop Details',
+ 'setup-3' => 'Customize Your Profile',
+ 'setup-4' => 'Add Products',
+ 'setup-5' => 'Start Selling Your Products',
+ 'open-shop-info' => 'Open your online shop with us and get explore the new world with more then millions of shoppers.',
+ 'layout2' => [
+ 'become-seller' => 'Become Seller',
+ 'become-seller-tag' => 'In easy steps, no processing fee.',
+ 'back' => 'BACK',
+ 'proceed' => 'PROCEED',
+ 'seller-product' => 'How to sell your products on our store?',
+ 'step1-title' => 'Free register as seller',
+ 'step1-content' => 'Create an account and list your products on store. All you need to set up your account is basic personal information.',
+ 'step2-title' => 'Customers place orders',
+ 'step2-content' => 'Not only regular customers orders, you can also receive bulk purchases from customer.',
+ 'step3-title' => 'Deliver your product',
+ 'step3-content' => 'When you sell on our store, you can choose how storage, packaging, delivery & returns are handled. Easy Ship with our store will handle delivery & customer returns. You can also choose to ship the product yourself.',
+ 'step4-title' => 'You get paid for your sales',
+ 'step4-content' => 'Funds from your completed sales will be deposited in your account (deducting our fees) every 7 days, even for Pay on Delivery orders.',
+ 'query-help' => 'How can I help you?',
+ 'query-help-tag-1' => 'Find difficulty in registration.',
+ 'query-help-tag-2' => 'Having queries related to seller.',
+ 'query-help-tag-3' => 'Something in mind related to commission.',
+ 'query-btn' => 'Send A Query'
+ ],
+ 'layout3' => [
+ 'register' => 'Register Now'
+ ]
+ ],
+
+ 'minimum-order' => [
+ 'min-order' => 'Minimum order for the :shop has been set to :amount'
+ ],
+
+ 'sellers' => [
+ 'account' => [
+ 'signup' => [
+ 'want-to-be-seller' => 'Do You Want To Become A Seller / Vendor?',
+ 'shop_url' => 'Shop Url',
+ 'yes' => 'Yes',
+ 'no' => 'No',
+ 'shop_url_available' => 'Shop url is available.',
+ 'shop_url_not_available' => 'Shop url is unavailable.'
+ ],
+
+ 'customer' => [
+ 'title' => 'Customers'
+ ],
+
+ 'profile' => [
+ 'create-title' => 'Become Seller',
+ 'edit-title' => 'Edit Seller Profile',
+ 'url' => 'Shop Url',
+ 'save-btn-title' => 'Save',
+ 'view-collection-page' => 'View Collection page',
+ 'view-seller-page' => 'View Seller Page',
+ 'waiting-for-approval' => 'Waiting for approval from admin',
+ 'general' => 'General',
+ 'shop_title' => 'Shop Title',
+ 'tax_vat' => 'Tax/VAT Number',
+ 'phone' => 'Contact Number',
+ 'address1' => 'Address 1',
+ 'address2' => 'Address 2',
+ 'city' => 'City',
+ 'state' => 'State',
+ 'country' => 'Country',
+ 'postcode' => 'Post Code',
+ 'media' => 'Media',
+ 'logo' => 'Logo',
+ 'banner' => 'Banner',
+ 'add-image-btn-title' => 'Add Image',
+ 'about' => 'About Shop',
+ 'social_links' => 'Social Links',
+ 'twitter' => 'Twitter Id',
+ 'facebook' => 'Facebook Id',
+ 'youtube' => 'Youtube Id',
+ 'instagram' => 'Instagram Id',
+ 'skype' => 'Skype Id',
+ 'linked_in' => 'Linked In',
+ 'pinterest' => 'Pinterest Id',
+ 'policies' => 'Policies',
+ 'return_policy' => 'Return Policy',
+ 'shipping_policy' => 'Shipping Policy',
+ 'privacy_policy' => 'Privacy Policy',
+ 'seo' => 'SEO',
+ 'meta_title' => 'Meta Title',
+ 'meta_description' => 'Meta Description',
+ 'meta_keywords' => 'meta Keywords',
+ 'minimum_amount' => 'Set Minimum Order Amount',
+ 'min_order_amount' => 'Minimum Amount',
+ 'google_analytics' => 'Google Analytics',
+ 'google_analytics_id' => 'Google Analytics ID',
+ 'admin-commission' => 'Admin Commission',
+ 'admin-commission-percent' => 'Admin Commission (Percentage)',
+ 'profile-background'=> 'Shop Background',
+ 'validation' => [
+ 'logo' => 'Please fill your seller profile logo to continue',
+ 'shop_title' => 'Please fill your seller profile shop title to continue',
+ 'address1' => 'Please fill your seller profile addrees1 to continue',
+ 'city' => 'Please fill your seller profile city to continue',
+ 'state' => 'Please fill your seller profile state to continue',
+ 'phone' => 'Please fill your seller profile phone to continue',
+ 'country' => 'Please fill your seller profile country to continue',
+ 'postcode' => 'Please fill your seller profile postcod to continuee'
+ ]
+ ],
+
+ 'dashboard' => [
+ 'title' => 'Dashboard',
+ 'sales-by-location' => 'Sales By Location'
+ ],
+
+ 'earning' => [
+ 'title' => 'Earning'
+ ],
+
+ 'catalog' => [
+ 'products' => [
+ 'title' => 'Products',
+ 'create' => 'Create',
+ 'create-new' => 'Create New',
+ 'search-title' => 'Search Products',
+ 'create-title' => 'Add Product',
+ 'assing-title' => 'Sell Yours',
+ 'assing-edit-title' => 'Edit Product',
+ 'edit-title' => 'Edit Product',
+ 'save-btn-title' => 'Save',
+ 'assign-info' => 'Search for products, if product exist then sell your with different price or :create_link',
+ 'search' => 'Search',
+ 'search-term' => 'Product Name ...',
+ 'no-result-found' => 'Products not found with this name.',
+ 'enter-search-term' => 'Type atleast 3 characters',
+ 'searching' => 'Searching ...',
+ 'general' => 'General',
+ 'product-condition' => 'Product Condition',
+ 'new' => 'New',
+ 'old' => 'Old',
+ 'price' => 'Price',
+ 'description' => 'Description',
+ 'images' => 'Images',
+ 'inventory' => 'Inventory',
+ 'variations' => 'Variations',
+ 'id' => 'Id',
+ 'sku' => 'SKU',
+ 'name' => 'Name',
+ 'price' => 'Price',
+ 'product-number' => 'Product Number',
+ 'quantity' => 'Quantity',
+ 'is-approved' => 'Is Approved',
+ 'yes' => 'Yes',
+ 'no' => 'No',
+ 'delete' => 'Delete',
+ 'downloadable' => 'Downloadable',
+ 'virtual' => 'Virtual'
+ ]
+ ],
+
+ 'sales' => [
+ 'orders' => [
+ 'title' => 'Orders',
+ 'view-title' => 'Order #:order_id',
+ 'info' => 'Information',
+ 'invoices' => 'Invoices',
+ 'refunds' => 'Refunds',
+ 'shipments' => 'Shipments',
+ 'placed-on' => 'Placed On',
+ 'status' => 'Status',
+ 'customer-name' => 'Customer Name',
+ 'email' => 'Email',
+ 'inventory-source' => 'Inventory Source',
+ 'carrier-title' => 'Carrier Title',
+ 'tracking-number' => 'Tracking Number',
+ 'id' => 'Id',
+ 'base-total' => 'Base Total',
+ 'grand-total' => 'Grand Total',
+ 'order-date' => 'Order Date',
+ 'channel-name' => 'Channel Name',
+ 'status' => 'Status',
+ 'processing' => 'Processing',
+ 'completed' => 'Completed',
+ 'canceled' => 'Canceled',
+ 'closed' => 'Closed',
+ 'pending' => 'Pending',
+ 'pending-payment' => 'Pending Payment',
+ 'fraud' => 'Fraud',
+ 'billed-to' => 'Billed To',
+ 'total-seller-amount' => 'Total Seller Amount',
+ 'total-admin-commission' => 'Total Admin Commission',
+ 'admin-commission' => 'Admin Commission',
+ 'phone' => 'Phone',
+ 'gender' => 'Gender',
+ 'address' => 'Address',
+ 'order-count' => 'Orders'
+ ],
+
+ 'invoices' => [
+ 'title' => 'Invoices',
+ 'create-title' => 'Create Invoice',
+ 'create' => 'Create',
+ 'order-id' => 'Order Id',
+ 'qty-ordered' => 'Qty Ordered',
+ 'qty-to-invoice' => 'Qty to Invoice',
+ 'product-name' => 'Product Name'
+ ],
+
+ 'shipments' => [
+ 'title' => 'Shipments',
+ 'create-title' => 'Create Shipment',
+ 'create' => 'Create',
+ 'order-id' => 'Order Id',
+ 'carrier-title' => 'Carrier Title',
+ 'tracking-number' => 'Tracking Number',
+ 'source' => 'Source',
+ 'select-source' => 'Please Select Source',
+ 'product-name' => 'Product Name',
+ 'qty-ordered' => 'Qty Ordered',
+ 'qty-to-ship' => 'Qty to Ship',
+ 'available-sources' => 'Available Sources',
+ 'qty-available' => 'Qty Available'
+ ],
+
+ 'transactions' => [
+ 'title' => 'Transactions',
+ 'view-title' => 'Transaction #:transaction_id',
+ 'id' => 'Id',
+ 'total' => 'Total',
+ 'transaction-id' => 'Transaction Id',
+ 'comment' => 'Comment',
+ 'order-id' => 'Order #:order_id',
+ 'commission' => 'Commission',
+ 'seller-total' => 'Seller Total',
+ 'created-at' => 'Created At',
+ 'payment-method' => 'Payment Method',
+ 'total-sale' => 'Total Sale',
+ 'total-payout' => 'Total Payout',
+ 'remaining-payout' => 'Remaining Payout',
+ 'sub-total' => 'Sub Total',
+ 'tax' => 'Tax'
+ ],
+
+ 'payment-request' => [
+ 'request-payment' => 'Request Payment'
+ ]
+ ],
+
+ 'reviews' => [
+ 'title' => 'Reviews',
+ 'id' => 'Id',
+ 'customer-name' => 'Customer name',
+ 'rating' => 'Rating',
+ 'comment' => 'Comment',
+ 'status' => 'Status'
+ ]
+ ],
+
+ 'profile' => [
+ 'count-products' => ':count products',
+ 'contact-seller' => 'Contact Seller',
+ 'total-rating' => ':total_rating Ratings & :total_reviews Reviews',
+ 'visit-store' => 'Visit Store',
+ 'about-seller' => 'About Seller',
+ 'member-since' => 'Member Since :date',
+ 'all-reviews' => 'All Reviews',
+ 'return-policy' => 'Return Policy',
+ 'shipping-policy' => 'Shipping Policy',
+ 'by-user-date' => '- By :name :date',
+ 'name' => 'Name',
+ 'email' => 'Email',
+ 'subject' => 'Subject',
+ 'query' => 'Query',
+ 'submit' => 'Submit'
+ ],
+
+ 'reviews' => [
+ 'title' => 'Reviews - :shop_title',
+ 'create-title' => 'Write Review - :shop_title',
+ 'write-review' => 'Write Review',
+ 'total-rating' => ':total_rating Ratings & :total_reviews Reviews',
+ 'view-more' => 'View More',
+ 'write-review' => 'Write Review',
+ 'by-user-date' => '- By :name :date',
+ 'rating' => 'Rating',
+ 'comment' => 'Comment'
+ ],
+
+ 'products' => [
+ 'title' => 'Products - :shop_title',
+ ],
+
+ 'mails' => [
+ 'contact-seller' => [
+ 'subject' => 'Customer Query - :subject',
+ 'dear' => 'Dear :name',
+ 'info' => 'I would like to ask a question, please revert back to me as soon as possible.',
+ 'query' => 'Query',
+ 'thanks' => 'Thanks'
+ ]
+ ],
+ ],
+
+ 'products' => [
+ 'popular-products' => 'Popular Products',
+ 'all-products' => 'All Products',
+ 'sold-by' => 'Sold By : :url',
+ 'seller-count' => ':count More Seller(s)',
+ 'more-sellers' => 'More Sellers',
+ 'seller-total-rating' => ':avg_rating (:total_rating ratings)',
+ 'add-to-cart' => 'Add To Cart',
+ 'new' => 'New',
+ 'used' => 'Used',
+ 'out-of-stock' => 'Out of Stock'
+ ],
+
+ 'flag' => [
+ 'title' => 'Report',
+ 'name' => 'Name',
+ 'email' => 'Email',
+ 'reason' => 'Reason',
+ 'submit' => 'Submit'
+ ]
+ ],
+
+ 'admin' => [
+ 'layouts' => [
+ 'marketplace' => 'Marketplace',
+ 'sellers' => 'Sellers',
+ 'products' => 'Products',
+ 'seller-reviews' => 'Seller Reviews',
+ 'orders' => 'Orders',
+ 'transactions' => 'Transactions',
+ 'payment-requests' => 'Payment Requests'
+ ],
+
+ 'dashboard' => [
+ 'remaining-payout' => 'Remaining Payout',
+ 'sellers-with-most-sales' => 'Top Sellers With Most Sale'
+ ],
+
+ 'acl' => [
+ 'marketplace' => 'Marketplace',
+ 'sellers' => 'Sellers',
+ 'products' => 'Products',
+ 'reviews' => 'Seller Reviews'
+ ],
+
+ 'system' => [
+ 'marketplace' => 'Marketplace',
+ 'settings' => 'Settings',
+ 'general' => 'General',
+ 'commission-per-unit' => 'Commission Per Unit (In Percentage)',
+ 'seller-approval-required' => 'Seller Approval Required',
+ 'product-approval-required' => 'Product Approval Required',
+ 'can-create-invoice' => 'Seller Can Create Invoice',
+ 'can-create-shipment' => 'Seller Can Create Shipment',
+ 'can_cancel_order' => 'Seller Can Cancel Order',
+ 'yes' => 'Yes',
+ 'no' => 'No',
+ 'landing-page' => 'Landing Page',
+ 'page-title' => 'Page Title',
+ 'show-banner' => 'Show Banner',
+ 'layout' => 'Page Layout',
+ 'layout1' => 'Layout One',
+ 'layout2' => 'Layout Two',
+ 'layout3' => 'Layout Three',
+ 'banner' => 'Banner',
+ 'banner-content' => 'Banner Content',
+ 'show-features' => 'Show Features',
+ 'feature-heading' => 'Feature Heading',
+ 'feature-info' => 'Feature Information',
+ 'feature-icon-1' => 'Feature Icon 1',
+ 'feature-icon-label-1' => 'Feature Icon Label 1',
+ 'feature-icon-2' => 'Feature Icon 2',
+ 'feature-icon-label-2' => 'Feature Icon Label 2',
+ 'feature-icon-3' => 'Feature Icon 3',
+ 'feature-icon-label-3' => 'Feature Icon Label 3',
+ 'feature-icon-4' => 'Feature Icon 4',
+ 'feature-icon-label-4' => 'Feature Icon Label 4',
+ 'feature-icon-5' => 'Feature Icon 5',
+ 'feature-icon-label-5' => 'Feature Icon Label 5',
+ 'feature-icon-6' => 'Feature Icon 6',
+ 'feature-icon-label-6' => 'Feature Icon Label 6',
+ 'feature-icon-7' => 'Feature Icon 7',
+ 'feature-icon-label-7' => 'Feature Icon Label 7',
+ 'feature-icon-8' => 'Feature Icon 8',
+ 'feature-icon-label-8' => 'Feature Icon Label 8',
+ 'show-popular-sellers' => 'Show Popular Sellers',
+ 'open-shop-button-label' => 'Open Shop Button Label',
+ 'about-marketplace' => 'About Marketplace',
+ 'show-open-shop-block' => 'Show Open Shop Block',
+ 'open-shop-info' => 'Open Shop Information',
+ 'setup-icon-1' => 'Setup Icon 1',
+ 'setup-icon-2' => 'Setup Icon 2',
+ 'setup-icon-3' => 'Setup Icon 3',
+ 'setup-icon-4' => 'Setup Icon 4',
+ 'setup-icon-5' => 'Setup Icon 5',
+ 'seller-flag' => 'Seller Flags',
+ 'product-flag' => 'Product Flags',
+ 'enable' => 'Enable',
+ 'text' => 'Text',
+ 'guest-can' => 'Guest Can Flag',
+ 'reason' => 'Reasons',
+ 'other-reason' => 'Accept Other Reasons',
+ 'other-placeholder' => 'Other Field\'s Placeholder',
+ 'minimum-order-amount' => 'Minimum Order Amount Settings',
+ 'min-amount' => 'Minimum Amount',
+ 'seller-min-amount' => 'Amount value for seller',
+ 'google-analytics-id' => 'Google Analytics Id',
+ 'google-analytics' => 'Google Analytics',
+ 'seller-google-analytics' => 'Enable Seller Google Analytics',
+ 'status' => 'Status',
+ 'featured' => 'Enable Featured Products',
+ 'new' => 'Enable New Products',
+ 'layout-2' => [
+ 'step-1' => 'Step One Image',
+ 'step-2' => 'Step Two Image',
+ 'step-3' => 'Step Three Image',
+ 'step-4' => 'Step Four Image',
+ 'feature-icon-1-content' => 'Feature One Content',
+ 'feature-icon-2-content' => 'Feature Two Content',
+ 'feature-icon-3-content' => 'Feature Three Content',
+ 'feature-icon-4-content' => 'Feature Four Content',
+ 'feature-icon-5-content' => 'Feature Five Content',
+ 'feature-icon-6-content' => 'Feature Six Content',
+ 'feature-icon-7-content' => 'Feature Seven Content',
+ 'feature-icon-8-content' => 'Feature Eight Content',
+
+ ],
+
+ 'layout-3' => [
+ 'feature-icon-1-title' => 'Feature One Title',
+ 'feature-icon-1-content' => 'Feature One Content',
+ 'feature-icon-2-title' => 'Feature Two Title',
+ 'feature-icon-2-content' => 'Feature Two Content',
+ 'feature-icon-3-title' => 'Feature Three Title',
+ 'feature-icon-3-content' => 'Feature Three Content'
+ ]
+
+ ],
+
+ 'flag' => [
+ 'title' => 'Flags',
+ 'name' => 'Name',
+ 'email' => 'Email',
+ 'reason' => 'Reasons'
+ ],
+
+ 'sellers' => [
+ 'title' => 'Sellers',
+ 'create' => 'Create Seller',
+ 'add-title' => 'Seller',
+ 'save-btn-title' => 'Save Seller',
+ 'id' => 'Id',
+ 'seller-name' => 'Seller Name',
+ 'seller-email' => 'Seller Email',
+ 'customer-name' => 'Customer Name',
+ 'customer-email' => 'Customer Email',
+ 'created-at' => 'Created At',
+ 'is-approved' => 'Is Approved',
+ 'approved' => 'Approved',
+ 'un-approved' => 'Unapproved',
+ 'approve' => 'Approve',
+ 'unapprove' => 'Unapprove',
+ 'delete' => 'Delete',
+ 'update' => 'Update',
+ 'delete-success-msg' => 'Seller deleted successfully.',
+ 'mass-delete-success' => 'Selected sellers deleted successfully.',
+ 'mass-update-success' => 'Selected sellers updated successfully.',
+ 'update-success' => 'Seller updated successfully.',
+ 'product' => 'Product',
+ 'add-product' => 'Add Product',
+ 'search' => 'Search',
+ 'search-product' => 'Search Product',
+ 'assign-product' => 'Assign Product to Seller',
+ 'commission' => 'Commission',
+ 'change-commission' => 'Change Commission',
+ 'commission-percentage' => 'Commission Percentage',
+ 'seller-profile' => 'Seller Profile',
+ 'view-seller-profile' => 'View Seller Profile',
+ 'flag' => [
+ 'title' => 'Seller Flag Reasons',
+ 'add-btn-title' => 'Add Flag Reason',
+ 'create-success' => 'Seller flag reason created successfully',
+ 'update-success' => 'Seller flag reason updated successfully',
+ 'delete-success' => 'Seller flag reason deleted successfully',
+ 'title' => 'Seller flag reasons',
+ 'edit-title' => 'Edit flag reason',
+
+ 'create' => [
+ 'add-title' => 'Create Reason',
+ 'create-btn-title' => 'Save',
+ 'reason' => 'Name',
+ 'status' => 'Status'
+ ]
+ ],
+
+ 'category' => [
+ 'title' => 'Sellers Category',
+ 'add-title' => 'Assign Category To Seller',
+ 'add-btn-title' => 'Assign Category',
+ 'save-btn-title' => 'Save Assigned Category',
+ 'edit-title' => 'Update Assigned Category To Seller',
+ 'edit-btn-title' => 'Update Assigned Category',
+ 'update-btn-title' => 'Update Assigned Category',
+ 'create' => 'Assign Category',
+ 'seller' => 'Select Seller',
+ 'update-success' => 'assigned category updated successfully',
+ 'delete-success' => 'assigned category deleted successfully',
+ 'save-success' => 'categories assigned successfully',
+ ]
+
+ ],
+
+ 'orders' => [
+ 'title' => 'Orders',
+ 'manage-title' => 'Manage Seller\'s Order',
+ 'order-id' => 'Order Id',
+ 'seller-name' => 'Seller Name',
+ 'sub-total' => 'Sub Total',
+ 'grand-total' => 'Grand Total',
+ 'commission' => 'Commission',
+ 'discount' => 'Discount',
+ 'seller-total' => 'Seller Total',
+ 'total-paid' => 'Paid',
+ 'remaining-total' => 'Remaining',
+ 'invoice-pending' => 'Invoice Pending',
+ 'seller-total-invoiced' => 'Invoiced',
+ 'order-date' => 'Order Date',
+ 'channel-name' => 'Channel Name',
+ 'status' => 'Status',
+ 'processing' => 'Processing',
+ 'completed' => 'Completed',
+ 'canceled' => 'Canceled',
+ 'closed' => 'Closed',
+ 'pending' => 'Pending',
+ 'pending-payment' => 'Pending Payment',
+ 'fraud' => 'Fraud',
+ 'billed-to' => 'Billed To',
+ 'withdrawal-requested' => 'Withdrawal Requested',
+ 'pay' => 'Pay',
+ 'already-paid' => 'Already Paid',
+ 'yes' => 'Yes',
+ 'no' => 'No',
+ 'pay-seller' => 'Pay Seller',
+ 'comment' => 'Comment',
+ 'payment-success-msg' => 'Payment has been successfully done for this seller',
+ 'order-not-exist' => 'Order not exist',
+ 'no-amount-to-paid' => 'No amount left to paid to this seller.',
+ 'refunded' => 'Refunded',
+ 'requested' => 'Requested',
+ ],
+
+ 'transactions' => [
+ 'title' => 'Transactions',
+ 'id' => 'Id',
+ 'seller-name' => 'Seller Name',
+ 'total' => 'Total',
+ 'transaction-id' => 'Transaction Id',
+ 'comment' => 'Comment',
+ 'order-id' => 'Order #:order_id',
+ 'commission' => 'Commission',
+ 'seller-total' => 'Seller Total',
+ 'created-at' => 'Created At',
+ 'payment-method' => 'Payment Method',
+ 'total-sale' => 'Total Sale',
+ 'total-payout' => 'Total Payout',
+ 'remaining-payout' => 'Remaining Payout',
+ 'seller-id' => 'Seller Id'
+ ],
+
+ 'payment-request' => [
+ 'title' => 'Payment Requests'
+ ],
+
+ 'products' => [
+ 'id' => 'Id',
+ 'title' => 'Products',
+ 'product-id' => 'Product Id',
+ 'seller-name' => 'Name',
+ 'product-number' => 'Product Number',
+ 'sku' => 'Sku',
+ 'name' => 'Name',
+ 'description' => 'Description',
+ 'url-key' => 'Url Key',
+ 'price' => 'Price',
+ 'cost' => 'Cost',
+ 'weight' => 'Weight',
+ 'color' => 'Color',
+ 'size' => 'Size',
+ 'quantity' => 'Quantity',
+ 'status' => 'Status',
+ 'is-approved' => 'Is Approved',
+ 'approved' => 'Approved',
+ 'un-approved' => 'Unapproved',
+ 'approve' => 'Approve',
+ 'unapprove' => 'Unapprove',
+ 'delete' => 'Delete',
+ 'update' => 'Update',
+ 'configurable-attributes' => 'Configurable Attributes',
+ 'general' => 'General',
+ 'delete-success-msg' => 'Product deleted successfully.',
+ 'mass-delete-success' => 'Selected products deleted successfully.',
+ 'mass-update-success' => 'Selected products updated successfully.',
+ 'flag' => [
+ 'flag-title' => 'Flags',
+ 'title' => 'Product Flag Reaons',
+ 'reason' => 'Reason',
+ 'status' => 'Status',
+ 'create-success' => 'Product flag has been created successfully',
+ 'delete-success' => 'Product flag has been deleted successfully',
+ 'update-success' => 'Product flag has been updated successfully'
+
+ ]
+ ],
+
+ 'reviews' => [
+ 'title' => 'Reviews',
+ 'id' => 'Id',
+ 'comment' => 'Comment',
+ 'rating' => 'Rating',
+ 'customer-name' => 'Customer Name',
+ 'seller-name' => 'Seller Name',
+ 'status' => 'Status',
+ 'approved' => 'Approved',
+ 'un-approved' => 'Unapproved',
+ 'approve' => 'Approve',
+ 'unapprove' => 'Unapprove',
+ 'update' => 'Update',
+ 'mass-update-success' => 'Selected reviews updated successfully.'
+ ],
+
+ 'response' => [
+ 'create-success' => ':name created successfully.',
+ 'update-success' => ':name updated successfully.',
+ 'delete-success' => ':name deleted successfully.',
+ ]
+ ],
+
+ 'mail' => [
+ 'seller' => [
+ 'welcome' => [
+ 'subject' => 'Seller Request Notification',
+ 'dear' => 'Dear :name',
+ 'info' => 'Thanks for registering as seller, your account is under review. We will inform you about your account approval via mail.'
+ ],
+
+ 'approval' => [
+ 'subject' => 'Seller Approval Notification',
+ 'dear' => 'Dear :name',
+ 'info' => 'This is to inform you that you are approved as seller. Click below button to login.',
+ 'login' => 'Login',
+ 'disapprove-seller' => 'Seller Disapproval Notification',
+ 'disapprove-info' => 'This is to inform you that you are unapproved as seller. Click below button to login.'
+ ],
+
+ 'regisration' => [
+ 'subject' => 'New Seller Notification',
+ 'dear' => 'Hello :name',
+ 'info' => 'A new seller :name has registered on your marketplace. Kindly approve it from your dashboard.',
+ ],
+ ],
+
+ 'sales' => [
+ 'order' => [
+ 'subject' => 'New Order Notification',
+ 'greeting' => 'You have a new Order :order_id placed on :created_at',
+ ],
+
+ 'invoice' => [
+ 'subject' => 'New Invoice Notification',
+ 'greeting' => 'You have a new Invoice for order :order_id placed on :created_at',
+ ],
+
+ 'shipment' => [
+ 'heading' => 'Shipment Confirmation!',
+ 'subject' => 'New Shipment Notification',
+ 'greeting' => 'You have a new Shipment for order :order_id placed on :created_at',
+ ]
+ ],
+
+ 'product' => [
+ 'subject' => 'Product Approval Notification',
+ 'disapprove-product' => 'Product Disapproval Notification',
+ 'dear' => 'Dear :name',
+ 'info' => 'This is to inform you that your product :name has been approved.',
+ 'disapproved-info' => 'This is to inform you that your product :name has been disapproved.'
+ ],
+
+ 'flag' => [
+ 'title' => ''
+ ],
+
+ 'payment' => [
+ 'dear' => 'Dear :customer_name',
+ 'request' => 'A seller :seller_name has requested payment for his order. Order details are below'
+ ]
+ ],
+
+ 'velocity' => [
+ 'system' => [
+ 'velocity-content' => 'Velocity Content'
+ ]
+ ]
+];
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/customers/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/customers/edit.blade.php
new file mode 100644
index 000000000..f31d2dd6f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/customers/edit.blade.php
@@ -0,0 +1,215 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('admin::app.customers.customers.edit-title') }}
+@stop
+
+@section('content')
+
+ {!! view_render_event('bagisto.admin.customer.edit.before', ['customer' => $customer]) !!}
+
+
+ @if ( core()->getConfigData('marketplace.settings.seller_flag.enable'))
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\SellerFlagDataGrid')->render() !!}
+
+
+ @endif
+
+ {!! view_render_event('bagisto.admin.customer.edit.after', ['customer' => $customer]) !!}
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/dashboard/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/dashboard/index.blade.php
new file mode 100644
index 000000000..fd290084f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/dashboard/index.blade.php
@@ -0,0 +1,596 @@
+@extends('admin::layouts.master')
+
+@section('page_title')
+ {{ __('admin::app.dashboard.title') }}
+@stop
+
+@inject('sellerOrderRepository', 'Webkul\Marketplace\Repositories\OrderRepository')
+@inject('sellerTransactionRepository', 'Webkul\Marketplace\Repositories\TransactionRepository')
+
+
+
+@php
+ $sellerStatistics = [
+ 'total_sale' =>
+ $totalSale = $sellerOrderRepository->scopeQuery(function($query) use ($startDate, $endDate) {
+ return $query->where('created_at', '>=', $startDate)
+ ->where('created_at', '<=', $endDate);
+ })->sum('base_seller_total') - $sellerOrderRepository->scopeQuery(function($query) use ($startDate, $endDate) {
+ return $query->where('created_at', '>=', $startDate)
+ ->where('created_at', '<=', $endDate);
+ })->sum('base_grand_total_refunded') + $sellerOrderRepository->scopeQuery(function($query) use ($startDate, $endDate) {
+ return $query->where('created_at', '>=', $startDate)
+ ->where('created_at', '<=', $endDate);
+ })->sum('base_commission_invoiced'),
+
+ 'total_payout' => $totalPaid = $sellerTransactionRepository->scopeQuery(function($query) use ($startDate, $endDate) {
+ return $query->where('created_at', '>=', $startDate)
+ ->where('created_at', '<=', $endDate);
+ })->sum('base_total'),
+
+ 'remaining_payout' => $totalSale - $totalPaid,
+ ];
+
+ $dbPrefix = DB::getTablePrefix();
+ $topSellers = $sellerOrderRepository->scopeQuery(function($query) use ($startDate, $endDate, $dbPrefix) {
+ return $query
+
+ ->leftJoin('orders', 'marketplace_orders.id', 'orders.id')
+ ->leftJoin('refunds', 'orders.id', 'refunds.order_id')
+ ->leftJoin('marketplace_sellers', 'marketplace_orders.marketplace_seller_id', 'marketplace_sellers.id')
+ ->leftJoin('customers', 'marketplace_sellers.customer_id', 'customers.id')
+ ->select(DB::raw("(SUM({$dbPrefix}orders.base_grand_total) - SUM(IFNULL({$dbPrefix}refunds.base_grand_total, 0))) as total_base_grand_total"), DB::raw('CONCAT(' . DB::getTablePrefix() . 'customers.first_name, " ", ' . DB::getTablePrefix() . 'customers.last_name) as seller_name'))
+ ->addSelect(DB::raw("COUNT({$dbPrefix}orders.id) as total_orders"))
+ ->addSelect('orders.id', 'customer_email', 'customer_first_name', 'customer_last_name')
+ ->where('orders.created_at', '>=', $startDate)
+ ->where('orders.created_at', '<=', $endDate)
+ ->where('orders.status', '<>', 'closed')
+ ->where('orders.status', '<>', 'canceled')
+ ->groupBy('customer_email')
+ ->orderBy('total_base_grand_total', 'DESC');
+ })
+ ->limit(5);
+
+@endphp
+
+@section('content-wrapper')
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-customers') }}
+
+
+
+ {{ $statistics['total_customers']['current'] }}
+
+
+ @if ($statistics['total_customers']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_customers']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_customers']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-orders') }}
+
+
+
+ {{ $statistics['total_orders']['current'] }}
+
+
+ @if ($statistics['total_orders']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_orders']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_orders']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-sale') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_sales']['current']) }}
+
+
+ @if ($statistics['total_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_sales']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.average-sale') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['avg_sales']['current']) }}
+
+
+ @if ($statistics['avg_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('marketplace::app.admin.dashboard.remaining-payout') }}
+
+
+
+
+ {{ core()->formatBasePrice($sellerStatistics['remaining_payout']) }}
+
+
+ @if ($sellerStatistics['remaining_payout'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($sellerStatistics['remaining_payout'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($sellerStatistics['remaining_payout'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.sales') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.top-performing-categories') }}
+
+
+
+
+
+ @if (! count($statistics['top_selling_categories']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.top-selling-products') }}
+
+
+
+
+
+ @if (! count($statistics['top_selling_products']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+ {{ __('admin::app.dashboard.customer-with-most-sales') }}
+
+
+
+
+
+ @if (! count($statistics['customer_with_most_sales']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+
+ {{ __('marketplace::app.admin.dashboard.sellers-with-most-sales') }}
+
+
+
+
+
+ @if (! count($statistics['customer_with_most_sales']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.stock-threshold') }}
+
+
+
+
+
+ @if (! count($statistics['stock_threshold']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/content.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/content.blade.php
new file mode 100644
index 000000000..dddc1d00f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/content.blade.php
@@ -0,0 +1,17 @@
+@extends('marketplace::admin.layouts.master')
+
+@section('content-wrapper')
+
+
+ @include ('admin::layouts.nav-aside')
+
+
+
+ @include ('admin::layouts.tabs')
+
+ @yield('content')
+
+
+
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/master.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/master.blade.php
new file mode 100644
index 000000000..5c3a5400d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/master.blade.php
@@ -0,0 +1,5 @@
+@extends('admin::layouts.master')
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/nav-left.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/nav-left.blade.php
new file mode 100644
index 000000000..16facb30d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/nav-left.blade.php
@@ -0,0 +1,18 @@
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/style.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/style.blade.php
new file mode 100644
index 000000000..b3667ce1f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/layouts/style.blade.php
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/orders/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/orders/index.blade.php
new file mode 100644
index 000000000..ef0d25b32
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/orders/index.blade.php
@@ -0,0 +1,109 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ request()->id ? __('marketplace::app.admin.orders.manage-title') : __('marketplace::app.admin.orders.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/paymentRequest/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/paymentRequest/index.blade.php
new file mode 100644
index 000000000..f0886859b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/paymentRequest/index.blade.php
@@ -0,0 +1,106 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.payment-request.title') }}
+@stop
+
+@section('content')
+
+
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+@endpush
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/create.blade.php
new file mode 100644
index 000000000..d3f6303f6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/create.blade.php
@@ -0,0 +1,62 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.flag.create.add-title') }}
+@stop
+
+@section('content')
+
+
+
+@stop
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/edit.blade.php
new file mode 100644
index 000000000..e76d04bd5
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/edit.blade.php
@@ -0,0 +1,62 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.products.flag.edit-title') }}
+@stop
+
+@section('content')
+
+
+
+@stop
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/index.blade.php
new file mode 100644
index 000000000..287bdcd2a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/productFlagReason/index.blade.php
@@ -0,0 +1,27 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.products.flag.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\ProductFlagReasonDataGrid')->render() !!}
+
+
+
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/products/flags/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/products/flags/index.blade.php
new file mode 100644
index 000000000..76440e30b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/products/flags/index.blade.php
@@ -0,0 +1,5 @@
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\ProductFlagDataGrid')->render() !!}
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/products/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/products/index.blade.php
new file mode 100644
index 000000000..dca6e7eea
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/products/index.blade.php
@@ -0,0 +1,26 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.products.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\ProductDataGrid')->render() !!}
+
+
+
+
+@stop
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/products/price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/products/price.blade.php
new file mode 100644
index 000000000..f7e1beb99
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/products/price.blade.php
@@ -0,0 +1,20 @@
+
+ @if ($product->type == 'configurable')
+
{{ __('shop::app.products.price-label') }}
+
+
{{ core()->currency($product->getTypeInstance()->getMinimalPrice($product)) }}
+ @else
+ @if ($product->getTypeInstance()->haveSpecialPrice($product))
+
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($product->price) }}
+
+
{{ core()->currency($product->getTypeInstance()->getSpecialPrice($product)) }}
+ @else
+
{{ core()->currency($product->price) }}
+ @endif
+ @endif
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/reviews/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/reviews/index.blade.php
new file mode 100644
index 000000000..7b10e7e1b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/reviews/index.blade.php
@@ -0,0 +1,26 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.reviews.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\ReviewDataGrid')->render() !!}
+
+
+
+
+@stop
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/create.blade.php
new file mode 100644
index 000000000..b30b372b0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/create.blade.php
@@ -0,0 +1,62 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.flag.create.add-title') }}
+@stop
+
+@section('content')
+
+
+
+@stop
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/edit.blade.php
new file mode 100644
index 000000000..eb49fb9cf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/edit.blade.php
@@ -0,0 +1,62 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.flag.edit-title') }}
+@stop
+
+@section('content')
+
+
+
+@stop
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/index.blade.php
new file mode 100644
index 000000000..0678e772e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellerFlagReason/index.blade.php
@@ -0,0 +1,28 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.flag.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\SellerFlagReasonDataGrid')->render() !!}
+
+
+
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/create.blade.php
new file mode 100644
index 000000000..6115d9aa0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/create.blade.php
@@ -0,0 +1,56 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.category.add-title') }}
+@stop
+
+@section('content')
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/edit.blade.php
new file mode 100644
index 000000000..96dcc2f19
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/edit.blade.php
@@ -0,0 +1,56 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.category.edit-title') }}
+@stop
+
+@section('content')
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/index.blade.php
new file mode 100644
index 000000000..466d98d65
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/category/index.blade.php
@@ -0,0 +1,28 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.category.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+ @inject('sellerCategory', 'Webkul\Marketplace\DataGrids\Admin\SellerCategoryDataGrid')
+ {!! $sellerCategory->render() !!}
+
+
+
+
+@stop
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/create.blade.php
new file mode 100644
index 000000000..83f183e47
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/create.blade.php
@@ -0,0 +1,181 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.add-title') }}
+@stop
+
+@section('content')
+
+@stop
+
+
+@push('scripts')
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/edit.blade.php
new file mode 100644
index 000000000..a22027d2d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/edit.blade.php
@@ -0,0 +1,244 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.add-title') }}
+@stop
+
+@section('content')
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/index.blade.php
new file mode 100644
index 000000000..e541e071d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/index.blade.php
@@ -0,0 +1,28 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+ @inject('sellers', 'Webkul\Marketplace\DataGrids\Admin\SellerDataGrid')
+ {!! $sellers->render() !!}
+
+
+
+
+@stop
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/assign.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/assign.blade.php
new file mode 100644
index 000000000..7f4308bd6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/assign.blade.php
@@ -0,0 +1,270 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.assign-product') }}
+@stop
+
+@section('content-wrapper')
+
+
+
+
+
+
+
+
+ @csrf()
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.product-condition') }}
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.new') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.old') }}
+
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.price') }}
+ type == 'configurable' ? 'disabled' : '' }}/>
+ @{{ errors.first('price') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.description') }}
+ {{ old('description') }}
+ @{{ errors.first('description') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @if ($baseProduct->type != 'configurable' && $baseProduct->type != 'downloadable')
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+
+
+ @endif
+
+
+
+ @if ($baseProduct->type == 'configurable')
+
+
+
+
+
+
+
+ @endif
+
+
+
+
+@endsection
+
+@if ($baseProduct->type == 'configurable')
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/edit-assign.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/edit-assign.blade.php
new file mode 100644
index 000000000..d3bff1729
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/edit-assign.blade.php
@@ -0,0 +1,345 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-edit-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit-assign.before') !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.product-condition') }}
+
+ condition ?>
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.new') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.old') }}
+
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.price') }}
+ product->type == 'configurable' ? 'disabled' : '' }}/>
+ @{{ errors.first('price') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.description') }}
+ {{ old('description') ?: $product->description }}
+ @{{ errors.first('description') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{-- @include ('marketplace::shop.default.sellers.account.catalog.products.accordians.assign-videos') --}}
+
+ @if ($product->product->type != 'configurable' && $product->product->type != 'downloadable')
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+
+ product->inventories as $inventory) {
+ if ($inventory->inventory_source_id == $inventorySource->id && $inventory->vendor_id == $product->marketplace_seller_id) {
+ $qty = $inventory->qty;
+ break;
+ }
+ }
+
+ $qty = old('inventories[' . $inventorySource->id . ']') ?: $qty;
+
+ ?>
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+
+
+ @endif
+ @if ($product->product->type == 'downloadable')
+ @include('marketplace::shop.velocity.sellers.account.catalog.products.accordians.downloadable', ['product' => $product])
+ @endif
+ @if ($product->product->type == 'configurable')
+
+
+
+
+
+
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit-assign.after') !!}
+
+
+
+
+
+@endsection
+
+@if ($product->product->type == 'configurable')
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/search.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/search.blade.php
new file mode 100644
index 000000000..6e47763bc
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/sellers/products/search.blade.php
@@ -0,0 +1,136 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.sellers.search-product') }}
+@stop
+
+@section('content-wrapper')
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/admin/transactions/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/admin/transactions/index.blade.php
new file mode 100644
index 000000000..e7e82f120
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/admin/transactions/index.blade.php
@@ -0,0 +1,26 @@
+@extends('marketplace::admin.layouts.content')
+
+@section('page_title')
+ {{ __('marketplace::app.admin.transactions.title') }}
+@stop
+
+@section('content')
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Admin\TransactionDataGrid')->render() !!}
+
+
+
+
+@stop
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/layouts/master.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/layouts/master.blade.php
new file mode 100644
index 000000000..9451f8cf1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/layouts/master.blade.php
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ $header ?? '' }}
+
+
+
+ {{ $slot }}
+
+ {{ $subcopy ?? '' }}
+
+
+
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/payment/paymentRequest.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/payment/paymentRequest.blade.php
new file mode 100644
index 000000000..f36f2816a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/payment/paymentRequest.blade.php
@@ -0,0 +1,136 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+ {{ __('shop::app.mail.order.heading') }}
+
+
+
+ {{ __('shop::app.mail.payment.dear', ['customer_name' => core()->getConfigData('emails.configure.email_settings.admin_name')]) }}
+
+ {{ __('shop::app.mail.payment.request', ['seller_name' => core()->getConfigData('emails.configure.email_settings.admin_name')]) }}
+
+
+
+
+
+ {!! __('marketplace::app.mail.sales.order.greeting', [
+ 'order_id' => '#' . $sellerOrder->order_id . ' ',
+ 'created_at' => $sellerOrder->created_at
+ ])
+ !!}
+
+
+
+
+ {{ __('shop::app.mail.order.summary') }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-percent') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+
+ @if ($sellerOrder->discount_amount)
+ {{ __('shop::app.customer.account.order.view.discount-amount') }}
+ @endif
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerOrder->items as $sellerOrderItem)
+
+
+ {{ $sellerOrderItem->item->type == 'configurable' ? $sellerOrderItem->item->child->sku : $sellerOrderItem->item->sku }}
+
+
+
+ {{ $sellerOrderItem->item->name }}
+
+ @if (isset($sellerOrderItem->additional['attributes']))
+
+
+ @foreach ($sellerOrderItem->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+
+ {{ core()->formatPrice($sellerOrderItem->item->price, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->item->total, $sellerOrder->order->order_currency_code) }}
+
+ {{ number_format($sellerOrderItem->item->tax_percent, 2) }}%
+
+ {{ core()->formatPrice($sellerOrderItem->item->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+ @if ($sellerOrder->discount_amount)
+ {{ core()->formatPrice($sellerOrderItem->item->discount_amount, $sellerOrder->order->order_currency_code) }}
+ @endif
+
+ {{ core()->formatPrice($sellerOrderItem->item->total + $sellerOrderItem->item->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.mail.order.subtotal') }}
+
+ {{ core()->formatPrice($sellerOrder->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-handling') }}
+
+ {{ core()->formatPrice($sellerOrder->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.mail.order.tax') }}
+
+ {{ core()->formatPrice($sellerOrder->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ @if ($sellerOrder->discount_amount)
+
+ {{ __('shop::app.customer.account.order.view.discount-amount') }}
+
+ {{ core()->formatPrice($sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endif
+
+
+ {{ __('shop::app.mail.order.grand-total') }}
+
+ {{ core()->formatPrice($sellerOrder->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+@endcomponent
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/product/adminReportedProduct.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/product/adminReportedProduct.blade.php
new file mode 100644
index 000000000..3f1b0bb85
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/product/adminReportedProduct.blade.php
@@ -0,0 +1,39 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.product.dear', ['name' => $sellerProduct->seller->customer->name]) }},
+
+
+
+
+ {!! __('marketplace::app.mail.product.info', ['name' => $sellerProduct->product->name]) !!}
+
+
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/product/approval.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/product/approval.blade.php
new file mode 100644
index 000000000..3f1b0bb85
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/product/approval.blade.php
@@ -0,0 +1,39 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.product.dear', ['name' => $sellerProduct->seller->customer->name]) }},
+
+
+
+
+ {!! __('marketplace::app.mail.product.info', ['name' => $sellerProduct->product->name]) !!}
+
+
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/product/disapproval.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/product/disapproval.blade.php
new file mode 100644
index 000000000..3f651f2c7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/product/disapproval.blade.php
@@ -0,0 +1,39 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.product.dear', ['name' => $sellerProduct->seller->customer->name]) }},
+
+
+
+
+ {!! __('marketplace::app.mail.product.disapproved-info', ['name' => $sellerProduct->product->name]) !!}
+
+
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/product/reportedProduct.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/product/reportedProduct.blade.php
new file mode 100644
index 000000000..3f1b0bb85
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/product/reportedProduct.blade.php
@@ -0,0 +1,39 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.product.dear', ['name' => $sellerProduct->seller->customer->name]) }},
+
+
+
+
+ {!! __('marketplace::app.mail.product.info', ['name' => $sellerProduct->product->name]) !!}
+
+
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-invoice.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-invoice.blade.php
new file mode 100644
index 000000000..6022a459f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-invoice.blade.php
@@ -0,0 +1,204 @@
+@component('shop::emails.layouts.master')
+
+
+ order; ?>
+
+
+
+
+ {{ __('shop::app.mail.invoice.heading', ['order_id' => $sellerOrder->order_id, 'invoice_id' => $sellerInvoice->invoice_id]) }}
+
+
+
+ {{ __('shop::app.mail.order.dear', ['customer_name' => $sellerOrder->order->customer_full_name]) }},
+
+
+
+ {!! __('marketplace::app.mail.sales.invoice.greeting', [
+ 'order_id' => '#' . $sellerOrder->order_id . ' ',
+ 'created_at' => $sellerOrder->created_at
+ ])
+ !!}
+
+
+
+
+ {{ __('shop::app.mail.invoice.summary') }}
+
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-address') }}
+
+
+
+ {{ $sellerOrder->order->shipping_address->name }}
+
+
+
+ {{ $sellerOrder->order->shipping_address->address1 }}, {{ $sellerOrder->order->shipping_address->address2 ? $sellerOrder->order->shipping_address->address2 . ',' : '' }} {{ $sellerOrder->order->shipping_address->state }}
+
+
+
+ {{ core()->country_name($sellerOrder->order->shipping_address->country) }} {{ $sellerOrder->order->shipping_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $sellerOrder->order->shipping_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.shipping') }}
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+ {{ __('shop::app.mail.order.billing-address') }}
+
+
+
+ {{ $sellerOrder->order->billing_address->name }}
+
+
+
+ {{ $sellerOrder->order->billing_address->address1 }}, {{ $sellerOrder->order->billing_address->address2 ? $sellerOrder->order->billing_address->address2 . ',' : '' }} {{ $sellerOrder->order->billing_address->state }}
+
+
+
+ {{ core()->country_name($sellerOrder->order->billing_address->country) }} {{ $sellerOrder->order->billing_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $sellerOrder->order->billing_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.payment') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ @if ($sellerInvoice->discount_amount > 0)
+ {{ __('shop::app.customer.account.order.view.discount-amount') }}
+ @endif
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerInvoice->items as $sellerInvoiceItem)
+ item; ?>
+
+ {{ $baseInvoiceItem->name }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ $baseInvoiceItem->qty }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @if ($sellerInvoice->discount_amount > 0)
+
+ {{ core()->formatPrice($baseInvoiceItem->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endif
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total + $baseInvoiceItem->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+ {{ __('shop::app.mail.order.subtotal') }}
+
+ {{ core()->formatPrice($sellerInvoice->sub_total, $sellerInvoice->invoice->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-handling') }}
+
+ {{ core()->formatPrice($sellerInvoice->shipping_amount, $sellerInvoice->invoice->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.mail.order.tax') }}
+
+ {{ core()->formatPrice($sellerInvoice->tax_amount, $sellerInvoice->invoice->order_currency_code) }}
+
+
+
+ @if ($sellerInvoice->discount_amount)
+
+ {{ __('shop::app.customer.account.order.view.discount-amount') }}
+
+ {{ core()->formatPrice($sellerInvoice->discount_amount, $sellerInvoice->invoice->order_currency_code) }}
+
+
+ @wndif
+
+
+ {{ __('shop::app.mail.order.grand-total') }}
+
+ {{ core()->formatPrice($sellerInvoice->grand_total, $sellerInvoice->invoice->order_currency_code) }}
+
+
+
+
+
+
+@endcomponent
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-order.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-order.blade.php
new file mode 100644
index 000000000..0198268a2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-order.blade.php
@@ -0,0 +1,211 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+ {{ __('shop::app.mail.order.heading') }}
+
+
+
+ {{ __('shop::app.mail.order.dear', ['customer_name' => $sellerOrder->seller->customer->name]) }},
+
+
+
+ {!! __('marketplace::app.mail.sales.order.greeting', [
+ 'order_id' => '#' . $sellerOrder->order_id . ' ',
+ 'created_at' => $sellerOrder->created_at
+ ])
+ !!}
+
+
+
+
+ {{ __('shop::app.mail.order.summary') }}
+
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-address') }}
+
+
+
+ {{ $sellerOrder->order->shipping_address->name }}
+
+
+
+ {{ $sellerOrder->order->shipping_address->address1 }}, {{ $sellerOrder->order->shipping_address->address2 ? $sellerOrder->order->shipping_address->address2 . ',' : '' }} {{ $sellerOrder->order->shipping_address->state }}
+
+
+
+ {{ core()->country_name($sellerOrder->order->shipping_address->country) }} {{ $sellerOrder->order->shipping_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $sellerOrder->order->shipping_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.shipping') }}
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+ {{ __('shop::app.mail.order.billing-address') }}
+
+
+
+ {{ $sellerOrder->order->billing_address->name }}
+
+
+
+ {{ $sellerOrder->order->billing_address->address1 }}, {{ $sellerOrder->order->billing_address->address2 ? $sellerOrder->order->billing_address->address2 . ',' : '' }} {{ $sellerOrder->order->billing_address->state }}
+
+
+
+ {{ core()->country_name($sellerOrder->order->billing_address->country) }} {{ $sellerOrder->order->billing_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $sellerOrder->order->billing_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.payment') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-percent') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+
+ @if ($sellerOrder->discount_amount)
+ {{ __('shop::app.customer.account.order.view.discount-amount') }}
+ @endif
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerOrder->items as $sellerOrderItem)
+
+
+ {{ $sellerOrderItem->item->type == 'configurable' ? $sellerOrderItem->item->child->sku : $sellerOrderItem->item->sku }}
+
+
+
+ {{ $sellerOrderItem->item->name }}
+
+ @if (isset($sellerOrderItem->additional['attributes']))
+
+
+ @foreach ($sellerOrderItem->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+
+ {{ core()->formatPrice($sellerOrderItem->item->price, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->item->total, $sellerOrder->order->order_currency_code) }}
+
+ {{ number_format($sellerOrderItem->item->tax_percent, 2) }}%
+
+ {{ core()->formatPrice($sellerOrderItem->item->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+ @if ($sellerOrder->discount_amount)
+ {{ core()->formatPrice($sellerOrderItem->item->discount_amount, $sellerOrder->order->order_currency_code) }}
+ @endif
+
+ {{ core()->formatPrice($sellerOrderItem->item->total + $sellerOrderItem->item->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.mail.order.subtotal') }}
+
+ {{ core()->formatPrice($sellerOrder->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-handling') }}
+
+ {{ core()->formatPrice($sellerOrder->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.mail.order.tax') }}
+
+ {{ core()->formatPrice($sellerOrder->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ @if ($sellerOrder->discount_amount)
+
+ {{ __('shop::app.customer.account.order.view.discount-amount') }}
+
+ {{ core()->formatPrice($sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endif
+
+
+ {{ __('shop::app.mail.order.grand-total') }}
+
+ {{ core()->formatPrice($sellerOrder->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+@endcomponent
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-shipment.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-shipment.blade.php
new file mode 100644
index 000000000..d6bc25e2e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/sales/new-shipment.blade.php
@@ -0,0 +1,149 @@
+@component('shop::emails.layouts.master')
+
+ order; ?>
+
+
+
+
+
+ {{ __('marketplace::app.mail.sales.shipment.heading') }}
+
+
+
+ {{ __('shop::app.mail.order.dear', ['customer_name' => $sellerOrder->seller->customer->name]) }},
+
+
+
+ {!! __('marketplace::app.mail.sales.shipment.greeting', [
+ 'order_id' => '#' . $sellerOrder->order_id . ' ',
+ 'created_at' => $sellerOrder->created_at
+ ])
+ !!}
+
+
+
+
+ {{ __('shop::app.mail.shipment.summary') }}
+
+
+
+
+
+ {{ __('shop::app.mail.order.shipping-address') }}
+
+
+
+ {{ $sellerOrder->order->shipping_address->name }}
+
+
+
+ {{ $sellerOrder->order->shipping_address->address1 }}, {{ $sellerOrder->order->shipping_address->address2 ? $sellerOrder->order->shipping_address->address2 . ',' : '' }} {{ $sellerOrder->order->shipping_address->state }}
+
+
+
+ {{ core()->country_name($sellerOrder->order->shipping_address->country) }} {{ $sellerOrder->order->shipping_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $sellerOrder->order->shipping_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.shipping') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+ {{ __('shop::app.mail.shipment.carrier') }} : {{ $sellerShipment->shipment->carrier_title }}
+
+
+
+ {{ __('shop::app.mail.shipment.tracking-number') }} : {{ $sellerShipment->shipment->track_number }}
+
+
+
+
+
+
+ {{ __('shop::app.mail.order.billing-address') }}
+
+
+
+ {{ $sellerOrder->order->billing_address->name }}
+
+
+
+ {{ $sellerOrder->order->billing_address->address1 }}, {{ $sellerOrder->order->billing_address->address2 ? $sellerOrder->order->billing_address->address2 . ',' : '' }} {{ $sellerOrder->order->billing_address->state }}
+
+
+
+ {{ core()->country_name($sellerOrder->order->billing_address->country) }} {{ $sellerOrder->order->billing_address->postcode }}
+
+
+
---
+
+
+ {{ __('shop::app.mail.order.contact') }} : {{ $sellerOrder->order->billing_address->phone }}
+
+
+
+ {{ __('shop::app.mail.order.payment') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
+
+
+
+ @foreach ($sellerShipment->items as $sellerShipmentItem)
+
+
+ {{ $sellerShipmentItem->item->sku }}
+ {{ $sellerShipmentItem->item->name }}
+ {{ $sellerShipmentItem->item->qty }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+@endcomponent
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/adminReportSeller.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/adminReportSeller.blade.php
new file mode 100644
index 000000000..ee87d32b1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/adminReportSeller.blade.php
@@ -0,0 +1,38 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.seller.flag.title', ['name' => $seller->customer->name]) }},
+
+
+
+
+ {{ $reason }}
+
+
+
+
+
+ {{ __('marketplace::app.mail.seller.flag.by-customer') }}
+
+
+
{{$name}}
+
{{$email}}
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/approval.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/approval.blade.php
new file mode 100644
index 000000000..8cc34a061
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/approval.blade.php
@@ -0,0 +1,44 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/disapproval.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/disapproval.blade.php
new file mode 100644
index 000000000..39f2348f8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/disapproval.blade.php
@@ -0,0 +1,44 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/register.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/register.blade.php
new file mode 100644
index 000000000..07f15d75e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/register.blade.php
@@ -0,0 +1,39 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.seller.regisration.dear', ['name' => $admin->name]) }},
+
+
+
+
+ {{ __('marketplace::app.mail.seller.regisration.info', ['name' => $seller->customer->name]) }},
+
+
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/reportSeller.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/reportSeller.blade.php
new file mode 100644
index 000000000..8cc34a061
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/reportSeller.blade.php
@@ -0,0 +1,44 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/sellerQuery.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/sellerQuery.blade.php
new file mode 100644
index 000000000..d510f4de0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/sellerQuery.blade.php
@@ -0,0 +1,28 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
A seller has raised the below query
+
+
{{$query}}
+
+
+
+
+ Seller Details
+
+
{{$name}}
+
{{$email}}
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/emails/seller/welcome.blade.php b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/welcome.blade.php
new file mode 100644
index 000000000..3dbb5eaff
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/emails/seller/welcome.blade.php
@@ -0,0 +1,39 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.mail.seller.welcome.dear', ['name' => $seller->customer->name]) }},
+
+
+
+
+ {{ __('marketplace::app.mail.seller.welcome.info') }}
+
+
+
+
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/index.blade.php
new file mode 100644
index 000000000..dde502f52
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/index.blade.php
@@ -0,0 +1,258 @@
+@extends('shop::layouts.master')
+
+@section('page_title')
+ {{ __('shop::app.checkout.cart.title') }}
+@stop
+
+@section('content-wrapper')
+
+ @if ($cart)
+
+ {{ __('shop::app.checkout.cart.title') }}
+
+
+
+
+
+
+
+ @csrf
+ @foreach ($cart->items as $key => $item)
+ @php
+ $productBaseImage = $item->product->getTypeInstance()->getBaseImage($item);
+
+ if (is_null ($item->product->url_key)) {
+ if (! is_null($item->product->parent)) {
+ $url_key = $item->product->parent->url_key;
+ }
+ } else {
+ $url_key = $item->product->url_key;
+ }
+ @endphp
+
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.name.before', ['item' => $item]) !!}
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.name.after', ['item' => $item]) !!}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.price.before', ['item' => $item]) !!}
+
+
+ {{ core()->currency($item->base_price) }}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.price.after', ['item' => $item]) !!}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.options.before', ['item' => $item]) !!}
+
+ @if (isset($item->additional['attributes']))
+
+
+ @foreach ($item->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.options.after', ['item' => $item]) !!}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.quantity.before', ['item' => $item]) !!}
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.item.quantity.after', ['item' => $item]) !!}
+
+ @if (! cart()->isItemHaveQuantity($item))
+
+ * {{ __('shop::app.checkout.cart.quantity-error') }}
+
+ @endif
+
+
+
+ @endforeach
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.controls.after', ['cart' => $cart]) !!}
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.controls.after', ['cart' => $cart]) !!}
+
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
+
+ @include('shop::checkout.total.summary', ['cart' => $cart])
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
+
+
+
+ @include ('shop::products.view.cross-sells')
+
+ @else
+
+
+ {{ __('shop::app.checkout.cart.title') }}
+
+
+
+
+ {{ __('shop::app.checkout.cart.empty') }}
+
+
+
+ {{ __('shop::app.checkout.cart.continue-shopping') }}
+
+
+
+ @endif
+
+
+@endsection
+
+@push('scripts')
+ @include('shop::checkout.cart.coupon')
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/item-seller-info.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/item-seller-info.blade.php
new file mode 100644
index 000000000..6af26f14f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/item-seller-info.blade.php
@@ -0,0 +1,35 @@
+additional['seller_info']) && !$item->additional['seller_info']['is_owner']) {
+ $seller = $sellerRepository->find($item->additional['seller_info']['seller_id']);
+ } else {
+ $seller = $productRepository->getSellerByProductId($item->product_id);
+ }
+
+?>
+
+@if ($seller && $seller->is_approved)
+
+ getMarketplaceProductByProduct($item->product->id, $seller->id); ?>
+
+ @if (isset($sellerProduct) && $sellerProduct->is_approved)
+
+
+
+ @endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/mini-cart.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/mini-cart.blade.php
new file mode 100644
index 000000000..a10061f28
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/checkout/cart/mini-cart.blade.php
@@ -0,0 +1,103 @@
+getCart(); ?>
+
+@if ($cart)
+ items; ?>
+
+
+
+
+
+
+
+ {{ __('shop::app.header.cart') }}
+ ({{ $cart->items->count() }})
+
+
+
+
+
+
+
+
+
+
+
+ @foreach ($items as $item)
+
+
+
+ @php
+ $images = $item->product->getTypeInstance()->getBaseImage($item);
+ @endphp
+
+
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.name.before', ['item' => $item]) !!}
+
+
{{ $item->name }}
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.name.after', ['item' => $item]) !!}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.options.before', ['item' => $item]) !!}
+
+ @if (isset($item->additional['attributes']))
+
+
+ @foreach ($item->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.options.after', ['item' => $item]) !!}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.price.before', ['item' => $item]) !!}
+
+
{{ core()->currency($item->base_total) }}
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.price.after', ['item' => $item]) !!}
+
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.before', ['item' => $item]) !!}
+
+
Quantity - {{ $item->quantity }}
+
+ {!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.after', ['item' => $item]) !!}
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+@else
+
+
+
+
+ {{ __('shop::app.minicart.cart') }} ({{ __('shop::app.minicart.zero') }})
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/account/orders/view.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/account/orders/view.blade.php
new file mode 100644
index 000000000..3ec466bf6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/account/orders/view.blade.php
@@ -0,0 +1,558 @@
+@extends('shop::layouts.master')
+
+@section('page_title')
+ {{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->increment_id]) }}
+@endsection
+
+@section('content-wrapper')
+
+
+ @include('shop::customers.account.partials.sidemenu')
+
+
+
+
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.placed-on') }}
+
+
+
+ {{ core()->formatDate($order->created_at, 'd M Y') }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.item-status') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-percent') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($order->items as $item)
+
+
+ {{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
+
+
+
+ {{ $item->name }}
+
+ @include('marketplace::shop.products.product-seller-info', ['product' => $item])
+
+ @if (isset($item->additional['attributes']))
+
+
+ @foreach ($item->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+
+
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $item->qty_ordered]) }}
+
+
+
+ {{ $item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $item->qty_invoiced]) : '' }}
+
+
+
+ {{ $item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $item->qty_shipped]) : '' }}
+
+
+
+ {{ $item->qty_refunded ? __('shop::app.customer.account.order.view.item-refunded', ['qty_refunded' => $item->qty_refunded]) : '' }}
+
+
+
+ {{ $item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $item->qty_canceled]) : '' }}
+
+
+
+
+ {{ core()->formatPrice($item->total, $order->order_currency_code) }}
+
+
+
+ {{ number_format($item->tax_percent, 2) }}%
+
+
+
+ {{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($item->total + $item->tax_amount - $item->discount_amount, $order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
+
+
+ @if ($order->haveStockableItems())
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
+
+ @endif
+
+ @if ($order->base_discount_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ @if ($order->coupon_code)
+ ({{ $order->coupon_code }})
+ @endif
+
+ -
+ {{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-paid') }}
+ -
+ {{ core()->formatPrice($order->grand_total_invoiced, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-refunded') }}
+ -
+ {{ core()->formatPrice($order->grand_total_refunded, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-due') }}
+ -
+ {{ core()->formatPrice($order->total_due, $order->order_currency_code) }}
+
+
+
+
+
+
+
+
+ @if ($order->invoices->count())
+
+
+ @foreach ($order->invoices as $invoice)
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($invoice->items as $item)
+
+
+ {{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
+
+
+
+ {{ $item->name }}
+
+
+
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+
+
+
+ {{ $item->qty }}
+
+
+
+ {{ core()->formatPrice($item->total, $order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($invoice->sub_total, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($invoice->shipping_amount, $order->order_currency_code) }}
+
+
+ @if ($order->base_discount_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($invoice->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($invoice->grand_total, $order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+
+ @endif
+
+ @if ($order->shipments->count())
+
+
+ @foreach ($order->shipments as $shipment)
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.tracking-number') }}
+
+
+
+ {{ $shipment->track_number }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $shipment->id]) }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
+
+
+
+ @foreach ($shipment->items as $item)
+
+
+ {{ $item->sku }}
+ {{ $item->name }}
+ {{ $item->qty }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ @endforeach
+
+
+ @endif
+
+ @if ($order->refunds->count())
+
+
+ @foreach ($order->refunds as $refund)
+
+
+
+ {{ __('shop::app.customer.account.order.view.individual-refund', ['refund_id' => $refund->id]) }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($refund->items as $item)
+
+ {{ $item->child ? $item->child->sku : $item->sku }}
+ {{ $item->name }}
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+ {{ $item->qty }}
+ {{ core()->formatPrice($item->total, $order->order_currency_code) }}
+ {{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
+ {{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}
+
+ @endforeach
+
+ @if (! $refund->items->count())
+
+ {{ __('shop::app.common.no-result-found') }}
+
+ @endif
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($refund->sub_total, $order->order_currency_code) }}
+
+
+ @if ($refund->shipping_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($refund->shipping_amount, $order->order_currency_code) }}
+
+ @endif
+
+ @if ($refund->discount_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
+
+ @endif
+
+ @if ($refund->tax_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($refund->tax_amount, $order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.adjustment-refund') }}
+ -
+ {{ core()->formatPrice($refund->adjustment_refund, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.adjustment-fee') }}
+ -
+ {{ core()->formatPrice($refund->adjustment_fee, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($refund->grand_total, $order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+
+ @endif
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+ @include ('admin::sales.address', ['address' => $order->billing_address])
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.billing-address.after', ['order' => $order]) !!}
+
+
+
+ @if ($order->shipping_address)
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+ @include ('admin::sales.address', ['address' => $order->shipping_address])
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.shipping-address.after', ['order' => $order]) !!}
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+ {{ $order->shipping_title }}
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.shipping-method.after', ['order' => $order]) !!}
+
+
+ @endif
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
+
+ @php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
+
+ @if (! empty($additionalDetails))
+
+
{{ $additionalDetails['title'] }}
+
{{ $additionalDetails['value'] }}
+
+ @endif
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.payment-method.after', ['order' => $order]) !!}
+
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.after', ['order' => $order]) !!}
+
+
+
+
+
+@endsection
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/account/partials/sidemenu.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/account/partials/sidemenu.blade.php
new file mode 100644
index 000000000..110d517eb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/account/partials/sidemenu.blade.php
@@ -0,0 +1,95 @@
+
+
+@push('scripts')
+
+@endpush
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/signup/seller.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/signup/seller.blade.php
new file mode 100644
index 000000000..449cbcd75
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/customers/signup/seller.blade.php
@@ -0,0 +1,105 @@
+@if (core()->getConfigData('marketplace.settings.general.status'))
+@push('css')
+
+@endpush
+
+
+
+@push('scripts')
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/emails/contact-seller.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/emails/contact-seller.blade.php
new file mode 100644
index 000000000..3f2629ce8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/emails/contact-seller.blade.php
@@ -0,0 +1,36 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.dear', ['name' => $sellerName]) }},
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.info') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.query') }}
+
+
+
+ {{ $query }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.thanks') }}
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/flags/product-flag.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/flags/product-flag.blade.php
new file mode 100644
index 000000000..dd99f8999
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/flags/product-flag.blade.php
@@ -0,0 +1,373 @@
+@push('css')
+
+@endpush
+
+@php
+ $productRepository = app('Webkul\Marketplace\Repositories\ProductRepository');
+ $productFlags = app('Webkul\Marketplace\Repositories\ProductFlagReasonRepository')->findWhere(['status' => 1]);
+ $seller = $productRepository->getSellerByProductId($product->product->id) ;
+
+ if ($seller) {
+ $sellerProducts = $productRepository->findWhere(['marketplace_seller_id' => $seller->id, 'is_approved' => 1]);
+ }
+
+@endphp
+
+@if ($seller)
+
+
+
+
+
+
+ @foreach ($sellerProducts as $sellerProduct)
+ @if ($sellerProduct->product->url_key)
+
+ @endif
+ @endforeach
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.contact-seller') }}
+
+
+
+
+
+
+
+
+@push('scripts')
+
+
+
+
+
+
+
+
+@endpush
+
+@endif
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/google-analytics/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/google-analytics/index.blade.php
new file mode 100644
index 000000000..5ae785552
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/google-analytics/index.blade.php
@@ -0,0 +1,25 @@
+@if ($analyticsId = core()->getConfigData('marketplace.settings.google_analytics.google_analytics_id'))
+
+
+
+@endif
+
+@if(core()->getConfigData('marketplace.settings.google_analytics.seller_google_analytics'))
+ @php $analyticsids = app('Webkul\Marketplace\Repositories\SellerRepository')->findWhere([['google_analytics_id' ,'!=', null]]) @endphp
+ @foreach ($analyticsids as $analyticsid)
+
+
+ @endforeach
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/home/featured-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/home/featured-products.blade.php
new file mode 100644
index 000000000..72038a211
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/home/featured-products.blade.php
@@ -0,0 +1,23 @@
+@if (core()->getConfigData('marketplace.settings.general.featured'))
+@if (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts()->count())
+
+
+
+ {{ __('shop::app.home.featured-products') }}
+
+ _____
+
+
+
+
+ @foreach (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts() as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+
+
+
+@endif
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/home/new-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/home/new-products.blade.php
new file mode 100644
index 000000000..296e2993e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/home/new-products.blade.php
@@ -0,0 +1,24 @@
+@if (core()->getConfigData('marketplace.settings.general.new'))
+@if (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts()->count())
+
+
+
+ {{ __('shop::app.home.new-products') }}
+
+ _____
+
+
+
+
+ @foreach (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts() as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+
+
+
+@endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/account.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/account.blade.php
new file mode 100644
index 000000000..5dfca733a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/account.blade.php
@@ -0,0 +1,10 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('content-wrapper')
+
+ @include('shop::customers.account.partials.sidemenu')
+
+ @yield('content')
+
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/header/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/header/index.blade.php
new file mode 100644
index 000000000..84bfa90ac
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/header/index.blade.php
@@ -0,0 +1,7 @@
+{{-- --}}
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/master.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/master.blade.php
new file mode 100644
index 000000000..752c2fc8b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/layouts/master.blade.php
@@ -0,0 +1,9 @@
+@extends('shop::layouts.master')
+
+@push('css')
+
+@endpush
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/add-buttons.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/add-buttons.blade.php
new file mode 100644
index 000000000..d2908d73e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/add-buttons.blade.php
@@ -0,0 +1,50 @@
+@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
+
+@php
+ $showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
+
+ $showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
+@endphp
+
+@if($product->type == 'simple' || $product->type == 'configurable')
+ @inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+
+
+ @csrf
+
+
+ isSaleable($product) ? '' : 'disabled' }}>{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
+
+
+ @if ($showWishlist)
+ @include('shop::products.wishlist')
+ @endif
+
+ @if ($showCompare)
+ @include('shop::products.compare', [
+ 'productId' => $product->id
+ ])
+ @endif
+
+@else
+
+
+ @csrf
+
+
+ isSaleable() ? '' : 'disabled' }}>{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
+
+
+ @if ($showWishlist)
+ @include('shop::products.wishlist')
+ @endif
+
+ @if ($showCompare)
+ @include('shop::products.compare', [
+ 'productId' => $product->id
+ ])
+ @endif
+
+@endif
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/add-to-cart.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/add-to-cart.blade.php
new file mode 100644
index 000000000..300122faf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/add-to-cart.blade.php
@@ -0,0 +1,19 @@
+{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
+@inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+@php
+ $width = (core()->getConfigData('catalog.products.storefront.buy_now_button_display') == 1) ? '49' : '95';
+@endphp
+
+@if($product->type == 'simple' || $product->type == 'configurable')
+ isSaleable($product) ? 'disabled' : '' }}
+ style="width: ;">
+ {{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
+
+@else
+ isSaleable() ? 'disabled' : '' }}
+ style="width: ;">
+ {{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
+
+@endif
+{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/buy-now.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/buy-now.blade.php
new file mode 100644
index 000000000..875a2de83
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/buy-now.blade.php
@@ -0,0 +1,14 @@
+{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
+@if($product->type == 'simple' || $product->type == 'configurable')
+ @inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+ isSaleable($product) ? 'disabled' : '' }}>
+ {{ __('shop::app.products.buy-now') }}
+
+@else
+ isSaleable(1) ? 'disabled' : '' }}>
+ {{ __('shop::app.products.buy-now') }}
+
+@endif
+
+{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/list/up-sell-card.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/list/up-sell-card.blade.php
new file mode 100644
index 000000000..aed778a32
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/list/up-sell-card.blade.php
@@ -0,0 +1,192 @@
+@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
+@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
+
+@push('css')
+
+@endpush
+
+@php
+ if (isset($checkmode) && $checkmode && $toolbarHelper->getCurrentMode() == "list") {
+ $list = true;
+ }
+
+ if (isset($item)) {
+ $productBaseImage = productimage()->getProductImage($item);
+ } else {
+ $productBaseImage = productimage()->getProductBaseImage($product);
+ }
+
+ $totalReviews = $reviewHelper->getTotalReviews($product);
+ $avgRatings = ceil($reviewHelper->getAverageRating($product));
+
+ $galleryImages = productimage()->getGalleryImages($product);
+ $priceHTML = view('shop::products.price', ['product' => $product])->render();
+
+ $product->__set('priceHTML', $priceHTML);
+ $product->__set('avgRating', $avgRatings);
+ $product->__set('totalReviews', $totalReviews);
+ $product->__set('galleryImages', $galleryImages);
+ $product->__set('shortDescription', $product->short_description);
+ $product->__set('firstReviewText', trans('velocity::app.products.be-first-review'));
+ $product->__set('addToCartHtml', view('shop::products.add-to-cart', [
+ 'product' => $product,
+ 'addWishlistClass' => ! (isset($list) && $list) ? '' : '',
+
+ 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
+ ? true : false,
+
+ 'btnText' => null,
+ 'moveToCart' => null,
+ 'addToCartBtnClass' => '',
+ ])->render());
+
+@endphp
+
+{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
+ @if (isset($list) && $list)
+
+ @else
+
+
+
+
+
+
+ @if ($product->new)
+
+ {{ __('shop::app.products.new') }}
+
+ @endif
+
+
+
+
+
+ @include ('shop::products.price', ['product' => $product])
+
+
+ @if ($totalReviews)
+
+
+
+ {{ __('velocity::app.products.ratings', ['totalRatings' => $totalReviews ]) }}
+
+
+ @else
+
+ {{ __('velocity::app.products.be-first-review') }}
+
+ @endif
+
+
+ @include ('shop::products.add-to-cart', [
+ 'product' => $product,
+ 'btnText' => $btnText ?? null,
+ 'moveToCart' => $moveToCart ?? null,
+ 'wishlistMoveRoute' => $wishlistMoveRoute ?? null,
+ 'reloadPage' => $reloadPage ?? null,
+ 'addToCartForm' => $addToCartForm ?? false,
+ 'addToCartBtnClass' => $addToCartBtnClass ?? '',
+ 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
+ ? true : false,
+ ])
+
+
+
+ @endif
+
+{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/offers.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/offers.blade.php
new file mode 100644
index 000000000..b7252e11e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/offers.blade.php
@@ -0,0 +1,281 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ trim($product->meta_title) != "" ? $product->meta_title : $product->name }}
+@stop
+
+@section('seo')
+ meta_description : Illuminate\Support\Str::limit(strip_tags($product->description), 120, '') }}"/>
+
+@stop
+
+@section('content-wrapper')
+
+ parent_id ? $product->parent : $product;
+
+ $productRepository = app('Webkul\Marketplace\Repositories\ProductRepository');
+ ?>
+
+ {!! view_render_event('bagisto.shop.sellers.products.offers.before', ['product' => $product]) !!}
+
+
+
+
+
+
+
+
+ @include ('shop::products.review', ['product' => $baseProduct])
+
+
+
+
+
+
{{ __('marketplace::app.shop.products.more-sellers') }}
+
+
+
+ @foreach ($productRepository->getSellerProducts($product) as $sellerProduct)
+
+ @csrf()
+
+
+
+
+
+ @if ($baseProduct->type == 'configurable')
+
+
+ @foreach ($attributes as $attributeId => $optionId)
+
+ @endforeach
+ @endif
+
+
+
+
+
+
+
+
+
+
+ @if ($logo = $sellerProduct->seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+ @if ($sellerProduct->condition == 'new')
+ {{ __('marketplace::app.shop.products.new') }}
+ @else
+ {{ __('marketplace::app.shop.products.used') }}
+ @endif
+
+
+
+
+ @if ($sellerProduct->is_owner)
+ @if ($product->getTypeInstance()->haveSpecialPrice($sellerProduct))
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($sellerProduct->price) }}
+
+
{{ core()->currency($product->getTypeInstance()->getSpecialPrice($sellerProduct)) }}
+ @else
+
{{ core()->currency($sellerProduct->price) }}
+ @endif
+
+ @else
+
{{ core()->currency($sellerProduct->price) }}
+ @endif
+
+
+
+
+
+
+
+
+ @if ($sellerProduct->haveSufficientQuantity(1))
+
+
+ {{ __('marketplace::app.shop.products.add-to-cart') }}
+
+ @else
+
+
+ {{ __('marketplace::app.shop.products.out-of-stock') }}
+
+
+ @endif
+
+
+
+
+
+
+
+
+ parent_id ? $sellerProduct->parent : $sellerProduct; ?>
+
+
+
+
+
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.shop.sellers.products.offers.after', ['product' => $product]) !!}
+
+@endsection
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/popular-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/popular-products.blade.php
new file mode 100644
index 000000000..02937e11d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/popular-products.blade.php
@@ -0,0 +1,27 @@
+getPopularProducts($seller->id) ?>
+
+@if ($products->count())
+
+
+
+
+
+
+ @foreach ($products as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat->product])
+
+ @endforeach
+
+
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/price.blade.php
new file mode 100644
index 000000000..c9fbf85d0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/price.blade.php
@@ -0,0 +1,25 @@
+{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
+
+
+ @inject ('priceHelper', 'Webkul\Marketplace\Helpers\Price')
+
+ @if ($product->type == 'configurable')
+
{{ __('shop::app.products.price-label') }}
+
+
{{ core()->currency($priceHelper->getMinimalPrice($product)) }}
+ @else
+ @if ($priceHelper->haveSpecialPrice($product))
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($product->price) }}
+
+
{{ core()->currency($priceHelper->getSpecialPrice($product)) }}
+ @else
+
{{ core()->currency($product->price) }}
+ @endif
+ @endif
+
+
+{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/product-seller-info.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/product-seller-info.blade.php
new file mode 100644
index 000000000..5dbb16047
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/product-seller-info.blade.php
@@ -0,0 +1,41 @@
+@push('css')
+
+@endpush
+
+getSellerByProductId($product->product_id);
+
+?>
+
+@if ($seller && $seller->is_approved)
+
+ getMarketplaceProductByProduct($product->product_id, $seller->id); ?>
+
+ @if ($sellerProduct->is_approved)
+
+
+
+ @endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/product-sellers.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/product-sellers.blade.php
new file mode 100644
index 000000000..0f377951d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/product-sellers.blade.php
@@ -0,0 +1,70 @@
+
+
+@if (request()->route()->getName() == 'shop.productOrCategory.index')
+
+ @push('css')
+
+ @endpush
+
+ @if ($product->type != 'configurable')
+ @if ($count = $productRepository->getSellerCount($product->product))
+
+ @endif
+ @else
+
+
+ product->variants as $variant) {
+ $variants[$variant->id] = $productRepository->getSellerCount($variant);
+ }
+
+ ?>
+
+ @push('scripts')
+
+
+
+ @endpush
+ @endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/cross-sells.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/cross-sells.blade.php
new file mode 100644
index 000000000..def4e8d26
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/cross-sells.blade.php
@@ -0,0 +1,61 @@
+@foreach ($cart->items as $item)
+ product;
+
+ if ($product->cross_sells()->count()) {
+ $products[] = $product;
+ $products = array_unique($products);
+ }
+ ?>
+@endforeach
+
+@if (isset($products))
+
+
+
+
+
+
+ @foreach($products as $product)
+ @foreach ($product->cross_sells()->paginate(2) as $index => $crossSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $crossSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+ @endforeach
+
+
+
+
+
+
+ @foreach($products as $product)
+ @foreach ($product->cross_sells()->paginate(2) as $index => $crossSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $crossSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/related-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/related-products.blade.php
new file mode 100644
index 000000000..b9d1e52e4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/related-products.blade.php
@@ -0,0 +1,49 @@
+related_products()->get();
+?>
+
+@if ($relatedProducts->count())
+
+
+
+
+
+ @foreach ($relatedProducts as $index => $relatedProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $relatedProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+
+
+
+
+ @foreach ($relatedProducts as $index => $relatedProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $relatedProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/stock.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/stock.blade.php
new file mode 100644
index 000000000..12e179acb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/stock.blade.php
@@ -0,0 +1,26 @@
+{!! view_render_event('bagisto.shop.products.view.stock.before', ['product' => $product]) !!}
+
+@if($product->type == 'simple' || $product->type == 'configurable')
+ @inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+
+ @if ( $InventoryHelper->stockHaveSufficientQuantity($product) === true )
+ {{ __('shop::app.products.in-stock') }}
+ @elseif ( $InventoryHelper->stockHaveSufficientQuantity($product) > 0 )
+ {{ __('shop::app.products.available-for-order') }}
+ @else
+ {{ __('shop::app.products.out-of-stock') }}
+ @endif
+
+@else
+
+ @if ( $product->haveSufficientQuantity(1) === true )
+ {{ __('shop::app.products.in-stock') }}
+ @elseif ( $product->haveSufficientQuantity(1) > 0 )
+ {{ __('shop::app.products.available-for-order') }}
+ @else
+ {{ __('shop::app.products.out-of-stock') }}
+ @endif
+
+@endif
+{!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/up-sells.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/up-sells.blade.php
new file mode 100644
index 000000000..86ec10bae
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/products/view/up-sells.blade.php
@@ -0,0 +1,48 @@
+up_sells()->get();
+?>
+@if ($productUpSells->count())
+
+
+
+
+
+ @foreach ($productUpSells as $index => $upSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $upSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+
+
+
+
+ @foreach ($productUpSells as $index => $upSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $upSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/seller-central/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/seller-central/index.blade.php
new file mode 100644
index 000000000..94ec4cefb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/seller-central/index.blade.php
@@ -0,0 +1,310 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.marketplace.title') }}
+@stop
+
+@section('content-wrapper')
+
+
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.show_banner'))
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.show_features'))
+
+
+
{{ core()->getConfigData('marketplace.settings.landing_page.feature_heading') ?? __('marketplace::app.shop.marketplace.features') }}
+
+
{{ core()->getConfigData('marketplace.settings.landing_page.feature_info') ?? __('marketplace::app.shop.marketplace.features-info') }}
+
+
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_1') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_1'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_1') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_2') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_2'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_2') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_3') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_3'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_3') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_4') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_4'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_4') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_5') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_5'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_5') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_6') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_6'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_6') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_7') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_7'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_7') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.feature_icon_8') && core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_8'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.landing_page.feature_icon_label_8') }}
+
+
+ @endif
+
+
+
+ @endif
+
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.show_popular_sellers'))
+ getPopularSellers(); ?>
+
+ @if ($popularSellers->count())
+
+
+ {{ __('marketplace::app.shop.marketplace.popular-sellers') }}
+
+
+
+
+ @foreach ($popularSellers as $seller)
+
+
+
+
+ getPopularProducts($seller->id); ?>
+
+
+
+ @foreach ($popularProducts as $sellerProduct)
+
+ getProductBaseImage($sellerProduct->product, 5) ?>
+
+
+ @endforeach
+
+
+
+
+ @endforeach
+
+
+
+ @endif
+ @endif
+
+
+
+ {!! core()->getConfigData('marketplace.settings.landing_page.about_marketplace') !!}
+
+
+
+
+
+
{{ __('marketplace::app.shop.marketplace.setup-title') }}
+
+
{{ __('marketplace::app.shop.marketplace.setup-info') }}
+
+
+
+
+
+ 1
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-1') }}
+
+
+
+
+ 2
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-2') }}
+
+
+
+
+ 3
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-3') }}
+
+
+
+
+ 4
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-4') }}
+
+
+
+
+ 5
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-5') }}
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.landing_page.show_open_shop_block'))
+
+ @endif
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/assign-videos.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/assign-videos.blade.php
new file mode 100644
index 000000000..800a14c97
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/assign-videos.blade.php
@@ -0,0 +1,205 @@
+@php
+ if(! isset($product)) {
+ $product = null;
+
+ }
+@endphp
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.before', ['product' => $product]) !!}
+
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.before', ['product' => $product]) !!}
+
+
+
{{ __('admin::app.catalog.products.video') }}
+
+
+
+
+ @php $count=1 @endphp
+ @foreach ($errors->get('videos.*') as $key => $message)
+ @php echo str_replace($key, 'Video'.$count, $message[0]); $count++ @endphp
+ @endforeach
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.after', ['product' => $product]) !!}
+
+
+
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/categories.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/categories.blade.php
new file mode 100644
index 000000000..535afbd92
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/categories.blade.php
@@ -0,0 +1,12 @@
+@if ($categories->count())
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.controls.before', ['product' => $product]) !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.controls.after', ['product' => $product]) !!}
+
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/customer-group-price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/customer-group-price.blade.php
new file mode 100644
index 000000000..a32509ed9
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/customer-group-price.blade.php
@@ -0,0 +1,162 @@
+@section('css')
+ @parent
+
+@stop
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.customer_group_prices.before', ['product' => $product]) !!}
+
+
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.customer_group_prices.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/images.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/images.blade.php
new file mode 100644
index 000000000..47756e0ce
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/images.blade.php
@@ -0,0 +1,24 @@
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.controls.before', ['product' => $product]) !!}
+
+
+ {{ __('admin::app.catalog.categories.image') }}
+
+
+
+
+ @php $count=1 @endphp
+ @foreach ($errors->get('images.*') as $key => $message)
+ @php echo str_replace($key, 'Image'.$count, $message[0]); $count++ @endphp
+ @endforeach
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.controls.after', ['product' => $product]) !!}
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/inventories.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/inventories.blade.php
new file mode 100644
index 000000000..1bca65a9b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/inventories.blade.php
@@ -0,0 +1,39 @@
+@if ($product->type != 'configurable')
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.controls.before', ['product' => $product]) !!}
+
+ getMarketplaceProductByProduct($product->id); ?>
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+ inventories as $inventory) {
+ if($inventory->inventory_source_id == $inventorySource->id && $inventory->vendor_id == $sellerProduct->marketplace_seller_id) {
+ $qty = $inventory->qty;
+ break;
+ }
+ }
+
+ $qty = old('inventories[' . $inventorySource->id . ']') ?: $qty;
+
+ ?>
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.controls.after', ['product' => $product]) !!}
+
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/product-links.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/product-links.blade.php
new file mode 100644
index 000000000..eb4c0b5d8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/product-links.blade.php
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/variations.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/variations.blade.php
new file mode 100644
index 000000000..14d9af7d1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/variations.blade.php
@@ -0,0 +1,355 @@
+@if ($product->type == 'configurable')
+
+@section('css')
+
+@stop
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.controls.before', ['product' => $product]) !!}
+
+
+ {{ __('admin::app.catalog.products.add-variant-btn-title') }}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.controls.after', ['product' => $product]) !!}
+
+
+
+
+
+ {{ __('admin::app.catalog.products.add-variant-title') }}
+
+
+
+
+
+
+
+getMarketplaceProductByProduct($product->id); ?>
+
+@push('scripts')
+
+
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/videos.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/videos.blade.php
new file mode 100644
index 000000000..49cede72b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/accordians/videos.blade.php
@@ -0,0 +1,198 @@
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.before', ['product' => $product]) !!}
+
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.before', ['product' => $product]) !!}
+
+
+
{{ __('admin::app.catalog.products.video') }}
+
+
+
+
+ @php $count=1 @endphp
+ @foreach ($errors->get('videos.*') as $key => $message)
+ @php echo str_replace($key, 'Video'.$count, $message[0]); $count++ @endphp
+ @endforeach
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.after', ['product' => $product]) !!}
+
+
+
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/assign.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/assign.blade.php
new file mode 100644
index 000000000..792234c96
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/assign.blade.php
@@ -0,0 +1,272 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.save-btn-title') }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.assign.before') !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.product-condition') }}
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.new') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.old') }}
+
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.price') }}
+ type == 'configurable' ? 'disabled' : '' }}/>
+ @{{ errors.first('price') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.description') }}
+ {{ old('description') }}
+ @{{ errors.first('description') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @if ($baseProduct->type != 'configurable')
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+
+
+ @endif
+
+
+
+ @if ($baseProduct->type == 'configurable')
+
+
+
+
+
+
+
+ @endif
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.assign.after') !!}
+
+
+
+
+
+@endsection
+
+@if ($baseProduct->type == 'configurable')
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/create.blade.php
new file mode 100644
index 000000000..76d79e181
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/create.blade.php
@@ -0,0 +1,152 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.create-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.create-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.create') }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create.before') !!}
+
+
+
+ @csrf()
+
+ input('family') ?>
+ input('sku') ?>
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.general.before') !!}
+
+
+
+
+
+ {{ __('admin::app.catalog.products.product-type') }}
+
+ {{ __('admin::app.catalog.products.simple') }}
+ {{ __('admin::app.catalog.products.configurable') }}
+
+
+ @if ($familyId)
+
+ @endif
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('admin::app.catalog.products.familiy') }}
+
+
+ @foreach ($families as $family)
+ id || old('attribute_family_id') == $family->id) ? 'selected' : '' }}>{{ $family->name }}
+ @endforeach
+
+
+ @if ($familyId)
+
+ @endif
+ @{{ errors.first('attribute_family_id') }}
+
+
+
+ {{ __('admin::app.catalog.products.sku') }}
+
+ @{{ errors.first('sku') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.general.after') !!}
+
+
+ @if ($familyId)
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.configurable_attributes.before') !!}
+
+
+
+
+
+
+
+
+ {{ __('admin::app.catalog.products.attribute-header') }}
+ {{ __('admin::app.catalog.products.attribute-option-header') }}
+
+
+
+
+
+ @foreach ($configurableFamily->configurable_attributes as $attribute)
+
+
+ {{ $attribute->admin_name }}
+
+
+ @foreach ($attribute->options as $option)
+
+
+ {{ $option->admin_name }}
+
+
+
+ @endforeach
+
+
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.configurable_attributes.after') !!}
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create.after') !!}
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/edit-assign.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/edit-assign.blade.php
new file mode 100644
index 000000000..3e5bbc028
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/edit-assign.blade.php
@@ -0,0 +1,339 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-edit-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-edit-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.save-btn-title') }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit-assign.before') !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.product-condition') }}
+
+ condition ?>
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.new') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.old') }}
+
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.price') }}
+ product->type == 'configurable' ? 'disabled' : '' }}/>
+ @{{ errors.first('price') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.description') }}
+ {{ old('description') ?: $product->description }}
+ @{{ errors.first('description') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.assign-videos')
+
+ @if ($product->product->type != 'configurable')
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+
+ product->inventories as $inventory) {
+ if ($inventory->inventory_source_id == $inventorySource->id && $inventory->vendor_id == $product->marketplace_seller_id) {
+ $qty = $inventory->qty;
+ break;
+ }
+ }
+
+ $qty = old('inventories[' . $inventorySource->id . ']') ?: $qty;
+
+ ?>
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+
+
+ @endif
+
+ @if ($product->product->type == 'configurable')
+
+
+
+
+
+
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit-assign.after') !!}
+
+
+
+
+
+@endsection
+
+@if ($product->product->type == 'configurable')
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/edit.blade.php
new file mode 100644
index 000000000..ed53999da
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/edit.blade.php
@@ -0,0 +1,204 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.edit-title') }}
+@endsection
+
+@section('content')
+
+
+ getLocale(); ?>
+ getCurrentChannelCode(); ?>
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit.before', ['product' => $product]) !!}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.edit-title') }}
+
+
+
+
+ {{ __('admin::app.catalog.products.save-btn-title') }}
+
+
+
+
+
+
+
+
+
+ @csrf()
+
+
+
+
+
+ getSellerByProductId($product->id);
+
+ $sellerProduct = $productRepository->getMarketplaceProductByProduct($product->id, $seller->id);
+ ?>
+
+ @foreach ($product->attribute_family->attribute_groups as $attributeGroup)
+ @if (count($attributeGroup->custom_attributes))
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.before', ['product' => $product]) !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.controls.before', ['product' => $product]) !!}
+
+ @foreach ($attributeGroup->custom_attributes as $attribute)
+
+ @if (! $product->super_attributes->contains($attribute))
+
+ type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight'])) {
+ if (! $attribute->is_required)
+ continue;
+
+ $disabled = true;
+ } else {
+ if ($attribute->is_required) {
+ array_push($validations, 'required');
+ }
+
+ if ($attribute->type == 'price') {
+ array_push($validations, 'decimal');
+ }
+
+ array_push($validations, $attribute->validation);
+ }
+
+ $validations = implode('|', array_filter($validations));
+
+ if ($attribute->code == 'status' && !$sellerProduct->is_approved) {
+ echo '
';
+ continue;
+ }
+
+ ?>
+
+ @if (view()->exists($typeView = 'admin::catalog.products.field-types.' . $attribute->type))
+
+
+ is_required ? 'class=required' : '' }}>
+ {{ $attribute->admin_name }}
+
+ @if ($attribute->type == 'price')
+ ({{ core()->currencySymbol(core()->getBaseCurrencyCode()) }})
+ @endif
+
+ value_per_channel) {
+ array_push($channel_locale, $channel);
+ }
+
+ if ($attribute->value_per_locale) {
+ array_push($channel_locale, $locale);
+ }
+ ?>
+
+ @if (count($channel_locale))
+ [{{ implode(' - ', $channel_locale) }}]
+ @endif
+
+
+ @include ($typeView)
+
+ @{{ errors.first('{!! $attribute->code !!}') }}
+
+
+ @endif
+
+ @endif
+
+ @endforeach
+
+ @if ($attributeGroup->name == 'Price')
+
+ @include('marketplace::shop.sellers.account.catalog.products.accordians.customer-group-price')
+
+ @endif
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.controls.after', ['product' => $product]) !!}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.after', ['product' => $product]) !!}
+
+ @endif
+
+ @endforeach
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.inventories')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.after', ['product' => $product]) !!}
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.images')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.after', ['product' => $product]) !!}
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.videos.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.videos')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.categories')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.after', ['product' => $product]) !!}
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.variations')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.after', ['product' => $product]) !!}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit.after', ['product' => $product]) !!}
+
+
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/index.blade.php
new file mode 100644
index 000000000..fa96dd3bf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/index.blade.php
@@ -0,0 +1,37 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.title') }}
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.list.before') !!}
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\ProductDataGrid')->render() !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/search.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/search.blade.php
new file mode 100644
index 000000000..dd3b435e2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/catalog/products/search.blade.php
@@ -0,0 +1,147 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.search-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.search-title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.search.before') !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.search.after') !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/customers/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/customers/index.blade.php
new file mode 100644
index 000000000..fe43fad7c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/customers/index.blade.php
@@ -0,0 +1,31 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.customer.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.customer.title') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.customer.list.before') !!}
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\CustomerDataGrid')->render() !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.customer.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/customers/orders.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/customers/orders.blade.php
new file mode 100644
index 000000000..340e86458
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/customers/orders.blade.php
@@ -0,0 +1,31 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.customer.orders.list.before') !!}
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\CustomerOrderDataGrid')->render() !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.customer.orders.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/dashboard/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/dashboard/index.blade.php
new file mode 100644
index 000000000..a36d4eecf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/dashboard/index.blade.php
@@ -0,0 +1,463 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.dashboard.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.dashboard.title') }}
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.dashboard.before') !!}
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-orders') }}
+
+
+
+ {{ $statistics['total_orders']['current'] }}
+
+
+ @if ($statistics['total_orders']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_orders']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_orders']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-sale') }}
+
+
+
+ {{ core()->formatPrice($statistics['total_sales']['current'], $currentCurrencyCode) }}
+
+
+ @if ($statistics['total_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_sales']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.average-sale') }}
+
+
+
+ {{ core()->formatPrice($statistics['avg_sales']['current'], $currentCurrencyCode) }}
+
+
+ @if ($statistics['avg_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.dashboard.sales-by-location') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.sales') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.top-selling-products') }}
+
+
+
+
+
+ @if (! count($statistics['top_selling_products']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+ {{ __('admin::app.dashboard.customer-with-most-sales') }}
+
+
+
+
+
+ @foreach ($statistics['customer_with_most_sales'] as $item)
+
+
+
+
+
+
+
+
+ {{ $item->customer_full_name }}
+
+
+
+ {{ __('admin::app.dashboard.order-count', ['count' => $item->total_orders]) }}
+ .
+ {{ __('admin::app.dashboard.revenue', [
+ 'total' => core()->formatBasePrice($item->total_base_grand_total)
+ ])
+ }}
+
+
+
+
+ @endforeach
+
+
+
+ @if (! count($statistics['customer_with_most_sales']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.stock-threshold') }}
+
+
+
+
+
+ @if (! count($statistics['stock_threshold']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.dashboard.after') !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/earning/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/earning/index.blade.php
new file mode 100644
index 000000000..88b64251e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/earning/index.blade.php
@@ -0,0 +1,218 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.earning.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.earning.title') }}
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.earning.before') !!}
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.sales') }}
+
+
+
+
+
+
+
+
+
+
+ {{-- @dd($statistics['sale_graph']['label']) --}}
+
+
+
+
+
+
+
+ Interval
+ Orders
+ Total Amount
+ Total Earning
+ Total Discount
+ Admin comission
+
+
+
+
+ @foreach ($statistics['sale_graph']['label'] as $key => $label)
+
+ {{$label}}
+ {{$statistics['sale_graph']['orders'][$key]}}
+ {{$statistics['sale_graph']['total'][$key]}}
+ {{$statistics['sale_graph']['total_earning'][$key]}}
+ {{$statistics['sale_graph']['discount'][$key]}}
+ {{$statistics['sale_graph']['commission'][$key]}}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.earning.after') !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/create.blade.php
new file mode 100644
index 000000000..030ffd041
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/create.blade.php
@@ -0,0 +1,58 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.profile.create-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
{{ __('marketplace::app.shop.sellers.account.profile.create-title') }}
+
+
+
+ @if (! $seller)
+
+ {{ __('marketplace::app.shop.sellers.account.profile.save-btn-title') }}
+
+ @endif
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.create.before') !!}
+
+
+
+ @if (! $seller)
+
+ @csrf()
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.url') }}
+
+ @{{ errors.first('url') }}
+
+ @else
+
+ {{ __('marketplace::app.shop.sellers.account.profile.waiting-for-approval') }}
+
+ @endif
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.create.after') !!}
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php
new file mode 100644
index 000000000..e7396c674
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php
@@ -0,0 +1,275 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.profile.edit-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
{{ __('marketplace::app.shop.sellers.account.profile.edit-title') }}
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.edit.before', ['seller' => $seller]) !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.logo') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.banner') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.about') }}
+ {{ old('description') ?: $seller->description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.return_policy') }}
+ {{ old('return_policy') ?: $seller->return_policy }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.shipping_policy') }}
+ {{ old('shipping_policy') ?: $seller->shipping_policy }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.privacy_policy') }}
+ {{ old('privacy_policy') ?: $seller->privacy_policy }}
+
+
+
+
+
+ @if ($seller->commission_enable)
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.admin-commission-percent') }}
+
+
+
+
+
+ @endif
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.meta_description') }}
+ {{ old('meta_description') ?: $seller->meta_description }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.meta_keywords') }}
+ {{ old('meta_keywords') ?: $seller->meta_keywords }}
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.minimum_order_amount.enable'))
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.min_order_amount') }}
+
+ @{{ errors.first('min_order_amount') }}
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.google_analytics.enable'))
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.google_analytics_id') }}
+
+ @{{ errors.first('google_analytics_id') }}
+
+
+
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.edit.after', ['seller' => $seller]) !!}
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/reviews/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/reviews/index.blade.php
new file mode 100644
index 000000000..2b370ae3e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/reviews/index.blade.php
@@ -0,0 +1,31 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.reviews.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.reviews.title') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.reviews.list.before') !!}
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\ReviewDataGrid')->render() !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.reviews.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/invoices/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/invoices/create.blade.php
new file mode 100644
index 000000000..a4cc363b2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/invoices/create.blade.php
@@ -0,0 +1,199 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.create-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+ @csrf
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.create-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.create') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.invoices.create.before', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.placed-on') }}
+
+
+
+ {{ core()->formatDate($sellerOrder->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.status') }}
+
+
+
+ {{ $sellerOrder->status_label }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.customer-name') }}
+
+
+
+ {{ $sellerOrder->order->customer_full_name }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.email') }}
+
+
+
+ {{ $sellerOrder->order->customer_email }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->billing_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->shipping_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.invoices.create.after', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/invoices/pdf.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/invoices/pdf.blade.php
new file mode 100644
index 000000000..594314f9d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/invoices/pdf.blade.php
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.invoice-id') }} -
+ #{{ $sellerInvoice->invoice_id }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.order-id') }} -
+ #{{ $sellerInvoice->invoice->order_id }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.order-date') }} -
+ {{ core()->formatDate($sellerInvoice->order->created_at, 'M d, Y') }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.bill-to') }}
+ {{ __('shop::app.customer.account.order.view.ship-to') }}
+
+
+
+
+
+
+ {{ $sellerInvoice->invoice->order->billing_address->name }}
+ {{ $sellerInvoice->invoice->order->billing_address->address1 }}, {{ $sellerInvoice->invoice->order->billing_address->address2 ? $sellerInvoice->invoice->order->billing_address->address2 . ',' : '' }}
+ {{ $sellerInvoice->invoice->order->billing_address->city }}
+ {{ $sellerInvoice->invoice->order->billing_address->state }}
+ {{ core()->country_name($sellerInvoice->invoice->order->billing_address->country) }} {{ $sellerInvoice->invoice->order->billing_address->postcode }}
+ {{ __('shop::app.customer.account.order.view.contact') }} : {{ $sellerInvoice->invoice->order->billing_address->phone }}
+
+
+ {{ $sellerInvoice->invoice->order->shipping_address->name }}
+ {{ $sellerInvoice->invoice->order->shipping_address->address1 }}, {{ $sellerInvoice->invoice->order->shipping_address->address2 ? $sellerInvoice->invoice->order->shipping_address->address2 . ',' : '' }}
+ {{ $sellerInvoice->invoice->order->shipping_address->city }}
+ {{ $sellerInvoice->invoice->order->shipping_address->state }}
+ {{ core()->country_name($sellerInvoice->invoice->order->shipping_address->country) }} {{ $sellerInvoice->invoice->order->shipping_address->postcode }}
+ {{ __('shop::app.customer.account.order.view.contact') }} : {{ $sellerInvoice->invoice->order->shipping_address->phone }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerInvoice->invoice->order->payment->method . '.title') }}
+
+
+ {{ $sellerInvoice->invoice->order->shipping_title }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerInvoice->items as $sellerInvoiceItem)
+ item; ?>
+
+ {{ $baseInvoiceItem->name }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->price, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+ {{ $baseInvoiceItem->qty }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->tax_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->discount_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total + $baseInvoiceItem->tax_amount - $sellerInvoice->discount_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->sub_total, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->shipping_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->tax_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->discount_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->grand_total, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/orders/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/orders/index.blade.php
new file mode 100644
index 000000000..26bc9742d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/orders/index.blade.php
@@ -0,0 +1,34 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.list.before') !!}
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\OrderDataGrid')->render() !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/orders/view.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/orders/view.blade.php
new file mode 100644
index 000000000..ee294f005
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/orders/view.blade.php
@@ -0,0 +1,589 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.view-title', ['order_id' => $sellerOrder->order_id]) }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.view-title', ['order_id' => $sellerOrder->order_id]) }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.view.before', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.placed-on') }}
+
+
+
+ {{ core()->formatDate($sellerOrder->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.status') }}
+
+
+
+ {{ $sellerOrder->status_label }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.customer-name') }}
+
+
+
+ {{ $sellerOrder->order->customer_full_name }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.email') }}
+
+
+
+ {{ $sellerOrder->order->customer_email }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.item-status') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.admin-commission') }}
+ {{ __('shop::app.customer.account.order.view.tax-percent') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerOrder->items as $sellerOrderItem)
+
+
+ {{ $sellerOrderItem->item->type == 'configurable' ? $sellerOrderItem->item->child->sku : $sellerOrderItem->item->sku }}
+
+
+ {{ $sellerOrderItem->item->name }}
+
+ @if (isset($sellerOrderItem->additional['attributes']))
+
+
+ @foreach ($sellerOrderItem->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+ {{ core()->formatPrice($sellerOrderItem->item->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $sellerOrderItem->item->qty_ordered]) }}
+
+
+
+ {{ $sellerOrderItem->item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $sellerOrderItem->item->qty_invoiced]) : '' }}
+
+
+
+ {{ $sellerOrderItem->item->qty_refunded ? __('admin::app.sales.orders.item-refunded', ['qty_refunded' => $sellerOrderItem->item->qty_refunded]) : '' }}
+
+
+
+ {{ $sellerOrderItem->item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $sellerOrderItem->item->qty_shipped]) : '' }}
+
+
+
+ {{ $sellerOrderItem->item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $sellerOrderItem->item->qty_canceled]) : '' }}
+
+
+ {{ core()->formatPrice($sellerOrderItem->item->total, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->item->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ core()->formatPrice($sellerOrderItem->commission, $sellerOrder->order->order_currency_code) }}
+ {{ number_format($sellerOrderItem->item->tax_percent, 2) }}%
+ {{ core()->formatPrice($sellerOrderItem->item->tax_amount, $sellerOrder->order->order_currency_code) }}
+ {{ core()->formatPrice($sellerOrderItem->item->total + $sellerOrderItem->item->tax_amount - $sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($sellerOrder->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerOrder->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($sellerOrder->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerOrder->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-paid') }}
+ -
+ {{ core()->formatPrice($sellerOrder->grand_total_invoiced, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-refunded') }}
+ -
+ {{ core()->formatPrice($sellerOrder->order->grand_total_refunded, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-due') }}
+ -
+ {{ core()->formatPrice($sellerOrder->base_total_due, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.total-seller-amount') }}
+
+ -
+ {{ core()->formatPrice($sellerOrder->seller_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.total-admin-commission') }}
+
+ -
+ {{ core()->formatPrice($sellerOrder->commission, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+
+
+
+ @if ($sellerOrder->invoices->count())
+
+
+ @foreach ($sellerOrder->invoices as $sellerInvoice)
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerInvoice->items as $sellerInvoiceItem)
+ item; ?>
+
+ {{ $baseInvoiceItem->name }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ $baseInvoiceItem->qty }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total + $baseInvoiceItem->tax_amount - $sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+ @endif
+
+ @if ($sellerOrder->refunds->count())
+
+
+ @foreach ($sellerOrder->refunds as $sellerRefund)
+
+
+
+
+
+
+
+ {{ __('admin::app.sales.orders.product-name') }}
+ {{ __('admin::app.sales.orders.price') }}
+ {{ __('admin::app.sales.orders.qty') }}
+ {{ __('admin::app.sales.orders.subtotal') }}
+ {{ __('admin::app.sales.orders.tax-amount') }}
+ {{ __('admin::app.sales.orders.discount-amount') }}
+ {{ __('admin::app.sales.orders.grand-total') }}
+
+
+
+
+ @foreach ($sellerRefund->items as $sellerRefundItem)
+ item; ?>
+
+ {{ $baseRefundItem->name }}
+
+
+ {{ core()->formatPrice($baseRefundItem->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ $baseRefundItem->qty }}
+
+
+ {{ core()->formatPrice($baseRefundItem->total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseRefundItem->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseRefundItem->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseRefundItem->total + $baseRefundItem->tax_amount - $sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($sellerRefund->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+ @if ($sellerRefund->shipping_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerRefund->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($sellerRefund->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($sellerRefund->base_discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('admin::app.sales.refunds.adjustment-refund') }}
+ -
+ {{ core()->formatPrice($sellerRefund->base_adjustment_refund, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('admin::app.sales.refunds.adjustment-fee') }}
+ -
+ {{ core()->formatPrice($sellerRefund->base_adjustment_fee, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerRefund->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+ @endif
+
+ @if ($sellerOrder->shipments->count())
+
+
+ @foreach ($sellerOrder->shipments as $sellerShipment)
+
+
+
+ {{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $sellerShipment->shipment_id]) }}
+
+
+
+
+ @if ($sellerShipment->shipment->inventory_source)
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.inventory-source') }}
+
+
+
+ {{ $sellerShipment->shipment->inventory_source->name }}
+
+
+ @endif
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.carrier-title') }}
+
+
+
+ {{ $sellerShipment->shipment->carrier_title }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.tracking-number') }}
+
+
+
+ {{ $sellerShipment->shipment->track_number }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
+
+
+
+ @foreach ($sellerShipment->items as $sellerShipmentItem)
+
+
+ {{ $sellerShipmentItem->item->sku }}
+ {{ $sellerShipmentItem->item->name }}
+ {{ $sellerShipmentItem->item->qty }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ @endforeach
+
+ @endif
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->billing_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->shipping_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.view.after', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/shipments/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/shipments/create.blade.php
new file mode 100644
index 000000000..8ad9b5671
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/shipments/create.blade.php
@@ -0,0 +1,312 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.create-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+ @csrf
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.create-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.create') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.shipments.create.before', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.placed-on') }}
+
+
+
+ {{ core()->formatDate($sellerOrder->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.status') }}
+
+
+
+ {{ $sellerOrder->status_label }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.customer-name') }}
+
+
+
+ {{ $sellerOrder->order->customer_full_name }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.email') }}
+
+
+
+ {{ $sellerOrder->order->customer_email }}
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->billing_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->shipping_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.shipments.create.after', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/transactions/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/transactions/index.blade.php
new file mode 100644
index 000000000..e0a7b678c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/transactions/index.blade.php
@@ -0,0 +1,68 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.list.before') !!}
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total-sale') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_sale']) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total-payout') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_payout']) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.remaining-payout') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['remaining_payout']) }}
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\TransactionDataGrid')->render() !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/transactions/view.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/transactions/view.blade.php
new file mode 100644
index 000000000..376130699
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/sales/transactions/view.blade.php
@@ -0,0 +1,165 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.view-title', ['transaction_id' => $transaction->transaction_id]) }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.view-title', ['transaction_id' => $transaction->transaction_id]) }}
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.view.before', ['transaction' => $transaction]) !!}
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.created-at') }}
+
+
+
+ {{ core()->formatDate($transaction->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.payment-method') }}
+
+
+
+ {{ $transaction->method }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total') }}
+
+
+
+ {{ core()->formatBasePrice($transaction->base_total) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.comment') }}
+
+
+
+ {{ $transaction->comment }}
+
+
+
+
+
+ order; ?>
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.order-id', ['order_id' => $sellerOrder->order_id]) }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.total') }}
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.commission') }}
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.seller-total') }}
+
+
+
+
+ @foreach ($sellerOrder->items as $sellerOrderItem)
+
+
+
+ {{ $sellerOrderItem->item->name }}
+
+ @if (isset($sellerOrderItem->additional['attributes']))
+
+
+ @foreach ($sellerOrderItem->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+
+ {{ core()->formatPrice($sellerOrderItem->item->price, $sellerOrder->order->order_currency_code) }}
+
+ {{ $sellerOrderItem->item->qty_ordered }}
+
+ {{ core()->formatPrice($sellerOrderItem->item->total, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->commission, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->seller_total, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.sub-total') }}
+ -
+ {{ core()->formatPrice($sellerOrder->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.tax') }}
+ -
+ {{ core()->formatPrice($sellerOrder->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.commission') }}
+ -
+ -{{ core()->formatPrice($sellerOrder->commission, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.seller-total') }}
+ -
+ {{ core()->formatPrice($sellerOrder->seller_total - $sellerOrder->base_shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.view.after', ['transaction' => $transaction]) !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/left-profile.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/left-profile.blade.php
new file mode 100644
index 000000000..5c7d7fe2d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/left-profile.blade.php
@@ -0,0 +1,341 @@
+
+
+
+
+ @if ($logo = $seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.contact-seller') }}
+
+
+
+
+
+
+
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+ {!! Captcha::renderJS() !!}
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/add-buttons.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/add-buttons.blade.php
new file mode 100644
index 000000000..dcbac0678
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/add-buttons.blade.php
@@ -0,0 +1,29 @@
+findOneWhere([
+ 'marketplace_seller_id' => $seller->id,
+ 'product_id' => $product->id
+ ]);
+ }
+?>
+
+
+
+ @csrf
+
+
+
+
+ @if (isset($marketPlaceProduct))
+ @if (isset($marketPlaceProduct['is_owner']) && $marketPlaceProduct['is_owner'] == 0)
+
+
+
+ @endif
+ @endif
+
+ isSaleable() ? '' : 'disabled' }}>{{ __('shop::app.products.add-to-cart') }}
+
+
+ @include('shop::products.wishlist')
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/index.blade.php
new file mode 100644
index 000000000..672d626c8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/index.blade.php
@@ -0,0 +1,82 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.products.title', ['shop_title' => $seller->shop_title]) }} - {{ $seller->name }}
+@endsection
+
+@section('content-wrapper')
+
+ @inject ('productRepository', 'Webkul\Marketplace\Repositories\ProductRepository')
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.before', ['seller' => $seller]) !!}
+
+
+ @include('marketplace::shop.sellers.top-profile')
+
+
+
+
+
+
+ @include ('shop::products.list.layered-navigation',['category' => null])
+
+
+
+ findAllBySeller($seller); ?>
+
+ @if ($products->count())
+
+ @include ('shop::products.list.toolbar')
+
+ @inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
+
+ @if ($toolbarHelper->getCurrentMode() == 'grid')
+
+ @foreach ($products as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+ @else
+
+ @foreach ($products as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+ @endif
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.pagination.before') !!}
+
+
+ {{ $products->appends(request()->input())->links() }}
+
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.pagination.after') !!}
+
+ @else
+
+
+
{{ __('shop::app.products.whoops') }}
+
+
+ {{ __('shop::app.products.empty') }}
+
+
+
+ @endif
+
+
+
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.after', ['seller' => $seller]) !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/price.blade.php
new file mode 100644
index 000000000..9023d7d0b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/products/price.blade.php
@@ -0,0 +1,52 @@
+{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
+
+@inject ('priceHelper', 'Webkul\Marketplace\Helpers\Price')
+type == 'configurable') {
+
+ $marketPlaceProduct = app('Webkul\Marketplace\Repositories\ProductRepository')->findOneWhere([
+ 'marketplace_seller_id' => $seller->id,
+ 'product_id' => $product->id
+ ]);
+
+ if (isset($marketPlaceProduct)) {
+ $childProduct = app('Webkul\Marketplace\Repositories\ProductRepository')->findWhere([
+ 'marketplace_seller_id' => $seller->id,
+ 'parent_id' => $marketPlaceProduct->id
+ ])->pluck('price');
+
+ if (count($childProduct)) {
+ $minPrice = min($childProduct->toArray());
+ $variantMinPrice = core()->currency($minPrice);
+ }
+ }
+ }
+ }
+?>
+
+
+ @if ($product->type == 'configurable')
+
{{ __('shop::app.products.price-label') }}
+
+ @if (isset($seller) && isset($childProduct) && isset($variantMinPrice))
+
{{ $variantMinPrice }}
+ @else
+
{{ core()->currency($priceHelper->getMinimalPrice($product)) }}
+ @endif
+ @else
+ @if ($priceHelper->haveSpecialPrice($product))
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($product->price) }}
+
+
{{ core()->currency($priceHelper->getSpecialPrice($product)) }}
+ @else
+
{{ core()->currency($product->price) }}
+ @endif
+ @endif
+
+
+{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/profile.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/profile.blade.php
new file mode 100644
index 000000000..55b8eb450
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/profile.blade.php
@@ -0,0 +1,159 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ $seller->shop_title }}
+@stop
+
+@section('seo')
+ meta_description : Illuminate\Support\Str::limit(strip_tags($seller->description), 120, '') }}"/>
+
+@stop
+
+@push('css')
+
+@endpush
+
+@section('content-wrapper')
+
+
+
+
+ @include('marketplace::shop.sellers.left-profile')
+
+
+ @if ($banner = $seller->banner_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+ @include('marketplace::shop.products.popular-products')
+
+
+
+ getRecentReviews($seller->id); ?>
+
+ @if ($reviews->count())
+
+
+
+
+
+ @foreach ($reviews as $review)
+
+
+
+ @for ($i = 1; $i <= $review->rating; $i++)
+
+
+
+ @endfor
+
+
+
+ {{ $review->comment }}
+
+
+
+
+ {{
+ __('marketplace::app.shop.sellers.profile.by-user-date', [
+ 'name' => $review->customer->name,
+ 'date' => core()->formatDate($review->created_at, 'F d, Y')
+ ])
+ }}
+
+
+
+ @endforeach
+
+
+
+
+
{{ __('marketplace::app.shop.sellers.profile.all-reviews') }}
+
+
+ @endif
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.return-policy') }}
+
+
+
+
+
+ {!! $seller->return_policy !!}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.shipping-policy') }}
+
+
+
+
+
+ {!! $seller->shipping_policy !!}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.privacy_policy') }}
+
+
+
+
+
+ {!! $seller->privacy_policy !!}
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.about-seller') }}
+
+
+
+
+
+
+
+ {{
+ __('marketplace::app.shop.sellers.profile.member-since', [
+ 'date' => core()->formatDate($seller->created_at, 'Y')
+ ])
+ }}
+
+
+
+ {!! $seller->description !!}
+
+
+
+
+
+
+
+
+@endsection
+
+@push('scripts')
+{!! Captcha::renderJS() !!}
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/reviews/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/reviews/create.blade.php
new file mode 100644
index 000000000..f31d6197a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/reviews/create.blade.php
@@ -0,0 +1,87 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.reviews.create-title', ['shop_title' => $seller->shop_title]) }} - {{ $seller->name }}
+@endsection
+
+@section('content-wrapper')
+
+
+ @include('marketplace::shop.sellers.left-profile')
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.create.before') !!}
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.create.after') !!}
+
+
+
+
+
+@endsection
+
+
+@push('scripts')
+
+
+
+ {!! Captcha::renderJS() !!}
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/reviews/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/reviews/index.blade.php
new file mode 100644
index 000000000..5bd1dcfd7
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/reviews/index.blade.php
@@ -0,0 +1,169 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.reviews.title', ['shop_title' => $seller->shop_title]) }} - {{ $seller->name }}
+@endsection
+
+@section('content-wrapper')
+
+
+
+ xcvbxdbdf
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.index.before', ['seller' => $seller]) !!}
+
+ @include('marketplace::shop.sellers.left-profile')
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.index.after', ['seller' => $seller]) !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/top-profile.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/top-profile.blade.php
new file mode 100644
index 000000000..55077d4c0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/top-profile.blade.php
@@ -0,0 +1,56 @@
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/UI/header.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/UI/header.blade.php
new file mode 100644
index 000000000..867c4fc59
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/UI/header.blade.php
@@ -0,0 +1,640 @@
+@push('scripts')
+
+@endpush
+
+@php
+ $cart = cart()->getCart();
+
+ $cartItemsCount = trans('shop::app.minicart.zero');
+
+ if ($cart) {
+ $cartItemsCount = $cart->items->count();
+ }
+@endphp
+
+@push('scripts')
+
+@endpush
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/index.blade.php
new file mode 100644
index 000000000..7ae5ac2a6
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/index.blade.php
@@ -0,0 +1,317 @@
+@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
+
+@inject('sellerProduct', 'Webkul\Marketplace\Repositories\ProductRepository')
+
+@extends('shop::layouts.master')
+
+@section('page_title')
+ {{ __('shop::app.checkout.cart.title') }}
+@stop
+
+@section('content-wrapper')
+
+@endsection
+
+@push('css')
+
+@endpush
+
+@push('scripts')
+ @include('shop::checkout.cart.coupon')
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/item-seller-info.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/item-seller-info.blade.php
new file mode 100644
index 000000000..288225dcc
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/item-seller-info.blade.php
@@ -0,0 +1,35 @@
+additional['seller_info']) && !$item->additional['seller_info']['is_owner']) {
+ $seller = $sellerRepository->find($item->additional['seller_info']['seller_id']);
+ } else {
+ $seller = $productRepository->getSellerByProductId($item->product_id);
+ }
+
+?>
+
+@if ($seller && $seller->is_approved)
+
+ getMarketplaceProductByProduct($item->product->id, $seller->id); ?>
+
+ @if (isset($sellerProduct) && $sellerProduct->is_approved)
+
+
+
+ @endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/mini-cart.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/mini-cart.blade.php
new file mode 100644
index 000000000..c1cdd4161
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/cart/mini-cart.blade.php
@@ -0,0 +1,224 @@
+
+
+
+
+
+ @push('scripts')
+
+
+
+ @endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/total/summary.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/total/summary.blade.php
new file mode 100644
index 000000000..7c8580ffb
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/checkout/total/summary.blade.php
@@ -0,0 +1,54 @@
+
+
{{ __('velocity::app.checkout.cart.cart-summary') }}
+
+
+ {{ __('velocity::app.checkout.sub-total') }}
+ {{ core()->currency($cart->base_sub_total) }}
+
+
+ @if ($cart->selected_shipping_rate)
+
+ {{ __('shop::app.checkout.total.delivery-charges') }}
+ {{ core()->currency($cart->selected_shipping_rate->base_price) }}
+
+ @endif
+
+ @if ($cart->base_tax_total)
+ @foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($cart, true) as $taxRate => $baseTaxAmount )
+
+ {{ __('shop::app.checkout.total.tax') }} {{ $taxRate }} %
+ {{ core()->currency($baseTaxAmount) }}
+
+ @endforeach
+ @endif
+
+ @if (
+ $cart->base_discount_amount
+ && $cart->base_discount_amount > 0
+ )
+
+
+ {{ __('shop::app.checkout.total.disc-amount') }}
+
+ -{{ core()->currency($cart->base_discount_amount) }}
+
+
+ @endif
+
+
+ {{ __('shop::app.checkout.total.grand-total') }}
+
+ {{ core()->currency($cart->base_grand_total) }}
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/index.blade.php
new file mode 100644
index 000000000..1f56e2849
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/index.blade.php
@@ -0,0 +1,46 @@
+@extends('shop::layouts.master')
+
+@section('content-wrapper')
+
+
+
+
+ @yield('page-detail-wrapper')
+
+
+@endsection
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/orders/view.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/orders/view.blade.php
new file mode 100644
index 000000000..27f777266
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/orders/view.blade.php
@@ -0,0 +1,583 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->increment_id]) }}
+@endsection
+
+@push('css')
+
+@endpush
+
+@section('page-detail-wrapper')
+
+
+
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!}
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.placed-on') }}
+
+
+
+ {{ core()->formatDate($order->created_at, 'd M Y') }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.item-status') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-percent') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+ @foreach ($order->items as $item)
+
+
+ {{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
+
+
+
+ {{ $item->name }}
+
+ @include('marketplace::shop.products.product-seller-info', ['product' => $item])
+
+ @if (isset($item->additional['attributes']))
+
+
+ @foreach ($item->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+
+
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $item->qty_ordered]) }}
+
+
+
+ {{ $item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $item->qty_invoiced]) : '' }}
+
+
+
+ {{ $item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $item->qty_shipped]) : '' }}
+
+
+
+ {{ $item->qty_refunded ? __('shop::app.customer.account.order.view.item-refunded', ['qty_refunded' => $item->qty_refunded]) : '' }}
+
+
+
+ {{ $item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $item->qty_canceled]) : '' }}
+
+
+
+
+ {{ core()->formatPrice($item->total, $order->order_currency_code) }}
+
+
+
+ {{ number_format($item->tax_percent, 2) }}%
+
+
+
+ {{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($item->total + $item->tax_amount - $item->discount_amount, $order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+
+ {{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
+
+
+ @if ($order->haveStockableItems())
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+
+ {{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
+
+ @endif
+
+ @if ($order->base_discount_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ @if ($order->coupon_code)
+ ({{ $order->coupon_code }})
+ @endif
+ -
+
+ {{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+
+ {{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+
+ {{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-paid') }}
+ -
+
+ {{ core()->formatPrice($order->grand_total_invoiced, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-refunded') }}
+ -
+
+ {{ core()->formatPrice($order->grand_total_refunded, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-due') }}
+ -
+
+ {{ core()->formatPrice($order->total_due, $order->order_currency_code) }}
+
+
+
+
+
+
+
+
+ @if ($order->invoices->count())
+
+
+ @foreach ($order->invoices as $invoice)
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($invoice->items as $item)
+
+
+ {{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
+
+
+
+ {{ $item->name }}
+
+
+
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+
+
+
+ {{ $item->qty }}
+
+
+
+ {{ core()->formatPrice($item->total, $order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+
+ {{ core()->formatPrice($invoice->sub_total, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+
+ {{ core()->formatPrice($invoice->shipping_amount, $order->order_currency_code) }}
+
+
+ @if ($order->base_discount_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+
+ {{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+
+ {{ core()->formatPrice($invoice->tax_amount, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+
+ {{ core()->formatPrice($invoice->grand_total, $order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+
+ @endif
+
+ @if ($order->shipments->count())
+
+
+ @foreach ($order->shipments as $shipment)
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.tracking-number') }}
+
+
+
+ {{ $shipment->track_number }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $shipment->id]) }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
+
+
+
+ @foreach ($shipment->items as $item)
+
+
+ {{ $item->sku }}
+ {{ $item->name }}
+ {{ $item->qty }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ @endforeach
+
+
+ @endif
+
+ @if ($order->refunds->count())
+
+
+ @foreach ($order->refunds as $refund)
+
+
+
+ {{ __('shop::app.customer.account.order.view.individual-refund', ['refund_id' => $refund->id]) }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($refund->items as $item)
+
+ {{ $item->child ? $item->child->sku : $item->sku }}
+ {{ $item->name }}
+ {{ core()->formatPrice($item->price, $order->order_currency_code) }}
+ {{ $item->qty }}
+ {{ core()->formatPrice($item->total, $order->order_currency_code) }}
+ {{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
+ {{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}
+
+ @endforeach
+
+ @if (! $refund->items->count())
+
+ {{ __('shop::app.common.no-result-found') }}
+
+ @endif
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+
+ {{ core()->formatPrice($refund->sub_total, $order->order_currency_code) }}
+
+
+ @if ($refund->shipping_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+
+ {{ core()->formatPrice($refund->shipping_amount, $order->order_currency_code) }}
+
+ @endif
+
+ @if ($refund->discount_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+
+ {{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
+
+ @endif
+
+ @if ($refund->tax_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+
+ {{ core()->formatPrice($refund->tax_amount, $order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.adjustment-refund') }}
+ -
+
+ {{ core()->formatPrice($refund->adjustment_refund, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.adjustment-fee') }}
+ -
+
+ {{ core()->formatPrice($refund->adjustment_fee, $order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+
+ {{ core()->formatPrice($refund->grand_total, $order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+
+ @endif
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+ @include ('admin::sales.address', ['address' => $order->billing_address])
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.billing-address.after', ['order' => $order]) !!}
+
+
+
+ @if ($order->shipping_address)
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+ @include ('admin::sales.address', ['address' => $order->shipping_address])
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.shipping-address.after', ['order' => $order]) !!}
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+ {{ $order->shipping_title }}
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.shipping-method.after', ['order' => $order]) !!}
+
+
+ @endif
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
+
+ @php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
+
+ @if (! empty($additionalDetails))
+
+
{{ $additionalDetails['title'] }}
+
{{ $additionalDetails['value'] }}
+
+ @endif
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.payment-method.after', ['order' => $order]) !!}
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.shop.customers.account.orders.view.after', ['order' => $order]) !!}
+
+
+@endsection
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/partials/sidemenu.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/partials/sidemenu.blade.php
new file mode 100644
index 000000000..df44624e5
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/account/partials/sidemenu.blade.php
@@ -0,0 +1,104 @@
+
+
+@push('css')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/signup/seller.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/signup/seller.blade.php
new file mode 100644
index 000000000..a132c2e67
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/customers/signup/seller.blade.php
@@ -0,0 +1,105 @@
+@if (core()->getConfigData('marketplace.settings.general.status'))
+@push('css')
+
+@endpush
+
+
+
+@push('scripts')
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/emails/contact-seller.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/emails/contact-seller.blade.php
new file mode 100644
index 000000000..3f2629ce8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/emails/contact-seller.blade.php
@@ -0,0 +1,36 @@
+@component('shop::emails.layouts.master')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.dear', ['name' => $sellerName]) }},
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.info') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.query') }}
+
+
+
+ {{ $query }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.mails.contact-seller.thanks') }}
+
+
+
+
+@endcomponent
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/flags/product-flag.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/flags/product-flag.blade.php
new file mode 100644
index 000000000..70769f8e0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/flags/product-flag.blade.php
@@ -0,0 +1,263 @@
+@php
+ $productRepository = app('Webkul\Marketplace\Repositories\ProductRepository');
+ $seller = $productRepository->getSellerByProductId($product->product->id) ;
+ $productFlags = app('Webkul\Marketplace\Repositories\ProductFlagReasonRepository')->findWhere(['status' => 1]);
+
+ if ($seller) {
+ $sellerProducts = $productRepository->findAllBySeller($seller);
+ }
+
+@endphp
+
+@if ($seller)
+
+
+
+
+
+ @foreach ($sellerProducts->take(5) as $sellerProduct)
+ @if ($sellerProduct->product->url_key)
+
+ @endif
+ @endforeach
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.contact-seller') }}
+
+
+
+
+
+
+
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+@endpush
+
+@endif
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/home/featured-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/home/featured-products.blade.php
new file mode 100644
index 000000000..8c2c5bd5f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/home/featured-products.blade.php
@@ -0,0 +1,15 @@
+@if (core()->getConfigData('marketplace.settings.general.featured'))
+ @php
+ $count = core()->getConfigData('catalog.products.homepage.no_of_featured_product_homepage');
+ $count = $count ? $count : 10;
+ $direction = core()->getCurrentLocale()->direction == 'rtl' ? 'rtl' : 'ltr';
+ @endphp
+
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/home/new-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/home/new-products.blade.php
new file mode 100644
index 000000000..59d59973e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/home/new-products.blade.php
@@ -0,0 +1,22 @@
+@if (core()->getConfigData('marketplace.settings.general.new'))
+ @php
+ $count = core()->getConfigData('catalog.products.homepage.no_of_new_product_homepage');
+ $count = $count ? $count : 10;
+ $direction = core()->getCurrentLocale()->direction == 'rtl' ? 'rtl' : 'ltr';
+ @endphp
+
+ {!! view_render_event('bagisto.shop.new-products.before') !!}
+
+
+
+
+ {!! view_render_event('bagisto.shop.new-products.after') !!}
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/account.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/account.blade.php
new file mode 100644
index 000000000..6d561ba38
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/account.blade.php
@@ -0,0 +1,14 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('content-wrapper')
+
+
+
+
+ @yield('content')
+
+
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/header/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/header/index.blade.php
new file mode 100644
index 000000000..fd9fd20be
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/header/index.blade.php
@@ -0,0 +1,7 @@
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/master.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/master.blade.php
new file mode 100644
index 000000000..bdb591357
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/master.blade.php
@@ -0,0 +1,6 @@
+@extends('shop::layouts.master')
+
+@push('scripts')
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/style.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/style.blade.php
new file mode 100644
index 000000000..8d379eac8
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/layouts/style.blade.php
@@ -0,0 +1 @@
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/add-to-cart.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/add-to-cart.blade.php
new file mode 100644
index 000000000..e1b044b05
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/add-to-cart.blade.php
@@ -0,0 +1,137 @@
+{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
+@inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+
+ @if (isset($showCompare) && $showCompare)
+
+ @endif
+
+ @if (! (isset($showWishlist) && !$showWishlist) && core()->getConfigData('general.content.shop.wishlist_option'))
+ @include('shop::products.wishlist', [
+ 'addClass' => $addWishlistClass ?? ''
+ ])
+ @endif
+
+ @if($product->type == 'simple' || $product->type == 'configurable')
+
+ @if (isset($form) && !$form)
+
isSaleable($product) ? 'disabled' : '' }}
+ class="theme-btn {{ $addToCartBtnClass ?? '' }}">
+
+ @if (! (isset($showCartIcon) && !$showCartIcon))
+ shopping_cart
+ @endif
+
+ {{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
+
+ @elseif(isset($addToCartForm) && !$addToCartForm)
+
+
+ @csrf
+
+
+
+ isSaleable($product) ? 'disabled' : '' }}
+ class="btn btn-add-to-cart {{ $addToCartBtnClass ?? '' }}">
+
+ @if (! (isset($showCartIcon) && !$showCartIcon))
+ shopping_cart
+ @endif
+
+
+ {{ ($product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}
+
+
+
+ @else
+
isSaleable($product) ? 'false' : 'true' }}
+ show-cart-icon={{ ! (isset($showCartIcon) && ! $showCartIcon) }}
+ btn-text="{{ (! isset($moveToCart) && $product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}">
+
+ @endif
+
+ @else
+
+ @if (isset($form) && !$form)
+
isSaleable() ? 'disabled' : '' }}
+ class="theme-btn {{ $addToCartBtnClass ?? '' }}">
+
+ @if (! (isset($showCartIcon) && !$showCartIcon))
+ shopping_cart
+ @endif
+
+ {{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
+
+ @elseif(isset($addToCartForm) && !$addToCartForm)
+
+
+ @csrf
+
+
+
+ isSaleable() ? 'disabled' : '' }}
+ class="btn btn-add-to-cart {{ $addToCartBtnClass ?? '' }}">
+
+ @if (! (isset($showCartIcon) && !$showCartIcon))
+ shopping_cart
+ @endif
+
+
+ {{ ($product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}
+
+
+
+ @else
+
isSaleable() ? 'false' : 'true' }}
+ show-cart-icon={{ ! (isset($showCartIcon) && ! $showCartIcon) }}
+ btn-text="{{ (! isset($moveToCart) && $product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}">
+
+ @endif
+
+
+ @endif
+
+
+{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/buy-now.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/buy-now.blade.php
new file mode 100644
index 000000000..a736cd694
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/buy-now.blade.php
@@ -0,0 +1,16 @@
+{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
+
+@if($product->type == 'simple' || $product->type == 'configurable')
+
+ @inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+ isSaleable($product) ? 'disabled' : '' }}>
+ {{ __('shop::app.products.buy-now') }}
+
+@else
+ isSaleable(1) ? 'disabled' : '' }}>
+ {{ __('shop::app.products.buy-now') }}
+
+@endif
+
+{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/downloadable.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/downloadable.blade.php
new file mode 100644
index 000000000..4036bacac
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/downloadable.blade.php
@@ -0,0 +1,64 @@
+@if ($baseProduct->type == 'downloadable')
+ {!! view_render_event('bagisto.shop.products.view.downloadable.before', ['product' => $product]) !!}
+
+
+
+ @if ($product->downloadable_samples->count())
+
+
{{ __('shop::app.products.samples') }}
+
+
+
+ @endif
+
+ @if ($product->downloadable_links->count())
+
+
{{ __('shop::app.products.links') }}
+
+
+ @foreach ($product->downloadable_links as $link)
+
+
+
+ @endif
+
+ @endforeach
+
+
+
+
+ @endif
+
+
+ {!! view_render_event('bagisto.shop.products.view.downloadable.before', ['product' => $product]) !!}
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/list/up-sell-card.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/list/up-sell-card.blade.php
new file mode 100644
index 000000000..6f280183e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/list/up-sell-card.blade.php
@@ -0,0 +1,192 @@
+@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
+@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
+
+@push('css')
+
+@endpush
+
+@php
+ if (isset($checkmode) && $checkmode && $toolbarHelper->getCurrentMode() == "list") {
+ $list = true;
+ }
+
+ if (isset($item)) {
+ $productBaseImage = productimage()->getProductImage($item);
+ } else {
+ $productBaseImage = productimage()->getProductBaseImage($product);
+ }
+
+ $totalReviews = $reviewHelper->getTotalReviews($product);
+ $avgRatings = ceil($reviewHelper->getAverageRating($product));
+
+ $galleryImages = productimage()->getGalleryImages($product);
+ $priceHTML = view('shop::products.price', ['product' => $product])->render();
+
+ $product->__set('priceHTML', $priceHTML);
+ $product->__set('avgRating', $avgRatings);
+ $product->__set('totalReviews', $totalReviews);
+ $product->__set('galleryImages', $galleryImages);
+ $product->__set('shortDescription', $product->short_description);
+ $product->__set('firstReviewText', trans('velocity::app.products.be-first-review'));
+ $product->__set('addToCartHtml', view('shop::products.add-to-cart', [
+ 'product' => $product,
+ 'addWishlistClass' => ! (isset($list) && $list) ? '' : '',
+
+ 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
+ ? true : false,
+
+ 'btnText' => null,
+ 'moveToCart' => null,
+ 'addToCartBtnClass' => '',
+ ])->render());
+
+@endphp
+
+{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
+ @if (isset($list) && $list)
+
+ @else
+
+
+
+
+
+
+ @if ($product->new)
+
+ {{ __('shop::app.products.new') }}
+
+ @endif
+
+
+
+
+
+ @include ('shop::products.price', ['product' => $product])
+
+
+ @if ($totalReviews)
+
+
+
+ {{ __('velocity::app.products.ratings', ['totalRatings' => $totalReviews ]) }}
+
+
+ @else
+
+ {{ __('velocity::app.products.be-first-review') }}
+
+ @endif
+
+
+ @include ('shop::products.add-to-cart', [
+ 'product' => $product,
+ 'btnText' => $btnText ?? null,
+ 'moveToCart' => $moveToCart ?? null,
+ 'wishlistMoveRoute' => $wishlistMoveRoute ?? null,
+ 'reloadPage' => $reloadPage ?? null,
+ 'addToCartForm' => $addToCartForm ?? false,
+ 'addToCartBtnClass' => $addToCartBtnClass ?? '',
+ 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
+ ? true : false,
+ ])
+
+
+
+ @endif
+
+{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/offers.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/offers.blade.php
new file mode 100644
index 000000000..c75a7fd2c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/offers.blade.php
@@ -0,0 +1,485 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ trim($product->meta_title) != "" ? $product->meta_title : $product->name }}
+@stop
+
+@section('seo')
+ meta_description : Illuminate\Support\Str::limit(strip_tags($product->description), 120, '') }}"/>
+
+@stop
+
+@section('content-wrapper')
+
+ parent_id ? $product->parent : $product;
+ $productRepository = app('Webkul\Marketplace\Repositories\ProductRepository');
+ ?>
+
+ {!! view_render_event('bagisto.shop.sellers.products.offers.before', ['product' => $product]) !!}
+
+
+
+
+
+
+
+
+ @include ('shop::products.review', ['product' => $baseProduct])
+
+
+
+
+
+
{{ __('marketplace::app.shop.products.more-sellers') }}
+
+
+
+ @foreach ($productRepository->getSellerProducts($product) as $sellerProduct)
+
+ @csrf()
+
+
+
+
+
+ @if ($baseProduct->type == 'configurable')
+
+
+ @foreach ($attributes as $attributeId => $optionId)
+
+ @endforeach
+ @endif
+
+
+
+
+
+
+
+
+
+
+ @if ($logo = $sellerProduct->seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+ @if ($sellerProduct->condition == 'new')
+ {{ __('marketplace::app.shop.products.new') }}
+ @else
+ {{ __('marketplace::app.shop.products.used') }}
+ @endif
+
+
+
+
+
+ @if ($sellerProduct->is_owner)
+ @if ($product->getTypeInstance()->haveSpecialPrice($sellerProduct))
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($sellerProduct->price) }}
+
+
{{ core()->currency($product->getTypeInstance()->getSpecialPrice($sellerProduct)) }}
+ @else
+
{{ core()->currency($sellerProduct->price) }}
+ @endif
+ @else
+
{{ core()->currency($sellerProduct->price) }}
+ @endif
+
+
+
+
+
+
+
+
+ @if ($sellerProduct->product->type == 'simple' || $sellerProduct->product->type == 'configurable')
+ @if ($sellerProduct->haveSufficientQuantity(1))
+
+
+ {{ __('marketplace::app.shop.products.add-to-cart') }}
+
+ @else
+
+
+ {{ __('marketplace::app.shop.products.out-of-stock') }}
+
+
+ @endif
+ @else
+ @if ($sellerProduct->isSaleable())
+
+ {{ __('marketplace::app.shop.products.add-to-cart') }}
+
+ @else
+
+ {{ __('marketplace::app.shop.products.out-of-stock') }}
+
+ @endif
+
+ @endif
+
+
+
+
+ @if ($sellerProduct->product->type == 'downloadable')
+ @include('marketplace::shop.velocity.products.downloadable', ['product' => $sellerProduct, 'baseProduct' => $sellerProduct->product])
+ @endif
+
+
+
+
+
+
+
+ parent_id ? $sellerProduct->parent : $sellerProduct; ?>
+
+
+
+
+
+ parent_id ? $sellerProduct->parent : $sellerProduct; ?>
+
+
+
+
+
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.shop.sellers.products.offers.after', ['product' => $product]) !!}
+
+@endsection
+
+
+
+
+
+@push('scripts')
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/popular-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/popular-products.blade.php
new file mode 100644
index 000000000..8d4e87d6f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/popular-products.blade.php
@@ -0,0 +1,23 @@
+getPopularProducts($seller->id) ?>
+@if ($products->count())
+
+
+
+
+
+ @foreach ($products as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/price.blade.php
new file mode 100644
index 000000000..c9fbf85d0
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/price.blade.php
@@ -0,0 +1,25 @@
+{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
+
+
+ @inject ('priceHelper', 'Webkul\Marketplace\Helpers\Price')
+
+ @if ($product->type == 'configurable')
+
{{ __('shop::app.products.price-label') }}
+
+
{{ core()->currency($priceHelper->getMinimalPrice($product)) }}
+ @else
+ @if ($priceHelper->haveSpecialPrice($product))
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($product->price) }}
+
+
{{ core()->currency($priceHelper->getSpecialPrice($product)) }}
+ @else
+
{{ core()->currency($product->price) }}
+ @endif
+ @endif
+
+
+{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/product-seller-info.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/product-seller-info.blade.php
new file mode 100644
index 000000000..396bdc4a2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/product-seller-info.blade.php
@@ -0,0 +1,41 @@
+@push('css')
+
+@endpush
+
+getSellerByProductId($product->product_id);
+
+?>
+
+@if ($seller && $seller->is_approved)
+
+ getMarketplaceProductByProduct($product->product_id, $seller->id); ?>
+
+ @if ($sellerProduct->is_approved)
+
+
+
+ @endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/product-sellers.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/product-sellers.blade.php
new file mode 100644
index 000000000..0f377951d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/product-sellers.blade.php
@@ -0,0 +1,70 @@
+
+
+@if (request()->route()->getName() == 'shop.productOrCategory.index')
+
+ @push('css')
+
+ @endpush
+
+ @if ($product->type != 'configurable')
+ @if ($count = $productRepository->getSellerCount($product->product))
+
+ @endif
+ @else
+
+
+ product->variants as $variant) {
+ $variants[$variant->id] = $productRepository->getSellerCount($variant);
+ }
+
+ ?>
+
+ @push('scripts')
+
+
+
+ @endpush
+ @endif
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/cross-sells.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/cross-sells.blade.php
new file mode 100644
index 000000000..def4e8d26
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/cross-sells.blade.php
@@ -0,0 +1,61 @@
+@foreach ($cart->items as $item)
+ product;
+
+ if ($product->cross_sells()->count()) {
+ $products[] = $product;
+ $products = array_unique($products);
+ }
+ ?>
+@endforeach
+
+@if (isset($products))
+
+
+
+
+
+
+ @foreach($products as $product)
+ @foreach ($product->cross_sells()->paginate(2) as $index => $crossSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $crossSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+ @endforeach
+
+
+
+
+
+
+ @foreach($products as $product)
+ @foreach ($product->cross_sells()->paginate(2) as $index => $crossSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $crossSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/related-products.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/related-products.blade.php
new file mode 100644
index 000000000..b9d1e52e4
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/related-products.blade.php
@@ -0,0 +1,49 @@
+related_products()->get();
+?>
+
+@if ($relatedProducts->count())
+
+
+
+
+
+ @foreach ($relatedProducts as $index => $relatedProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $relatedProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+
+
+
+
+ @foreach ($relatedProducts as $index => $relatedProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $relatedProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/stock.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/stock.blade.php
new file mode 100644
index 000000000..c6c4caf13
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/stock.blade.php
@@ -0,0 +1,32 @@
+{!! view_render_event('bagisto.shop.products.view.stock.before', ['product' => $product]) !!}
+@inject('InventoryHelper', 'Webkul\Marketplace\Helpers\Helper')
+
+
+ @if($product->type == 'simple' || $product->type == 'configurable')
+
+ @if ( $InventoryHelper->stockHaveSufficientQuantity($product) === true )
+ {{ __('shop::app.products.in-stock') }}
+ @elseif ( $InventoryHelper->stockHaveSufficientQuantity($product) > 0 )
+ {{ __('shop::app.products.available-for-order') }}
+ @else
+ {{ __('shop::app.products.out-of-stock') }}
+ @endif
+
+ @else
+
+ @if ( $product->haveSufficientQuantity(1) === true )
+ {{ __('shop::app.products.in-stock') }}
+ @elseif ( $product->haveSufficientQuantity(1) > 0 )
+ {{ __('shop::app.products.available-for-order') }}
+ @else
+ {{ __('shop::app.products.out-of-stock') }}
+ @endif
+
+ @endif
+
+
+{!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/up-sells.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/up-sells.blade.php
new file mode 100644
index 000000000..86ec10bae
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/products/view/up-sells.blade.php
@@ -0,0 +1,48 @@
+up_sells()->get();
+?>
+@if ($productUpSells->count())
+
+
+
+
+
+ @foreach ($productUpSells as $index => $upSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $upSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+
+
+
+
+ @foreach ($productUpSells as $index => $upSellProduct)
+
+ @include ('shop::products.list.up-sell-card', [
+ 'product' => $upSellProduct,
+ 'addToCartBtnClass' => 'small-padding',
+ ])
+
+ @endforeach
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/index.blade.php
new file mode 100644
index 000000000..a3f5a5a69
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/index.blade.php
@@ -0,0 +1,15 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.marketplace.title') }}
+@stop
+
+@section('content-wrapper')
+
+ @php
+ $theme_template = core()->getConfigData('marketplace.settings.landing_page.layout') ?? 'layout1';
+ @endphp
+ @include('marketplace::shop.seller-central.'. $theme_template)
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout1.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout1.blade.php
new file mode 100644
index 000000000..4b5e13064
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout1.blade.php
@@ -0,0 +1,243 @@
+@if (core()->getConfigData('marketplace.settings.velocity.show_banner'))
+
+
+ @if (core()->getConfigData('marketplace.settings.velocity.banner'))
+
+ @else
+
+ @endif
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.page_title') ?? __('marketplace::app.shop.marketplace.title') }}
+
+
+ @if ($bannerContent = core()->getConfigData('marketplace.settings.velocity.banner_content'))
+
+ {!! $bannerContent !!}
+
+ @endif
+
+
+
+
+
+
+@endif
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_features'))
+
+
+
{{ core()->getConfigData('marketplace.settings.velocity.feature_heading') ?? __('marketplace::app.shop.marketplace.features') }}
+
+
{{ core()->getConfigData('marketplace.settings.velocity.feature_info') ?? __('marketplace::app.shop.marketplace.features-info') }}
+
+
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_1') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_1'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_1') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_2') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_2'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_2') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_3') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_3'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_3') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_4') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_4'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_4') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_5') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_5'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_5') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_6') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_6'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_6') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_7') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_7'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_7') }}
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_8') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_8'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_8') }}
+
+
+ @endif
+
+
+
+@endif
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_popular_sellers'))
+getPopularSellers(); ?>
+
+@if ($popularSellers->count())
+
+
+ {{ __('marketplace::app.shop.marketplace.popular-sellers') }}
+
+
+ @foreach ($popularSellers as $seller)
+
+
+
+
+ @if ($logo = $seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+ @endforeach
+
+@endif
+@endif
+
+
+
+
{{ __('marketplace::app.shop.marketplace.setup-title') }}
+
+
{{ __('marketplace::app.shop.marketplace.setup-info') }}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-1') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-2') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-3') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-4') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-5') }}
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout2.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout2.blade.php
new file mode 100644
index 000000000..2420a629f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout2.blade.php
@@ -0,0 +1,699 @@
+@if (core()->getConfigData('marketplace.settings.velocity.show_banner'))
+
+
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.layout2.page_title') ?? __('marketplace::app.shop.marketplace.title') }}
+
+
+ @if ($bannerContent = core()->getConfigData('marketplace.settings.layout2.banner_content'))
+
+ {!! $bannerContent !!}
+
+ @endif
+
+
+
+
+
+
+
+
+@endif
+
+@inject('reviewRepository', 'Webkul\Marketplace\Repositories\ReviewRepository')
+
+
+
+
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.layout2.step_one_image'))
+
+ @else
+
+ @endif
+
+
+
{{__('marketplace::app.shop.marketplace.layout2.step1-title')}}
+
{{__('marketplace::app.shop.marketplace.layout2.step1-content')}}
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.layout2.step_two_image'))
+
+ @else
+
+ @endif
+
+
+
{{__('marketplace::app.shop.marketplace.layout2.step2-title')}}
+
{{__('marketplace::app.shop.marketplace.layout2.step2-content')}}
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.layout2.step_three_image'))
+
+ @else
+
+ @endif
+
+
+
{{__('marketplace::app.shop.marketplace.layout2.step3-title')}}
+
{{__('marketplace::app.shop.marketplace.layout2.step3-content')}}
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.layout2.step_four_image'))
+
+ @else
+
+ @endif
+
+
+
{{__('marketplace::app.shop.marketplace.layout2.step4-title')}}
+
{{__('marketplace::app.shop.marketplace.layout2.step4-content')}}
+
+
+
+
+
+
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_features'))
+
+
+
{{ core()->getConfigData('marketplace.settings.velocity.feature_heading') ?? __('marketplace::app.shop.marketplace.features') }}
+
+
{{ core()->getConfigData('marketplace.settings.velocity.feature_info') ?? __('marketplace::app.shop.marketplace.features-info') }}
+
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_1') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_1'))
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_1') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_2') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_2'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_2') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_3') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_3'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_3') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_4') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_4'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_4') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_5') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_5'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_5') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_6') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_6'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_6') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_7') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_7'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_7') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.velocity.feature_icon_8') && core()->getConfigData('marketplace.settings.velocity.feature_icon_label_8'))
+
+
+
+
+
+ {{ core()->getConfigData('marketplace.settings.velocity.feature_icon_label_8') }}
+
+
+
+
+
+ Increase the number of customers
+
+
+
+
+
+ Increase the average transaction size
+
+
+
+
+
+ Increase the frequency of transactions per customer
+
+
+
+
+
+
+ @endif
+
+
+
+
+
+
+
+@endif
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_popular_sellers'))
+getPopularSellers(); ?>
+
+@if ($popularSellers->count())
+
+
+ {{ __('marketplace::app.shop.marketplace.popular-sellers') }}
+
+
+ @foreach ($popularSellers as $seller)
+
+
+
+
+ @if ($logo = $seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+ @endforeach
+
+@endif
+@endif
+
+
+
+
+
+
+
+
+
{{__('marketplace::app.shop.marketplace.layout2.query-help')}}
+
+ {{__('marketplace::app.shop.marketplace.layout2.query-help-tag-1')}}
+ {{__('marketplace::app.shop.marketplace.layout2.query-help-tag-2')}}
+ {{__('marketplace::app.shop.marketplace.layout2.query-help-tag-3')}}
+
+
+
+
+
+
+
+
+
+@push('scripts')
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout3.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout3.blade.php
new file mode 100644
index 000000000..0316bc614
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/layout3.blade.php
@@ -0,0 +1,213 @@
+@inject('reviewRepository', 'Webkul\Marketplace\Repositories\ReviewRepository')
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_banner'))
+
+
+ {{-- @if (core()->getConfigData('marketplace.settings.velocity.banner'))
+
+ @else
+
+ @endif --}}
+
+
+
+ {{ core()->getConfigData('marketplace.settings.layout3.page_title') ?? __('marketplace::app.shop.marketplace.title') }}
+
+
+ @if ($bannerContent = core()->getConfigData('marketplace.settings.layout3.banner_content'))
+
+ {!! $bannerContent !!}
+
+ @endif
+
+
+
+
+
+
+
+
+@endif
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_features'))
+
+
+
{{ core()->getConfigData('marketplace.settings.velocity.feature_heading') ?? __('marketplace::app.shop.marketplace.features') }}
+
+
+
{{ core()->getConfigData('marketplace.settings.velocity.feature_info') ?? __('marketplace::app.shop.marketplace.features-info') }}
+
+
+
+
+
+
+
+
+
+
{{core()->getConfigData('marketplace.settings.layout3.feature_icon_1_title')}}
+
{!! core()->getConfigData('marketplace.settings.layout3.feature_icon_1_content') !!}
+
+
+
+
+
+
+
+
+
{{core()->getConfigData('marketplace.settings.layout3.feature_icon_2_title')}}
+
{!! core()->getConfigData('marketplace.settings.layout3.feature_icon_2_content') !!}
+
+
+
+
+
+
+
+
+
{{core()->getConfigData('marketplace.settings.layout3.feature_icon_3_title')}}
+
{!! core()->getConfigData('marketplace.settings.layout3.feature_icon_3_content') !!}
+
+
+
+
+
+
+
+
+@endif
+
+
+
{{ __('marketplace::app.shop.marketplace.setup-title') }}
+
+
{{ __('marketplace::app.shop.marketplace.setup-info') }}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-1') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-2') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-3') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-4') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.marketplace.setup-5') }}
+
+
+
+@if (core()->getConfigData('marketplace.settings.velocity.show_popular_sellers'))
+getPopularSellers(); ?>
+
+@if ($popularSellers->count())
+
+
+ {{ __('marketplace::app.shop.marketplace.popular-sellers') }}
+
+
+ @foreach ($popularSellers as $seller)
+
+
+
+
+ @if ($logo = $seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+ @endforeach
+
+@endif
+@endif
+
+
+
+
+
+
+
+
{{__('marketplace::app.shop.marketplace.layout2.query-help')}}
+
+ {{__('marketplace::app.shop.marketplace.layout2.query-help-tag-1')}}
+ {{__('marketplace::app.shop.marketplace.layout2.query-help-tag-2')}}
+ {{__('marketplace::app.shop.marketplace.layout2.query-help-tag-3')}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/queryform.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/queryform.blade.php
new file mode 100644
index 000000000..22cad0679
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/seller-central/queryform.blade.php
@@ -0,0 +1,125 @@
+
+
+@push('scripts')
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/assign-videos.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/assign-videos.blade.php
new file mode 100644
index 000000000..31e2deb44
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/assign-videos.blade.php
@@ -0,0 +1,204 @@
+@php
+ if(! isset($product)) {
+ $product = null;
+
+ }
+@endphp
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.before', ['product' => $product]) !!}
+
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.before', ['product' => $product]) !!}
+
+
+
{{ __('admin::app.catalog.products.video') }}
+
+
+
+
+ @php $count=1 @endphp
+ @foreach ($errors->get('videos.*') as $key => $message)
+ @php echo str_replace($key, 'Video'.$count, $message[0]); $count++ @endphp
+ @endforeach
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.after', ['product' => $product]) !!}
+
+
+
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/categories.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/categories.blade.php
new file mode 100644
index 000000000..8d111ff23
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/categories.blade.php
@@ -0,0 +1,123 @@
+@if ($categories->count())
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.controls.before', ['product' => $product]) !!}
+{{--
+ @foreach ($categories as $category)
+ @if (is_null($category->ancestors))
+
{{$category->name}}
+ @else
+ @foreach ($category->ancestors as $ancestor)
+
{{$ancestor->name}}
+ @endforeach
+
{{$category->name}}
+ @endif
+ @endforeach --}}
+
+
+
+
+
+{{--
+
--}}
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.controls.after', ['product' => $product]) !!}
+
+
+
+@endif
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/customer-group-price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/customer-group-price.blade.php
new file mode 100644
index 000000000..3153798ab
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/customer-group-price.blade.php
@@ -0,0 +1,162 @@
+@section('css')
+ @parent
+
+@stop
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.customer_group_prices.before', ['product' => $product]) !!}
+
+
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.customer_group_prices.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/downloadable.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/downloadable.blade.php
new file mode 100644
index 000000000..437a4dd1c
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/downloadable.blade.php
@@ -0,0 +1,542 @@
+{!! view_render_event('bagisto.seller.catalog.product.edit_form_accordian.downloadable.before', ['product' => $product]) !!}
+
+@php
+ $locale = app()->getLocale();
+@endphp
+
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.links.controls.before', ['product' => $product]) !!}
+
+
+
+ {{ __('admin::app.catalog.products.links') }}
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.links.controls.after', ['product' => $product]) !!}
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.samples.controls.before', ['product' => $product]) !!}
+
+
+
+ {{ __('admin::app.catalog.products.samples') }}
+
+
+
+
+
+
+
+ {!! view_render_event('bagisto.seller.catalog.product.edit_form_accordian.downloadable.samples.controls.after', ['product' => $product]) !!}
+
+
+
+
+{!! view_render_event('bagisto.seller.catalog.product.edit_form_accordian.downloadable.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+
+
+
+
+@endpush
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/images.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/images.blade.php
new file mode 100644
index 000000000..6b72d62c9
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/images.blade.php
@@ -0,0 +1,24 @@
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.controls.before', ['product' => $product]) !!}
+
+
+ {{ __('admin::app.catalog.categories.image') }}
+
+
+
+
+ @php $count=1 @endphp
+ @foreach ($errors->get('images.*') as $key => $message)
+ @php echo str_replace($key, 'Image'.$count, $message[0]); $count++ @endphp
+ @endforeach
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.controls.after', ['product' => $product]) !!}
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/inventories.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/inventories.blade.php
new file mode 100644
index 000000000..bf4671b99
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/inventories.blade.php
@@ -0,0 +1,39 @@
+@if ($product->type != 'configurable')
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.controls.before', ['product' => $product]) !!}
+
+ getMarketplaceProductByProduct($product->id); ?>
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+ inventories as $inventory) {
+ if($inventory->inventory_source_id == $inventorySource->id && $inventory->vendor_id == $sellerProduct->marketplace_seller_id) {
+ $qty = $inventory->qty;
+ break;
+ }
+ }
+
+ $qty = old('inventories[' . $inventorySource->id . ']') ?: $qty;
+
+ ?>
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.controls.after', ['product' => $product]) !!}
+
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/product-links.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/product-links.blade.php
new file mode 100644
index 000000000..5afcdd92b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/product-links.blade.php
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/variations.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/variations.blade.php
new file mode 100644
index 000000000..f623ace19
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/variations.blade.php
@@ -0,0 +1,365 @@
+@if ($product->type == 'configurable')
+
+@section('css')
+ @parent
+
+@stop
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.controls.before', ['product' => $product]) !!}
+
+
+ {{ __('admin::app.catalog.products.add-variant-btn-title') }}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.controls.after', ['product' => $product]) !!}
+
+
+
+
+
+ {{ __('admin::app.catalog.products.add-variant-title') }}
+
+
+
+
+
+
+
+
+
+
+
+getMarketplaceProductByProduct($product->id); ?>
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/videos.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/videos.blade.php
new file mode 100644
index 000000000..49cede72b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/accordians/videos.blade.php
@@ -0,0 +1,198 @@
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.before', ['product' => $product]) !!}
+
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.before', ['product' => $product]) !!}
+
+
+
{{ __('admin::app.catalog.products.video') }}
+
+
+
+
+ @php $count=1 @endphp
+ @foreach ($errors->get('videos.*') as $key => $message)
+ @php echo str_replace($key, 'Video'.$count, $message[0]); $count++ @endphp
+ @endforeach
+
+
+
+ {!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.after', ['product' => $product]) !!}
+
+
+
+
+{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
+
+@push('scripts')
+ @parent
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/assign.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/assign.blade.php
new file mode 100644
index 000000000..ecb015245
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/assign.blade.php
@@ -0,0 +1,280 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.save-btn-title') }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.assign.before') !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.product-condition') }}
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.new') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.old') }}
+
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.price') }}
+ type == 'configurable' ? 'disabled' : '' }}/>
+ @{{ errors.first('price') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.description') }}
+ {{ old('description') }}
+ @{{ errors.first('description') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.assign-videos')
+
+ @if ($baseProduct->type != 'configurable' && $baseProduct->type != 'downloadable')
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+
+
+ @endif
+
+
+ {{-- @if ($baseProduct->type == 'downloadable')
+ @php
+ $product = app('Webkul\Marketplace\Repositories\ProductRepository')->findOneWhere(['product_id' => $baseProduct->id]);
+
+ @endphp
+ @include('marketplace::shop.velocity.sellers.account.catalog.products.accordians.downloadable', ['product' => $product])
+ @endif --}}
+ @if ($baseProduct->type == 'configurable')
+
+
+
+
+
+
+
+ @endif
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.assign.after') !!}
+
+
+
+
+
+@endsection
+
+@if ($baseProduct->type == 'configurable')
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/create.blade.php
new file mode 100644
index 000000000..9c899de06
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/create.blade.php
@@ -0,0 +1,160 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.create-title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.create-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.create') }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create.before') !!}
+
+
+
+ @csrf()
+
+ input('family') ?>
+ input('sku') ?>
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.general.before') !!}
+
+
+
+
+
+ {{ __('admin::app.catalog.products.product-type') }}
+
+ {{ __('admin::app.catalog.products.simple') }}
+ {{ __('admin::app.catalog.products.configurable') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.virtual') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.downloadable') }}
+
+
+ @if ($familyId)
+
+ @endif
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('admin::app.catalog.products.familiy') }}
+
+
+ @foreach ($families as $family)
+ id || old('attribute_family_id') == $family->id) ? 'selected' : '' }}>{{ $family->name }}
+ @endforeach
+
+
+ @if ($familyId)
+
+ @endif
+ @{{ errors.first('attribute_family_id') }}
+
+
+
+ {{ __('admin::app.catalog.products.sku') }}
+
+ @{{ errors.first('sku') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.general.after') !!}
+
+
+ @if ($familyId)
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.configurable_attributes.before') !!}
+
+
+
+
+
+
+
+
+ {{ __('admin::app.catalog.products.attribute-header') }}
+ {{ __('admin::app.catalog.products.attribute-option-header') }}
+
+
+
+
+
+ @foreach ($configurableFamily->configurable_attributes as $attribute)
+
+
+ {{ $attribute->admin_name }}
+
+
+ @foreach ($attribute->options as $option)
+
+
+ {{ $option->admin_name }}
+
+
+
+ @endforeach
+
+
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create_form_accordian.configurable_attributes.after') !!}
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.create.after') !!}
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/edit-assign.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/edit-assign.blade.php
new file mode 100644
index 000000000..7797374f1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/edit-assign.blade.php
@@ -0,0 +1,341 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-edit-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.assing-edit-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.save-btn-title') }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit-assign.before') !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.product-condition') }}
+
+ condition ?>
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.new') }}
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.old') }}
+
+ @{{ errors.first('type') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.price') }}
+ product->type == 'configurable' ? 'disabled' : '' }}/>
+ @{{ errors.first('price') }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.description') }}
+ {{ old('description') ?: $product->description }}
+ @{{ errors.first('description') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.assign-videos')
+
+ @if ($product->product->type != 'configurable' && $product->product->type != 'downloadable')
+
+
+
+ @foreach ($inventorySources as $inventorySource)
+
+ product->inventories as $inventory) {
+ if ($inventory->inventory_source_id == $inventorySource->id && $inventory->vendor_id == $product->marketplace_seller_id) {
+ $qty = $inventory->qty;
+ break;
+ }
+ }
+
+ $qty = old('inventories[' . $inventorySource->id . ']') ?: $qty;
+
+ ?>
+
+
+ {{ $inventorySource->name }}
+
+
+
+ @{{ errors.first('inventories[{!! $inventorySource->id !!}]') }}
+
+
+ @endforeach
+
+
+
+ @endif
+ @if ($product->product->type == 'downloadable')
+ @include('marketplace::shop.velocity.sellers.account.catalog.products.accordians.downloadable', ['product' => $product])
+ @endif
+ @if ($product->product->type == 'configurable')
+
+
+
+
+
+
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit-assign.after') !!}
+
+
+
+
+
+@endsection
+
+@if ($product->product->type == 'configurable')
+@push('scripts')
+ @parent
+
+
+
+
+
+
+@endpush
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/edit.blade.php
new file mode 100644
index 000000000..89dd0c6be
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/edit.blade.php
@@ -0,0 +1,297 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.edit-title') }}
+@endsection
+
+@section('content')
+
+ getLocale(); ?>
+ getCurrentChannelCode(); ?>
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit.before', ['product' => $product]) !!}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.edit-title') }}
+
+
+
+
+ {{ __('admin::app.catalog.products.save-btn-title') }}
+
+
+
+
+
+
+
+
+
+ @csrf()
+
+
+
+
+
+ getSellerByProductId($product->id);
+
+ $sellerProduct = $productRepository->getMarketplaceProductByProduct($product->id, $seller->id);
+ ?>
+
+ @foreach ($product->attribute_family->attribute_groups as $attributeGroup)
+ getEditableAttributes($attributeGroup); ?>
+ @if (count($customAttributes))
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.before', ['product' => $product]) !!}
+
+ @if ($attributeGroup->name == "General")
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.controls.before', ['product' => $product]) !!}
+
+ @foreach ($attributeGroup->custom_attributes as $attribute)
+ @if (! $product->super_attributes->contains($attribute))
+
+ type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight'])) {
+ if (! $attribute->is_required)
+ continue;
+
+ $disabled = true;
+ } else {
+ if ($attribute->is_required) {
+ array_push($validations, 'required');
+ }
+
+ if ($attribute->type == 'price') {
+ array_push($validations, 'decimal');
+ }
+
+ array_push($validations, $attribute->validation);
+ }
+
+ $validations = implode('|', array_filter($validations));
+
+ if ($attribute->code == 'status' && !$sellerProduct->is_approved) {
+ echo '
';
+ continue;
+ }
+ ?>
+
+ @if (view()->exists($typeView = 'admin::catalog.products.field-types.' . $attribute->type))
+
+
+ is_required ? 'class=mandatory required' : '' }}>
+ {{ $attribute->admin_name }}
+
+ @if ($attribute->type == 'price')
+ ({{ core()->currencySymbol(core()->getBaseCurrencyCode()) }})
+ @endif
+
+ value_per_channel) {
+ array_push($channel_locale, $channel);
+ }
+
+ if ($attribute->value_per_locale) {
+ array_push($channel_locale, $locale);
+ }
+ ?>
+
+ @if (count($channel_locale))
+ [{{ implode(' - ', $channel_locale) }}]
+ @endif
+
+
+ @include ($typeView)
+
+ @{{ errors.first('{!! $attribute->code !!}') }}
+
+
+ @endif
+
+ @endif
+
+ @endforeach
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.controls.after', ['product' => $product]) !!}
+
+
+
+ @else
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.controls.before', ['product' => $product]) !!}
+
+ @foreach ($attributeGroup->custom_attributes as $attribute)
+ @if (! $product->super_attributes->contains($attribute))
+
+ type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight'])) {
+ if (! $attribute->is_required)
+ continue;
+
+ $disabled = true;
+ } else {
+ if ($attribute->is_required) {
+ array_push($validations, 'required');
+ }
+
+ if ($attribute->type == 'price') {
+ array_push($validations, 'decimal');
+ }
+
+ array_push($validations, $attribute->validation);
+ }
+
+ $validations = implode('|', array_filter($validations));
+
+ if ($attribute->code == 'status' && !$sellerProduct->is_approved) {
+ echo '
';
+ continue;
+ }
+ ?>
+
+ @if (view()->exists($typeView = 'admin::catalog.products.field-types.' . $attribute->type))
+
+
+ is_required ? 'class=mandatory required' : '' }}>
+ {{ $attribute->admin_name }}
+
+ @if ($attribute->type == 'price')
+ ({{ core()->currencySymbol(core()->getBaseCurrencyCode()) }})
+ @endif
+
+ value_per_channel) {
+ array_push($channel_locale, $channel);
+ }
+
+ if ($attribute->value_per_locale) {
+ array_push($channel_locale, $locale);
+ }
+ ?>
+
+ @if (count($channel_locale))
+ [{{ implode(' - ', $channel_locale) }}]
+ @endif
+
+
+ @include ($typeView)
+
+ @{{ errors.first('{!! $attribute->code !!}') }}
+
+
+ @endif
+
+ @endif
+
+ @endforeach
+
+
+ @if ($attributeGroup->name == 'Price')
+
+ @include('marketplace::shop.sellers.account.catalog.products.accordians.customer-group-price')
+
+ @endif
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.controls.after', ['product' => $product]) !!}
+
+
+
+ @endif
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.' . $attributeGroup->name . '.after', ['product' => $product]) !!}
+
+ @endif
+
+ @endforeach
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.inventories')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.inventories.after', ['product' => $product]) !!}
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.images')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.images.after', ['product' => $product]) !!}
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.categories')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.categories.after', ['product' => $product]) !!}
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.before', ['product' => $product]) !!}
+
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.variations')
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.variations.after', ['product' => $product]) !!}
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.videos.before', ['product' => $product]) !!}
+
+ @include ('marketplace::shop.sellers.account.catalog.products.accordians.videos')
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
+
+ @foreach ($product->getTypeInstance()->getAdditionalViews() as $view)
+
+ @if (\Illuminate\Support\Str::contains($view , 'download'))
+ @include ($view)
+ @endif
+
+ @endforeach
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.product.edit.after', ['product' => $product]) !!}
+
+
+
+@stop
+
+@push('scripts')
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/index.blade.php
new file mode 100644
index 000000000..5dcf272b9
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/index.blade.php
@@ -0,0 +1,38 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.title') }}
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.list.before') !!}
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\ProductDataGrid')->render() !!}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/search.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/search.blade.php
new file mode 100644
index 000000000..eed69b162
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/catalog/products/search.blade.php
@@ -0,0 +1,148 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.search-title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.catalog.products.search-title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.search.before') !!}
+
+
+
+ {!! view_render_event('marketplace.sellers.account.catalog.products.search.after') !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/customers/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/customers/index.blade.php
new file mode 100644
index 000000000..5fbf93da3
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/customers/index.blade.php
@@ -0,0 +1,33 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.customer.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.customer.title') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.customer.list.before') !!}
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\CustomerDataGrid')->render() !!}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.customer.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/customers/orders.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/customers/orders.blade.php
new file mode 100644
index 000000000..95cadca4e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/customers/orders.blade.php
@@ -0,0 +1,36 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.customer.orders.list.before') !!}
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\CustomerOrderDataGrid')->render() !!}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/dashboard/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/dashboard/index.blade.php
new file mode 100644
index 000000000..cb3c771aa
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/dashboard/index.blade.php
@@ -0,0 +1,523 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.dashboard.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.dashboard.title') }}
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.dashboard.before') !!}
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-orders') }}
+
+
+
+ {{ $statistics['total_orders']['current'] }}
+
+
+ @if ($statistics['total_orders']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_orders']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_orders']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.total-sale') }}
+
+ @php $currentCurrencyCode = core()->getCurrentCurrencyCode(); @endphp
+
+ {{ core()->formatPrice($statistics['total_sales']['current'],$currentCurrencyCode ) }}
+
+
+ @if ($statistics['total_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['total_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['total_sales']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.average-sale') }}
+
+
+
+ {{ core()->formatPrice($statistics['avg_sales']['current'], $currentCurrencyCode) }}
+
+
+ @if ($statistics['avg_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @endif
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.dashboard.total-payout') }}
+
+
+
+ {{ core()->formatPrice($statistics['seller_payout']['total_payout'], $currentCurrencyCode) }}
+
+ {{--
+ @if ($statistics['avg_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @endif --}}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.dashboard.remaining-payout') }}
+
+
+
+ {{ core()->formatPrice($statistics['seller_payout']['remaining_payout'], $currentCurrencyCode) }}
+
+ {{--
+ @if ($statistics['avg_sales']['progress'] < 0)
+
+ {{ __('admin::app.dashboard.decreased', [
+ 'progress' => -number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @else
+
+ {{ __('admin::app.dashboard.increased', [
+ 'progress' => number_format($statistics['avg_sales']['progress'], 1)
+ ])
+ }}
+ @endif --}}
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.dashboard.sales-by-location') }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.sales') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.top-selling-products') }}
+
+
+
+
+
+ @if (! count($statistics['top_selling_products']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+ {{ __('admin::app.dashboard.customer-with-most-sales') }}
+
+
+
+
+
+ @foreach ($statistics['customer_with_most_sales'] as $item)
+
+
+
+
+
+
+
+
+ {{ $item->customer_full_name }}
+
+
+
+ {{ __('admin::app.dashboard.order-count', ['count' => $item->total_orders]) }}
+ .
+ {{ __('admin::app.dashboard.revenue', [
+ 'total' => core()->formatBasePrice($item->total_base_grand_total)
+ ])
+ }}
+
+
+
+
+ @endforeach
+
+
+
+ @if (! count($statistics['customer_with_most_sales']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.stock-threshold') }}
+
+
+
+
+
+ @if (! count($statistics['stock_threshold']))
+
+
+
+
+
{{ __('admin::app.common.no-result-found') }}
+
+
+
+ @endif
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.dashboard.after') !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/earning/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/earning/index.blade.php
new file mode 100644
index 000000000..d502f387e
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/earning/index.blade.php
@@ -0,0 +1,237 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.earning.title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.earning.title') }}
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.earning.before') !!}
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('admin::app.dashboard.sales') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interval
+ Orders
+ Total Amount
+ Total Earning
+ Total Discount
+ Admin Commission
+
+
+
+
+ @foreach ($statistics['sale_graph']['label'] as $key => $label)
+ @if ($statistics['sale_graph']['total'][$key] == 0)
+
+ @endif
+
+ {{$label}}
+ {{$statistics['sale_graph']['orders'][$key]}}
+ {{$statistics['sale_graph']['total'][$key]}}
+ {{$statistics['sale_graph']['total_earning'][$key]}}
+ {{$statistics['sale_graph']['discount'][$key]}}
+ {{$statistics['sale_graph']['commission'][$key]}}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.earning.after') !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/paymentRequest/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/paymentRequest/index.blade.php
new file mode 100644
index 000000000..fead0a50f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/paymentRequest/index.blade.php
@@ -0,0 +1,74 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.list.before') !!}
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total-sale') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_sale']) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total-payout') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_payout']) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.remaining-payout') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['remaining_payout']) }}
+
+
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\PaymentRequestDataGrid')->render() !!}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/profile/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/profile/create.blade.php
new file mode 100644
index 000000000..664879216
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/profile/create.blade.php
@@ -0,0 +1,58 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.profile.create-title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+
+
{{ __('marketplace::app.shop.sellers.account.profile.create-title') }}
+
+
+
+ @if (! $seller)
+
+ {{ __('marketplace::app.shop.sellers.account.profile.save-btn-title') }}
+
+ @endif
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.create.before') !!}
+
+
+
+ @if (! $seller)
+
+ @csrf()
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.url') }}
+
+ @{{ errors.first('url') }}
+
+ @else
+
+ {{ __('marketplace::app.shop.sellers.account.profile.waiting-for-approval') }}
+
+ @endif
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.create.after') !!}
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/profile/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/profile/edit.blade.php
new file mode 100644
index 000000000..66fa6f7dd
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/profile/edit.blade.php
@@ -0,0 +1,285 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.profile.edit-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+
+
{{ __('marketplace::app.shop.sellers.account.profile.edit-title') }}
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.edit.before', ['seller' => $seller]) !!}
+
+
+
+ @csrf()
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.logo') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.banner') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.about') }}
+ {{ old('description') ?: $seller->description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.return_policy') }}
+ {{ old('return_policy') ?: $seller->return_policy }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.shipping_policy') }}
+ {{ old('shipping_policy') ?: $seller->shipping_policy }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.privacy_policy') }}
+ {{ old('privacy_policy') ?: $seller->privacy_policy }}
+
+
+
+
+
+ @if ($seller->commission_enable)
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.admin-commission-percent') }}
+
+
+
+
+
+ @endif
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.meta_description') }}
+ {{ old('meta_description') ?: $seller->meta_description }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.meta_keywords') }}
+ {{ old('meta_keywords') ?: $seller->meta_keywords }}
+
+
+
+
+
+ @if (core()->getConfigData('marketplace.settings.minimum_order_amount.enable'))
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.min_order_amount') }}
+
+ @{{ errors.first('min_order_amount') }}
+
+
+
+
+ @endif
+
+ @if (core()->getConfigData('marketplace.settings.google_analytics.enable'))
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.google_analytics_id') }}
+
+ @{{ errors.first('google_analytics_id') }}
+
+
+
+
+ @endif
+
+
+
+ {!! view_render_event('marketplace.sellers.account.profile.edit.after', ['seller' => $seller]) !!}
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/reviews/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/reviews/index.blade.php
new file mode 100644
index 000000000..127cf8caf
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/reviews/index.blade.php
@@ -0,0 +1,33 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.reviews.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.reviews.title') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.reviews.list.before') !!}
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\ReviewDataGrid')->render() !!}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.reviews.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/invoices/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/invoices/create.blade.php
new file mode 100644
index 000000000..0245f588b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/invoices/create.blade.php
@@ -0,0 +1,204 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.create-title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+ @csrf
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.create-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.create') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.invoices.create.before', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.invoices.order-id') }}
+
+
+
+ #{{ $sellerOrder->order_id }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.placed-on') }}
+
+
+
+ {{ core()->formatDate($sellerOrder->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.status') }}
+
+
+
+ {{ $sellerOrder->status_label }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.customer-name') }}
+
+
+
+ {{ $sellerOrder->order->customer_full_name }}
+
+
+
+
+
+ {{ __ ('marketplace::app.shop.sellers.account.sales.orders.email') }}
+
+
+
+ {{ $sellerOrder->order->customer_email }}
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->billing_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->shipping_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.invoices.create.after', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/invoices/pdf.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/invoices/pdf.blade.php
new file mode 100644
index 000000000..87afa8972
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/invoices/pdf.blade.php
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.invoice-id') }} -
+ #{{ $sellerInvoice->invoice_id }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.order-id') }} -
+ #{{ $sellerInvoice->invoice->order_id }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.order-date') }} -
+ {{ core()->formatDate($sellerInvoice->order->created_at, 'M d, Y') }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.bill-to') }}
+ {{ __('shop::app.customer.account.order.view.ship-to') }}
+
+
+
+
+
+
+ {{ $sellerInvoice->invoice->order->billing_address->name }}
+ {{ $sellerInvoice->invoice->order->billing_address->address1 }}, {{ $sellerInvoice->invoice->order->billing_address->address2 ? $sellerInvoice->invoice->order->billing_address->address2 . ',' : '' }}
+ {{ $sellerInvoice->invoice->order->billing_address->city }}
+ {{ $sellerInvoice->invoice->order->billing_address->state }}
+ {{ core()->country_name($sellerInvoice->invoice->order->billing_address->country) }} {{ $sellerInvoice->invoice->order->billing_address->postcode }}
+ {{ __('shop::app.customer.account.order.view.contact') }} : {{ $sellerInvoice->invoice->order->billing_address->phone }}
+
+
+ {{ $sellerInvoice->invoice->order->shipping_address->name }}
+ {{ $sellerInvoice->invoice->order->shipping_address->address1 }}, {{ $sellerInvoice->invoice->order->shipping_address->address2 ? $sellerInvoice->invoice->order->shipping_address->address2 . ',' : '' }}
+ {{ $sellerInvoice->invoice->order->shipping_address->city }}
+ {{ $sellerInvoice->invoice->order->shipping_address->state }}
+ {{ core()->country_name($sellerInvoice->invoice->order->shipping_address->country) }} {{ $sellerInvoice->invoice->order->shipping_address->postcode }}
+ {{ __('shop::app.customer.account.order.view.contact') }} : {{ $sellerInvoice->invoice->order->shipping_address->phone }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerInvoice->invoice->order->payment->method . '.title') }}
+
+
+ {{ $sellerInvoice->invoice->order->shipping_title }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerInvoice->items as $sellerInvoiceItem)
+ item; ?>
+
+ {{ $baseInvoiceItem->name }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->price, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+ {{ $baseInvoiceItem->qty }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->tax_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->discount_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total + $baseInvoiceItem->tax_amount - $sellerInvoice->discount_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->sub_total, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->shipping_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->tax_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->discount_amount, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->grand_total, $sellerInvoice->invoice->order->order_currency_code) }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/orders/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/orders/index.blade.php
new file mode 100644
index 000000000..2f3b1f4a2
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/orders/index.blade.php
@@ -0,0 +1,36 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.list.before') !!}
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\OrderDataGrid')->render() !!}
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/orders/view.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/orders/view.blade.php
new file mode 100644
index 000000000..11fc3487a
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/orders/view.blade.php
@@ -0,0 +1,615 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.view-title', ['order_id' => $sellerOrder->order_id]) }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.view-title', ['order_id' => $sellerOrder->order_id]) }}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.view.before', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.placed-on') }}
+
+
+
+ {{ core()->formatDate($sellerOrder->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.status') }}
+
+
+
+ {{ $sellerOrder->status_label }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.customer-name') }}
+
+
+
+ {{ $sellerOrder->order->customer_full_name }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.email') }}
+
+
+
+ {{ $sellerOrder->order->customer_email }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.item-status') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.admin-commission') }}
+ {{ __('shop::app.customer.account.order.view.tax-percent') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerOrder->items as $sellerOrderItem)
+
+
+ {{ $sellerOrderItem->item->type == 'configurable' ? $sellerOrderItem->item->child->sku : $sellerOrderItem->item->sku }}
+
+
+ {{ $sellerOrderItem->item->name }}
+
+ @if (isset($sellerOrderItem->additional['attributes']))
+
+
+ @foreach ($sellerOrderItem->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+ {{ core()->formatPrice($sellerOrderItem->item->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $sellerOrderItem->item->qty_ordered]) }}
+
+
+
+ {{ $sellerOrderItem->item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $sellerOrderItem->item->qty_invoiced]) : '' }}
+
+
+
+ {{ $sellerOrderItem->item->qty_refunded ? __('admin::app.sales.orders.item-refunded', ['qty_refunded' => $sellerOrderItem->item->qty_refunded]) : '' }}
+
+
+
+ {{ $sellerOrderItem->item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $sellerOrderItem->item->qty_shipped]) : '' }}
+
+
+
+ {{ $sellerOrderItem->item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $sellerOrderItem->item->qty_canceled]) : '' }}
+
+
+ {{ core()->formatPrice($sellerOrderItem->item->total, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->item->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ core()->formatPrice($sellerOrderItem->commission, $sellerOrder->order->order_currency_code) }}
+ {{ number_format($sellerOrderItem->item->tax_percent, 2) }}%
+ {{ core()->formatPrice($sellerOrderItem->item->tax_amount, $sellerOrder->order->order_currency_code) }}
+ {{ core()->formatPrice($sellerOrderItem->item->total + $sellerOrderItem->item->tax_amount - $sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+
+
+ {{ core()->formatPrice($sellerOrder->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-paid') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->grand_total_invoiced, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-refunded') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->order->grand_total_refunded, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.total-due') }}
+ -
+
+ {{ core()->formatPrice($sellerOrder->base_total_due, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.total-seller-amount') }}
+
+ -
+ {{ core()->formatPrice($sellerOrder->seller_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.total-admin-commission') }}
+
+ -
+ {{ core()->formatPrice($sellerOrder->commission, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+
+
+
+ @if ($sellerOrder->invoices->count())
+
+
+ @foreach ($sellerOrder->invoices as $sellerInvoice)
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ {{ __('shop::app.customer.account.order.view.tax-amount') }}
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+
+
+
+
+
+ @foreach ($sellerInvoice->items as $sellerInvoiceItem)
+ item; ?>
+
+ {{ $baseInvoiceItem->name }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ $baseInvoiceItem->qty }}
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseInvoiceItem->total + $baseInvoiceItem->tax_amount - $sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+
+ {{ core()->formatPrice($sellerInvoice->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+
+ -
+
+
+ {{ core()->formatPrice($sellerInvoice->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+
+
+ {{ core()->formatPrice($sellerInvoice->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+
+
+ {{ core()->formatPrice($sellerInvoice->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerInvoice->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+ @endif
+
+ @if ($sellerOrder->refunds->count())
+
+
+ @foreach ($sellerOrder->refunds as $sellerRefund)
+
+
+
+
+
+
+
+ {{ __('admin::app.sales.orders.product-name') }}
+ {{ __('admin::app.sales.orders.price') }}
+ {{ __('admin::app.sales.orders.qty') }}
+ {{ __('admin::app.sales.orders.subtotal') }}
+ {{ __('admin::app.sales.orders.tax-amount') }}
+ {{ __('admin::app.sales.orders.discount-amount') }}
+ {{ __('admin::app.sales.orders.grand-total') }}
+
+
+
+
+ @foreach ($sellerRefund->items as $sellerRefundItem)
+ item; ?>
+
+ {{ $baseRefundItem->name }}
+
+
+ {{ core()->formatPrice($baseRefundItem->price, $sellerOrder->order->order_currency_code) }}
+
+
+ {{ $baseRefundItem->qty }}
+
+
+ {{ core()->formatPrice($baseRefundItem->total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseRefundItem->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseRefundItem->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ core()->formatPrice($baseRefundItem->total + $baseRefundItem->tax_amount - $sellerOrder->discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.subtotal') }}
+ -
+ {{ core()->formatPrice($sellerRefund->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+ @if ($sellerRefund->shipping_amount > 0)
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerRefund->shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+ @endif
+
+
+ {{ __('shop::app.customer.account.order.view.tax') }}
+ -
+ {{ core()->formatPrice($sellerRefund->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.discount') }}
+ -
+ {{ core()->formatPrice($sellerRefund->base_discount_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('admin::app.sales.refunds.adjustment-refund') }}
+ -
+ {{ core()->formatPrice($sellerRefund->base_adjustment_refund, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('admin::app.sales.refunds.adjustment-fee') }}
+ -
+ {{ core()->formatPrice($sellerRefund->base_adjustment_fee, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.grand-total') }}
+ -
+ {{ core()->formatPrice($sellerRefund->grand_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+ @endforeach
+
+ @endif
+
+ @if ($sellerOrder->shipments->count())
+
+
+ @foreach ($sellerOrder->shipments as $sellerShipment)
+
+
+
+ {{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $sellerShipment->shipment_id]) }}
+
+
+
+
+
+
+
+
+ @if ($sellerShipment->shipment->inventory_source)
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.inventory-source') }}
+ {{ $sellerShipment->shipment->inventory_source->name }}
+
+ @endif
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.carrier-title') }}
+ {{ $sellerShipment->shipment->carrier_title }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.tracking-number') }}
+
+
+
+ {{ $sellerShipment->shipment->track_number }}
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.SKU') }}
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+
+
+
+
+
+ @foreach ($sellerShipment->items as $sellerShipmentItem)
+
+
+ {{ $sellerShipmentItem->item->sku }}
+ {{ $sellerShipmentItem->item->name }}
+ {{ $sellerShipmentItem->item->qty }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ @endforeach
+
+ @endif
+
+
+
+
+
+ @if ($sellerOrder->order->haveStockableItems())
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->shipping_address])
+
+
+
+
+ @endif
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->billing_address])
+
+
+
+
+ @if ($sellerOrder->order->haveStockableItems())
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+ @endif
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.orders.view.after', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/shipments/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/shipments/create.blade.php
new file mode 100644
index 000000000..d206ddad1
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/shipments/create.blade.php
@@ -0,0 +1,317 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.create-title') }}
+@endsection
+
+@section('content')
+
+
+
+
+ @csrf
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.create-title') }}
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.create') }}
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.shipments.create.before', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.shipments.order-id') }}
+
+
+
+ #{{ $sellerOrder->order_id }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.placed-on') }}
+
+
+
+ {{ core()->formatDate($sellerOrder->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.status') }}
+
+
+
+ {{ $sellerOrder->status_label }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.customer-name') }}
+
+
+
+ {{ $sellerOrder->order->customer_full_name }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.orders.email') }}
+
+
+
+ {{ $sellerOrder->order->customer_email }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->billing_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }}
+
+
+
+
+ @include ('admin::sales.address', ['address' => $sellerOrder->order->shipping_address])
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }}
+
+
+
+
+ {{ $sellerOrder->order->shipping_title }}
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }}
+
+
+
+ {{ core()->getConfigData('sales.paymentmethods.' . $sellerOrder->order->payment->method . '.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.shipments.create.after', ['sellerOrder' => $sellerOrder]) !!}
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/transactions/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/transactions/index.blade.php
new file mode 100644
index 000000000..c5b031219
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/transactions/index.blade.php
@@ -0,0 +1,74 @@
+@extends('shop::customers.account.index')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.title') }}
+@endsection
+
+@section('page-detail-wrapper')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.title') }}
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.list.before') !!}
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total-sale') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_sale']) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total-payout') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['total_payout']) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.remaining-payout') }}
+
+
+
+ {{ core()->formatBasePrice($statistics['remaining_payout']) }}
+
+
+
+
+
+
+
+
+ {!! app('Webkul\Marketplace\DataGrids\Shop\TransactionDataGrid')->render() !!}
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.list.after') !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/transactions/view.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/transactions/view.blade.php
new file mode 100644
index 000000000..e0e2f54b9
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/account/sales/transactions/view.blade.php
@@ -0,0 +1,188 @@
+@extends('marketplace::shop.layouts.account')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.view-title', ['transaction_id' => $transaction->transaction_id]) }}
+@endsection
+
+@push('css')
+
+@endpush
+
+@section('content')
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.view-title', ['transaction_id' => $transaction->transaction_id]) }}
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.view.before', ['transaction' => $transaction]) !!}
+
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.created-at') }}
+
+
+
+ {{ core()->formatDate($transaction->created_at, 'd M Y') }}
+
+
+
+
+
+ {{ __ ('marketplace::app.shop.sellers.account.sales.transactions.payment-method') }}
+
+
+
+ {{ $transaction->method }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.total') }}
+
+
+
+ {{ core()->formatBasePrice($transaction->base_total) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.comment') }}
+
+
+
+ {{ $transaction->comment }}
+
+
+
+
+
+
+
+
+
+ order; ?>
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.order-id', ['order_id' => $sellerOrder->order_id]) }}
+
+
+
+
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.product-name') }}
+ {{ __('shop::app.customer.account.order.view.price') }}
+ {{ __('shop::app.customer.account.order.view.qty') }}
+ {{ __('shop::app.customer.account.order.view.total') }}
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.commission') }}
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.seller-total') }}
+
+
+
+
+ @foreach ($sellerOrder->items as $sellerOrderItem)
+
+
+
+ {{ $sellerOrderItem->item->name }}
+
+ @if (isset($sellerOrderItem->additional['attributes']))
+
+
+ @foreach ($sellerOrderItem->additional['attributes'] as $attribute)
+ {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
+ @endforeach
+
+
+ @endif
+
+
+ {{ core()->formatPrice($sellerOrderItem->item->price, $sellerOrder->order->order_currency_code) }}
+
+ {{ $sellerOrderItem->item->qty_ordered }}
+
+ {{ core()->formatPrice($sellerOrderItem->item->total, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->commission, $sellerOrder->order->order_currency_code) }}
+
+ {{ core()->formatPrice($sellerOrderItem->seller_total, $sellerOrder->order->order_currency_code) }}
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.sub-total') }}
+ -
+ {{ core()->formatPrice($sellerOrder->sub_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-handling') }}
+ -
+ {{ core()->formatPrice($sellerOrder->base_shipping_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.tax') }}
+ -
+ {{ core()->formatPrice($sellerOrder->tax_amount, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.commission') }}
+ -
+ -{{ core()->formatPrice($sellerOrder->commission, $sellerOrder->order->order_currency_code) }}
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.sales.transactions.seller-total') }}
+ -
+ {{ core()->formatPrice($sellerOrder->seller_total, $sellerOrder->order->order_currency_code) }}
+
+
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.sellers.account.sales.transactions.view.after', ['transaction' => $transaction]) !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/left-profile.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/left-profile.blade.php
new file mode 100644
index 000000000..3cee8b835
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/left-profile.blade.php
@@ -0,0 +1,345 @@
+
+
+
+
+ @if ($logo = $seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.contact-seller') }}
+
+
+
+
+
+ {!! Captcha::renderJS() !!}
+
+
+
+@push('scripts')
+
+
+
+
+
+
+
+
+
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/add-buttons.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/add-buttons.blade.php
new file mode 100644
index 000000000..dcbac0678
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/add-buttons.blade.php
@@ -0,0 +1,29 @@
+findOneWhere([
+ 'marketplace_seller_id' => $seller->id,
+ 'product_id' => $product->id
+ ]);
+ }
+?>
+
+
+
+ @csrf
+
+
+
+
+ @if (isset($marketPlaceProduct))
+ @if (isset($marketPlaceProduct['is_owner']) && $marketPlaceProduct['is_owner'] == 0)
+
+
+
+ @endif
+ @endif
+
+ isSaleable() ? '' : 'disabled' }}>{{ __('shop::app.products.add-to-cart') }}
+
+
+ @include('shop::products.wishlist')
+
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/index.blade.php
new file mode 100644
index 000000000..0b78cf289
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/index.blade.php
@@ -0,0 +1,99 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.products.title', ['shop_title' => $seller->shop_title]) }} - {{ $seller->name }}
+@endsection
+
+@section('content-wrapper')
+
+ @inject ('productRepository', 'Webkul\Marketplace\Repositories\ProductRepository')
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.before', ['seller' => $seller]) !!}
+
+
+ @include('marketplace::shop.sellers.top-profile')
+
+
+
+ @if ($banner = $seller->banner_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
+
+
+ @include ('shop::products.list.layered-navigation',['category' => null])
+
+
+
+ findAllBySeller($seller); ?>
+
+
+ @if ($products->count())
+
+ @include ('shop::products.list.toolbar')
+
+ @inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
+
+
+
+
+
+ @if ($toolbarHelper->getCurrentMode() == 'grid')
+
+ @foreach ($products as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+ @else
+
+ @foreach ($products as $productFlat)
+
+ @include ('shop::products.list.card', ['product' => $productFlat])
+
+ @endforeach
+
+ @endif
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.pagination.before') !!}
+
+
+ {{ $products->appends(request()->input())->links() }}
+
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.pagination.after') !!}
+
+ @else
+
+
+
{{ __('shop::app.products.whoops') }}
+
+
+ {{ __('shop::app.products.empty') }}
+
+
+
+ @endif
+
+
+
+
+
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.products.index.after', ['seller' => $seller]) !!}
+
+
+
+@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/price.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/price.blade.php
new file mode 100644
index 000000000..9023d7d0b
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/products/price.blade.php
@@ -0,0 +1,52 @@
+{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
+
+@inject ('priceHelper', 'Webkul\Marketplace\Helpers\Price')
+type == 'configurable') {
+
+ $marketPlaceProduct = app('Webkul\Marketplace\Repositories\ProductRepository')->findOneWhere([
+ 'marketplace_seller_id' => $seller->id,
+ 'product_id' => $product->id
+ ]);
+
+ if (isset($marketPlaceProduct)) {
+ $childProduct = app('Webkul\Marketplace\Repositories\ProductRepository')->findWhere([
+ 'marketplace_seller_id' => $seller->id,
+ 'parent_id' => $marketPlaceProduct->id
+ ])->pluck('price');
+
+ if (count($childProduct)) {
+ $minPrice = min($childProduct->toArray());
+ $variantMinPrice = core()->currency($minPrice);
+ }
+ }
+ }
+ }
+?>
+
+
+ @if ($product->type == 'configurable')
+
{{ __('shop::app.products.price-label') }}
+
+ @if (isset($seller) && isset($childProduct) && isset($variantMinPrice))
+
{{ $variantMinPrice }}
+ @else
+
{{ core()->currency($priceHelper->getMinimalPrice($product)) }}
+ @endif
+ @else
+ @if ($priceHelper->haveSpecialPrice($product))
+
+ {{ __('shop::app.products.sale') }}
+
+
+
{{ core()->currency($product->price) }}
+
+
{{ core()->currency($priceHelper->getSpecialPrice($product)) }}
+ @else
+
{{ core()->currency($product->price) }}
+ @endif
+ @endif
+
+
+{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/profile.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/profile.blade.php
new file mode 100644
index 000000000..019620674
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/profile.blade.php
@@ -0,0 +1,162 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ $seller->shop_title }}
+@stop
+
+@section('seo')
+ meta_description : Illuminate\Support\Str::limit(strip_tags($seller->description), 120, '') }}"/>
+
+@stop
+
+@push('css')
+
+@endpush
+
+@push('css')
+
+@endpush
+
+
+@section('content-wrapper')
+
+
+
+ @include('marketplace::shop.velocity.sellers.left-profile')
+
+
+
+ @if ($banner = $seller->banner_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+ @include('marketplace::shop.products.popular-products')
+
+
+
+ getRecentReviews($seller->id); ?>
+
+
+ @if ($reviews->count())
+
+
+
+
+
+ @foreach ($reviews as $review)
+
+
+
+ @for ($i = 1; $i <= $review->rating; $i++)
+
+
+
+ @endfor
+
+
+
+ {{ $review->comment }}
+
+
+
+
+ {{
+ __('marketplace::app.shop.sellers.profile.by-user-date', [
+ 'name' => $review->customer->name,
+ 'date' => core()->formatDate($review->created_at, 'F d, Y')
+ ])
+ }}
+
+
+
+ @endforeach
+
+
+
+
+
{{ __('marketplace::app.shop.sellers.profile.all-reviews') }}
+
+
+ @endif
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.return-policy') }}
+
+
+
+
+
+ {!! $seller->return_policy !!}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.shipping-policy') }}
+
+
+
+
+
+ {!! $seller->shipping_policy !!}
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.account.profile.privacy_policy') }}
+
+
+
+
+
+ {!! $seller->privacy_policy !!}
+
+
+
+
+
+
+
+
+
+ {{ __('marketplace::app.shop.sellers.profile.about-seller') }}
+
+
+
+
+
+
+
+ {{
+ __('marketplace::app.shop.sellers.profile.member-since', [
+ 'date' => core()->formatDate($seller->created_at, 'Y')
+ ])
+ }}
+
+
+
+ {!! $seller->description !!}
+
+
+
+
+
+
+
+
+@endsection
+
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/reviews/create.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/reviews/create.blade.php
new file mode 100644
index 000000000..4b4766d5f
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/reviews/create.blade.php
@@ -0,0 +1,90 @@
+@extends('marketplace::shop.layouts.master')
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.reviews.create-title', ['shop_title' => $seller->shop_title]) }} - {{ $seller->name }}
+@endsection
+
+@section('content-wrapper')
+
+ @include('marketplace::shop.velocity.sellers.left-profile')
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.create.before') !!}
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.create.after') !!}
+
+
+
+
+
+@endsection
+
+
+@push('scripts')
+
+
+
+ {!! Captcha::renderJS() !!}
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/reviews/index.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/reviews/index.blade.php
new file mode 100644
index 000000000..7eed4289d
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/reviews/index.blade.php
@@ -0,0 +1,158 @@
+@extends('marketplace::shop.layouts.master')
+
+
+@section('page_title')
+ {{ __('marketplace::app.shop.sellers.reviews.title', ['shop_title' => $seller->shop_title]) }} - {{ $seller->name }}
+@endsection
+
+@section('content-wrapper')
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.index.before', ['seller' => $seller]) !!}
+
+ @include('marketplace::shop.velocity.sellers.left-profile')
+
+
+
+ {!! view_render_event('marketplace.shop.sellers.reviews.index.after', ['seller' => $seller]) !!}
+
+
+
+@endsection
+
+@push('scripts')
+
+
+
+@endpush
\ No newline at end of file
diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/top-profile.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/top-profile.blade.php
new file mode 100644
index 000000000..783812512
--- /dev/null
+++ b/packages/Webkul/Marketplace/src/Resources/views/shop/velocity/sellers/top-profile.blade.php
@@ -0,0 +1,111 @@
+
+
+
+
+ @if ($logo = $seller->logo_url)
+
+ @else
+
+ @endif
+
+
+
+
+
+
diff --git a/packages/Webkul/Marketplace/webpack.mix.js b/packages/Webkul/Marketplace/webpack.mix.js
new file mode 100644
index 000000000..172f767d4
--- /dev/null
+++ b/packages/Webkul/Marketplace/webpack.mix.js
@@ -0,0 +1,34 @@
+const mix = require("laravel-mix");
+
+if (mix == 'undefined') {
+ const { mix } = require("laravel-mix");
+}
+
+require("laravel-mix-merge-manifest");
+
+if (mix.inProduction()) {
+ var publicPath = 'publishable/assets';
+} else {
+ var publicPath = '../../../public/vendor/webkul/marketplace/assets';
+}
+
+mix.setPublicPath(publicPath).mergeManifest();
+mix.disableNotifications();
+
+mix.js([__dirname + '/src/Resources/assets/js/app.js'], 'js/marketplace.js')
+ .copyDirectory(__dirname + '/src/Resources/assets/images', publicPath + "/images")
+ .sass(__dirname + '/src/Resources/assets/sass/default.scss', 'css/marketplace-default.css')
+ .sass(__dirname + '/src/Resources/assets/sass/velocity.scss', 'css/marketplace-velocity.css')
+ .sass(__dirname + '/src/Resources/assets/sass/admin.scss', 'css/marketplace-admin.css')
+ .options({
+ processCssUrls: false
+ });
+
+
+if (! mix.inProduction()) {
+ mix.sourceMaps();
+}
+
+if (mix.inProduction()) {
+ mix.version();
+}
\ No newline at end of file
diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore
index d6b7ef32c..9fd7400f5 100755
--- a/storage/app/public/.gitignore
+++ b/storage/app/public/.gitignore
@@ -1,2 +1,3 @@
*
!.gitignore
+!configuration/
diff --git a/storage/app/public/configuration/3npLBJCCEnvjtescuelWsENPEm0FzhvElzmFRWIe.png b/storage/app/public/configuration/3npLBJCCEnvjtescuelWsENPEm0FzhvElzmFRWIe.png
new file mode 100644
index 000000000..ae81b55ec
Binary files /dev/null and b/storage/app/public/configuration/3npLBJCCEnvjtescuelWsENPEm0FzhvElzmFRWIe.png differ
diff --git a/storage/app/public/configuration/7HOB5iER96qFtCpdP8JmWy6lw3QoeCY2jRKAzC6U.png b/storage/app/public/configuration/7HOB5iER96qFtCpdP8JmWy6lw3QoeCY2jRKAzC6U.png
new file mode 100644
index 000000000..313313683
Binary files /dev/null and b/storage/app/public/configuration/7HOB5iER96qFtCpdP8JmWy6lw3QoeCY2jRKAzC6U.png differ
diff --git a/storage/app/public/configuration/9Iggsyrd6OElGvYHg27LKfgvgLHx3hBKTXgESxYC.png b/storage/app/public/configuration/9Iggsyrd6OElGvYHg27LKfgvgLHx3hBKTXgESxYC.png
new file mode 100644
index 000000000..8d25adac8
Binary files /dev/null and b/storage/app/public/configuration/9Iggsyrd6OElGvYHg27LKfgvgLHx3hBKTXgESxYC.png differ
diff --git a/storage/app/public/configuration/9OGztMGb6nKUCBbF58xpNA1EShskKjoj9iUvJCrD.png b/storage/app/public/configuration/9OGztMGb6nKUCBbF58xpNA1EShskKjoj9iUvJCrD.png
new file mode 100644
index 000000000..7cf4b7056
Binary files /dev/null and b/storage/app/public/configuration/9OGztMGb6nKUCBbF58xpNA1EShskKjoj9iUvJCrD.png differ
diff --git a/storage/app/public/configuration/EiPYH1PP8tjqHZJAGqXwePS8sqrgQu44BAnLw7Hr.png b/storage/app/public/configuration/EiPYH1PP8tjqHZJAGqXwePS8sqrgQu44BAnLw7Hr.png
new file mode 100644
index 000000000..901b48bff
Binary files /dev/null and b/storage/app/public/configuration/EiPYH1PP8tjqHZJAGqXwePS8sqrgQu44BAnLw7Hr.png differ
diff --git a/storage/app/public/configuration/HcNKzA9bPzfMtnN31ku98lvo42ijDfPGGkauO1Uv.png b/storage/app/public/configuration/HcNKzA9bPzfMtnN31ku98lvo42ijDfPGGkauO1Uv.png
new file mode 100644
index 000000000..c33ee588d
Binary files /dev/null and b/storage/app/public/configuration/HcNKzA9bPzfMtnN31ku98lvo42ijDfPGGkauO1Uv.png differ
diff --git a/storage/app/public/configuration/JKms7R5AeMr4xMpdYMFh6lY97O1c8uJxrOOYrJh2.png b/storage/app/public/configuration/JKms7R5AeMr4xMpdYMFh6lY97O1c8uJxrOOYrJh2.png
new file mode 100644
index 000000000..90adf2ff8
Binary files /dev/null and b/storage/app/public/configuration/JKms7R5AeMr4xMpdYMFh6lY97O1c8uJxrOOYrJh2.png differ
diff --git a/storage/app/public/configuration/KU4TBnxTcbME3ZAwfmVRSqM1mQWuMmIdyhS17toX.png b/storage/app/public/configuration/KU4TBnxTcbME3ZAwfmVRSqM1mQWuMmIdyhS17toX.png
new file mode 100644
index 000000000..4437c1020
Binary files /dev/null and b/storage/app/public/configuration/KU4TBnxTcbME3ZAwfmVRSqM1mQWuMmIdyhS17toX.png differ
diff --git a/storage/app/public/configuration/LoxpyCBvnFold4XeD8c4JGScwIGtxLwOjfiyyXxU.png b/storage/app/public/configuration/LoxpyCBvnFold4XeD8c4JGScwIGtxLwOjfiyyXxU.png
new file mode 100644
index 000000000..be4148c42
Binary files /dev/null and b/storage/app/public/configuration/LoxpyCBvnFold4XeD8c4JGScwIGtxLwOjfiyyXxU.png differ
diff --git a/storage/app/public/configuration/PiAzZru2AJ31ahCPQUBmC0ubiBijVDqPLC4agxX0.png b/storage/app/public/configuration/PiAzZru2AJ31ahCPQUBmC0ubiBijVDqPLC4agxX0.png
new file mode 100644
index 000000000..7af83864e
Binary files /dev/null and b/storage/app/public/configuration/PiAzZru2AJ31ahCPQUBmC0ubiBijVDqPLC4agxX0.png differ
diff --git a/storage/app/public/configuration/XqCFcOKK5R7ldPWPUPaXYluQKYA63yXd9GXOAT8B.png b/storage/app/public/configuration/XqCFcOKK5R7ldPWPUPaXYluQKYA63yXd9GXOAT8B.png
new file mode 100644
index 000000000..81908ad38
Binary files /dev/null and b/storage/app/public/configuration/XqCFcOKK5R7ldPWPUPaXYluQKYA63yXd9GXOAT8B.png differ
diff --git a/storage/app/public/configuration/YdfbYPo8aIdup1UWaNBrQHwtOYupvknPM4UuhRDM.png b/storage/app/public/configuration/YdfbYPo8aIdup1UWaNBrQHwtOYupvknPM4UuhRDM.png
new file mode 100644
index 000000000..283b42728
Binary files /dev/null and b/storage/app/public/configuration/YdfbYPo8aIdup1UWaNBrQHwtOYupvknPM4UuhRDM.png differ
diff --git a/storage/app/public/configuration/YvJHOSJLldKpgi0MrgDNy0ookuAyXbYuAtQQI9am.png b/storage/app/public/configuration/YvJHOSJLldKpgi0MrgDNy0ookuAyXbYuAtQQI9am.png
new file mode 100644
index 000000000..492e23830
Binary files /dev/null and b/storage/app/public/configuration/YvJHOSJLldKpgi0MrgDNy0ookuAyXbYuAtQQI9am.png differ
diff --git a/storage/app/public/configuration/cN1NGisKLyVpsn1AldCEQg8ZZCJtSbbd5zTjZGwX.png b/storage/app/public/configuration/cN1NGisKLyVpsn1AldCEQg8ZZCJtSbbd5zTjZGwX.png
new file mode 100644
index 000000000..bd89e0de1
Binary files /dev/null and b/storage/app/public/configuration/cN1NGisKLyVpsn1AldCEQg8ZZCJtSbbd5zTjZGwX.png differ
diff --git a/storage/app/public/configuration/default-velocity-logo.png b/storage/app/public/configuration/default-velocity-logo.png
new file mode 100644
index 000000000..31ae64f74
Binary files /dev/null and b/storage/app/public/configuration/default-velocity-logo.png differ
diff --git a/storage/app/public/configuration/eSHFNPfIWrw7gLffadeR4FgOgBMeQtxWWxfmB45o.png b/storage/app/public/configuration/eSHFNPfIWrw7gLffadeR4FgOgBMeQtxWWxfmB45o.png
new file mode 100644
index 000000000..7e30707cc
Binary files /dev/null and b/storage/app/public/configuration/eSHFNPfIWrw7gLffadeR4FgOgBMeQtxWWxfmB45o.png differ
diff --git a/storage/app/public/configuration/ftpR2CDQNERkQHzY90Rty5B66WIIQyAkRIZLaxPh.png b/storage/app/public/configuration/ftpR2CDQNERkQHzY90Rty5B66WIIQyAkRIZLaxPh.png
new file mode 100644
index 000000000..7cf4b7056
Binary files /dev/null and b/storage/app/public/configuration/ftpR2CDQNERkQHzY90Rty5B66WIIQyAkRIZLaxPh.png differ
diff --git a/storage/app/public/configuration/gDQelR5VoHfRL4WWznGYz4ppU2rgF6UWsNhCQGsi.png b/storage/app/public/configuration/gDQelR5VoHfRL4WWznGYz4ppU2rgF6UWsNhCQGsi.png
new file mode 100644
index 000000000..162e4537f
Binary files /dev/null and b/storage/app/public/configuration/gDQelR5VoHfRL4WWznGYz4ppU2rgF6UWsNhCQGsi.png differ
diff --git a/storage/app/public/configuration/i7dgjt2Hw5xhUdmploHWMoV0aNml3W4GjEAyZm5e.png b/storage/app/public/configuration/i7dgjt2Hw5xhUdmploHWMoV0aNml3W4GjEAyZm5e.png
new file mode 100644
index 000000000..a6be9c4ba
Binary files /dev/null and b/storage/app/public/configuration/i7dgjt2Hw5xhUdmploHWMoV0aNml3W4GjEAyZm5e.png differ
diff --git a/storage/app/public/configuration/ji3oMmcj5xenj5EKyCgmiUrkRwPkF5JG3oCrNqde.png b/storage/app/public/configuration/ji3oMmcj5xenj5EKyCgmiUrkRwPkF5JG3oCrNqde.png
new file mode 100644
index 000000000..99c4a26dd
Binary files /dev/null and b/storage/app/public/configuration/ji3oMmcj5xenj5EKyCgmiUrkRwPkF5JG3oCrNqde.png differ
diff --git a/storage/app/public/configuration/kZZ5OSziGW3aQNVGkq4r4GL2VNTsQhVWLt62C0wb.png b/storage/app/public/configuration/kZZ5OSziGW3aQNVGkq4r4GL2VNTsQhVWLt62C0wb.png
new file mode 100644
index 000000000..3868ea7bc
Binary files /dev/null and b/storage/app/public/configuration/kZZ5OSziGW3aQNVGkq4r4GL2VNTsQhVWLt62C0wb.png differ
diff --git a/storage/app/public/configuration/lgj6ftKJCeCceXtjwK7k668CTnkjshKka0K5mO3w.png b/storage/app/public/configuration/lgj6ftKJCeCceXtjwK7k668CTnkjshKka0K5mO3w.png
new file mode 100644
index 000000000..7d37258b4
Binary files /dev/null and b/storage/app/public/configuration/lgj6ftKJCeCceXtjwK7k668CTnkjshKka0K5mO3w.png differ
diff --git a/storage/app/public/configuration/mp-velocity-banner.png b/storage/app/public/configuration/mp-velocity-banner.png
new file mode 100644
index 000000000..094c43b4a
Binary files /dev/null and b/storage/app/public/configuration/mp-velocity-banner.png differ
diff --git a/storage/app/public/configuration/sGtL2WxTxjFypyRMioRth0y4FRJUW6pZEYKfQXq2.png b/storage/app/public/configuration/sGtL2WxTxjFypyRMioRth0y4FRJUW6pZEYKfQXq2.png
new file mode 100644
index 000000000..b33771cff
Binary files /dev/null and b/storage/app/public/configuration/sGtL2WxTxjFypyRMioRth0y4FRJUW6pZEYKfQXq2.png differ
diff --git a/storage/app/public/configuration/tY9AYRKXZaKyE1VMCpWlBALKcdzia7nCHcl3D7U0.png b/storage/app/public/configuration/tY9AYRKXZaKyE1VMCpWlBALKcdzia7nCHcl3D7U0.png
new file mode 100644
index 000000000..8ffde8ef9
Binary files /dev/null and b/storage/app/public/configuration/tY9AYRKXZaKyE1VMCpWlBALKcdzia7nCHcl3D7U0.png differ