Skip to content

Commit

Permalink
Merge pull request #955 from xaviranik/feat/module-lite
Browse files Browse the repository at this point in the history
feat: dokan upgrade-to-pro modules page
  • Loading branch information
nurul-umbhiya authored Nov 28, 2020
2 parents ab8fc12 + 73fde5b commit de9baa9
Show file tree
Hide file tree
Showing 36 changed files with 522 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/images/dokan-upgrade-popup-bonus.svg
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/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
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 @@ -48,6 +48,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 . '#/pro-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' => '/pro-modules',
'name' => 'ProModules',
'component' => 'ProModules',
],
];

// @codingStandardsIgnoreLine
Expand Down
161 changes: 161 additions & 0 deletions src/admin/components/ModuleUpgradePopup.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<template>
<div id="dokan-upgrade-to-pro-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">
<a target="_blank" rel="noopener noreferrer" :href="upgradeURL" class="button">{{ __( 'Upgrade to Pro', 'dokan-lite' ) }}</a>

<div class="promo-card">
<img :src="bonusImage" :alt="__( 'Dokan Upgrade Promo', 'dokan-lite' )">
<p>{{ __( 'Bonus: Dokan Lite users get 30% 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
},
},
data() {
return {
upgradeURL: dokan.urls.upgradeToPro
}
},
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-to-pro-wrapper {
button, a {
box-shadow: none;
background: #FF5722;
color: #fff;
border-color: #FF5722;
margin: 0px 30px;
&:hover {
background: lighten(#FF5722, 5%);
}
}
.text-brand {
color: #FF5722;
}
.text-disabled {
color: #919191;
}
#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>
Loading

0 comments on commit de9baa9

Please sign in to comment.