Esempio n. 1
0
 /**
  * Show Seller Enable Error Message
  *
  * @since 2.4
  *
  * @return void
  */
 public function show_seller_enable_message()
 {
     $user_id = get_current_user_id();
     if (!dokan_is_seller_enabled($user_id)) {
         echo dokan_seller_not_enabled_notice();
     }
 }
Esempio n. 2
0
$pageviews = (int) dokan_author_pageviews($user_id);
$earning = dokan_author_total_sales($user_id);
$products_url = dokan_get_navigation_url('products');
$orders_url = dokan_get_navigation_url('orders');
$reviews_url = dokan_get_navigation_url('reviews');
?>

<div class="dokan-dashboard-wrap">
    <?php 
dokan_get_template('dashboard-nav.php', array('active_menu' => 'dashboard'));
?>

    <div class="dokan-dashboard-content">

        <?php 
if (!dokan_is_seller_enabled($user_id)) {
    dokan_seller_not_enabled_notice();
}
?>

        <article class="dashboard-content-area">
            <?php 
echo dokan_get_profile_progressbar();
?>
            <div class="dokan-w6 dokan-dash-left">
                <div class="dashboard-widget big-counter">
                    <ul class="list-inline">
                        <li>
                            <div class="title"><?php 
_e('Pageview', 'dokan');
?>
Esempio n. 3
0
</th>
                </tr>
            </thead>
            <tbody>
                <?php 
$paged = isset($_GET['pagenum']) ? absint($_GET['pagenum']) : 1;
$limit = 20;
$count = 0;
$offset = ($paged - 1) * $limit;
$user_search = new WP_User_Query(array('role' => 'seller', 'number' => $limit, 'offset' => $offset));
$sellers = (array) $user_search->get_results();
$post_counts = count_many_users_posts(wp_list_pluck($sellers, 'ID'), 'product');
if ($sellers) {
    foreach ($sellers as $user) {
        $info = dokan_get_store_info($user->ID);
        $seller_enable = dokan_is_seller_enabled($user->ID);
        $edit_link = esc_url(add_query_arg('wp_http_referer', urlencode(wp_unslash($_SERVER['REQUEST_URI'])), get_edit_user_link($user->ID)));
        ?>
                        <tr class="<?php 
        echo $count % 2 == 0 ? 'alternate' : 'odd';
        ?>
 ">
                            <th class="check-column">
                                <input type="checkbox" class="dokan-withdraw-allcheck" value="<?php 
        echo $user->ID;
        ?>
" name="users[]">
                            </th>
                            <td>
                                <strong><a href="<?php 
        echo $edit_link;
Esempio n. 4
0
                    <span class="left-header-content dokan-right">
                        <a href="<?php 
    echo add_query_arg(array('view' => 'add_coupons'), dokan_get_navigation_url('coupons'));
    ?>
" class="dokan-btn dokan-btn-theme dokan-right"><i class="fa fa-gift">&nbsp;</i> <?php 
    _e('Add new Coupon', 'dokan');
    ?>
</a>
                    </span>
                <?php 
}
?>
            </header><!-- .entry-header -->

            <?php 
if (!dokan_is_seller_enabled(get_current_user_id())) {
    dokan_seller_not_enabled_notice();
} else {
    ?>

                <?php 
    $dokan_template_coupons->list_user_coupons();
    ?>

                <?php 
    if (is_wp_error(Dokan_Template_Shortcodes::$validated)) {
        $messages = Dokan_Template_Shortcodes::$validated->get_error_messages();
        foreach ($messages as $message) {
            ?>
                        <div class="dokan-alert dokan-alert-danger" style="width: 40%; margin-left: 25%;">
                            <button type="button" class="dokan-close" data-dismiss="alert">&times;</button>
Esempio n. 5
0
 /**
  * Render Coupon Content
  *
  * @since 2.4
  *
  * @return void
  */
 public function dokan_coupon_content_render()
 {
     if (!dokan_is_seller_enabled(get_current_user_id())) {
         echo dokan_seller_not_enabled_notice();
     } else {
         $this->list_user_coupons();
         if (is_wp_error(self::$validated)) {
             $messages = self::$validated->get_error_messages();
             foreach ($messages as $message) {
                 dokan_get_template_part('global/dokan-error', '', array('deleted' => true, 'message' => $message));
             }
         }
         $this->add_coupons_form(self::$validated);
     }
 }