Skip to content

Commit

Permalink
feat: dokan lite upgrade-to-pro modules page
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviranik committed Nov 16, 2020
1 parent 8fc291e commit fb2bc16
Show file tree
Hide file tree
Showing 36 changed files with 525 additions and 0 deletions.
Binary file added assets/images/modules/ajax-live-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/analytics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/auction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/booking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/color-scheme-customizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/duplicate-product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/elementor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/follow-store.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/geolocation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/import-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/invoice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/live-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/paypal-adaptive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/product-addon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/product-enquiry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/report-abuse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/rma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/seller-vacation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/shipstation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/store-support.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/stripe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/vendor-review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/vendor-staff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/modules/vendor-verification.png
Binary file added assets/images/modules/wholesale.png
Binary file added assets/images/modules/wirecard-connect.png
Binary file added assets/images/modules/wpml.png
4 changes: 4 additions & 0 deletions includes/Admin/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public function add_admin_menu() {
$submenu[ $slug ][] = array( __( 'Vendors', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/vendors' );
}

if ( ! dokan()->is_pro_exists() ) {
$submenu[ $slug ][] = array( __( 'Modules', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/lite-modules' );
}

if ( ! dokan()->is_pro_exists() ) {
$submenu[ $slug ][] = array( __( 'PRO Features', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/premium' );
}
Expand Down
5 changes: 5 additions & 0 deletions includes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ public function get_vue_admin_routes() {
'name' => 'VendorCapabilities',
'component' => 'VendorCapabilities',
],
[
'path' => '/lite-modules',
'name' => 'LiteModules',
'component' => 'LiteModules',
],
];

// @codingStandardsIgnoreLine
Expand Down
150 changes: 150 additions & 0 deletions src/admin/components/ModuleUpgradePopup.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<template>
<div id="dokan-upgrade-wrapper">
<div v-if="showPopup" id="dokan-upgrade-popup">
<div class="modal-content">
<span @click="closePopup" class="close"></span>
<div class="header">
<img :src="headerImage" :alt="__( 'Dokan Upgrade Popup', 'dokan-lite' )">
<h1>{{ __( 'Unlock 20+ Modules', 'dokan-lite' ) }}</h1>
<p class="text-brand">{{ __( 'with Dokan Premium Plans', 'dokan-lite' ) }}</p>
<p class="text-disabled">
{{ __( "We’re sorry, Dokan Modules are not available on Dokan Lite. Please upgrade to a PRO plan to unlock the modules of your choice.", 'dokan-lite' ) }}
</p>
</div>

<div class="body">
<button class="button">{{ __( 'Upgrade to Pro', 'dokan-lite' ) }}</button>

<div class="promo-card">
<img :src="bonusImage" :alt="__( 'Dokan Upgrade Promo', 'dokan-lite' )">
<p>{{ __( 'Bonus: Dokan Lite users get 50% off regular price, automatically applied to checkout.', 'dokan-lite' ) }}</p>
</div>

<span @click="closePopup">{{ __( 'Already upgraded?', 'dokan-lite' ) }}</span>
</div>
</div>
</div>
</div>
</template>

<script>
export default {
name: "ModuleUpgradePopup",
props: {
showPopup: {
type: Boolean,
required: true,
default: true
},
},
methods: {
closePopup() {
this.$emit('toggle', false);
},
openPopup() {
this.$emit('toggle', true);
},
},
computed: {
headerImage() {
return `${dokan.urls.assetsUrl}/images/dokan-upgrade-popup-header.svg`;
},
bonusImage() {
return `${dokan.urls.assetsUrl}/images/dokan-upgrade-popup-bonus.svg`;
},
},
}
</script>

<style lang="less">
#dokan-upgrade-popup {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
min-height: 360px;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.7);
z-index: 99900;
.modal-content {
background-color: #fefefe;
z-index: 100000;
margin: 8% auto;
width: 500px;
border-radius: 9px;
text-align: center;
p {
font-size: 14px;
}
span {
&.close {
float: right;
margin-top: -15px;
margin-right: -10px;
cursor: pointer;
color: #fff;
border: 1px solid #AEAEAE;
border-radius: 50%;
background: #fff;
font-size: 18px;
display: inline-block;
line-height: 0px;
padding: 20px 14px;
&:before {
content: "X";
color: #484848;
}
}
}
.header {
padding: 20px 40px;
h1 {
font-size: 30px;
}
img {
height: 120px;
display: block;
width: 50%;
margin: 20px auto 10px;
}
}
.body {
padding: 20px 40px;
background: rgba(255, 87, 34, 0.08);
button {
font-size: 16px !important;
}
.promo-card {
margin: 20px 0px;
background: #fff;
padding: 10px;
border-radius: 9px;
-webkit-box-shadow: 0px 0px 22px 0px rgba(207,207,207,1);
-moz-box-shadow: 0px 0px 22px 0px rgba(207,207,207,1);
box-shadow: 0px 0px 22px 0px rgba(207,207,207,1);
display: flex;
align-items: center;
}
span {
cursor: pointer;
color: #AD644E;
}
}
}
}
</style>
15 changes: 15 additions & 0 deletions src/admin/components/Modules.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
</template>

<script>
export default {
name: 'Modules',
};
</script>

<style lang="less">
</style>
Loading

0 comments on commit fb2bc16

Please sign in to comment.