Initial Commit N° : 001 - V.4.3.3

This commit is contained in:
2025-03-28 14:32:57 +01:00
commit 238e5d7999
809 changed files with 371149 additions and 0 deletions
+185
View File
@@ -0,0 +1,185 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
?>
<div id="dokan-seller-listing-wrap" class="grid-view">
<div class="seller-listing-content">
<?php if (!empty($sellers['users'])) : ?>
<ul class="dokan-seller-wrap nasa-flex flex-wrap align-start nasa-style style-grid-1">
<?php
foreach ($sellers['users'] as $seller) :
$vendor = dokan()->vendor->get($seller->ID);
$store_name = $vendor->get_shop_name();
$store_url = $vendor->get_shop_url();
$store_rating = $vendor->get_rating();
$is_store_featured = $vendor->is_featured();
$store_phone = $vendor->get_phone();
$store_info = dokan_get_store_info($seller->ID);
$store_address = dokan_get_seller_short_address($seller->ID);
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_is_on = ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled && !$is_store_featured) ? ' store_open_is_on' : '';
$store_banner_id = $vendor->get_banner_id();
$store_banner = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size) : false;
$store_banner_src = $store_banner && is_array($store_banner) ? esc_url($store_banner[0]) : false;
$products = elessi_dokan_products_from_seller($seller->ID, 4);
?>
<li class="dokan-single-seller woocommerce nasa-flex coloum-<?php echo esc_attr($per_row); ?><?php echo (!$store_banner_id ) ? ' no-banner-img' : ''; ?>">
<div class="store-wrapper">
<?php
/**
* Banner store
*/
echo $store_banner_src ? '<div class="store-banner" style="background-image:url(' . $store_banner_src . '); background-position: center center; background-repeat: no-repeat; background-size:cover;"></div>' : '';
?>
<div class="store-content<?php echo !$store_banner_id ? ' ' . esc_attr('default-store-banner') : '' ?>">
<div class="store-data-container">
<!-- Badges -->
<div class="featured-favourite">
<?php if ($is_store_featured) : ?>
<div class="featured-label"><?php esc_html_e('Featured', 'elessi-theme'); ?></div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_featured', $seller, $store_info); ?>
</div>
<?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
<!-- Open | Closed -->
<?php if (dokan_is_store_open($seller->ID)) : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'elessi-theme'); ?>"><?php esc_html_e('Open', 'elessi-theme'); ?></span>
<?php else : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'elessi-theme'); ?>"><?php esc_html_e('Closed', 'elessi-theme'); ?></span>
<?php endif; ?>
<?php endif; ?>
<div class="store-data<?php echo esc_attr($store_open_is_on); ?>">
<!-- Store Avatar -->
<div class="seller-avatar">
<a href="<?php echo esc_url($store_url); ?>">
<img src="<?php echo esc_url($vendor->get_avatar()); ?>" alt="<?php echo esc_attr($vendor->get_shop_name()); ?>" width="68" height="68" />
</a>
</div>
<!-- Store Name -->
<h2>
<a href="<?php echo esc_attr($store_url); ?>"><?php echo esc_html($store_name); ?></a> <?php apply_filters('dokan_store_list_loop_after_store_name', $vendor); ?>
</h2>
<?php if (!empty($store_rating['count'])) : ?>
<!-- Store Rating -->
<div class="dokan-seller-rating" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('address') && $store_address) : ?>
<?php
$allowed_tags = array(
'span' => array(
'class' => array(),
),
'br' => array()
);
?>
<!-- Store Address -->
<p class="store-address"><?php echo wp_kses($store_address, $allowed_tags); ?></p>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('phone') && $store_phone) : ?>
<!-- Store Phone -->
<p class="store-phone">
<i class="fa fa-phone"></i> <?php echo esc_html($store_phone); ?>
</p>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_store_data', $seller, $store_info); ?>
</div>
</div>
</div>
<?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
</div>
<?php if ($products->have_posts()) : ?>
<!-- Seller Products -->
<div class="seller-products">
<div class="wrap-items nasa-flex">
<?php while ($products->have_posts()) :
$products->the_post();
global $product;
if (empty($product) || !$product->is_visible()) :
continue;
endif;
?>
<a class="seller-product" href="<?php echo esc_url($product->get_permalink()); ?>" title="<?php echo esc_attr($product->get_name()); ?>">
<?php echo $product->get_image('thumbnail'); ?>
</a>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul> <!-- .dokan-seller-wrap -->
<div class="dokan-clearfix"></div>
<?php
$user_count = $sellers['count'];
$num_of_pages = ceil($user_count / $limit);
if ($num_of_pages > 1) :
echo '<div class="pagination-container clearfix">';
$pagination_args = array(
'current' => $paged,
'total' => $num_of_pages,
'base' => $pagination_base,
'type' => 'array',
'prev_text' => __('&larr; Previous', 'elessi-theme'),
'next_text' => __('Next &rarr;', 'elessi-theme'),
);
if (!empty($search_query)) :
$pagination_args['add_args'] = array(
'dokan_seller_search' => $search_query,
);
endif;
$page_links = paginate_links($pagination_args);
if ($page_links) :
$pagination_links = '<div class="pagination-wrap">';
$pagination_links .= '<ul class="pagination"><li>';
$pagination_links .= join("</li>\n\t<li>", $page_links);
$pagination_links .= "</li>\n</ul>\n";
$pagination_links .= '</div>';
echo $pagination_links; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
endif;
echo '</div>';
endif;
?>
<?php else : ?>
<p class="dokan-error"><?php esc_html_e('No vendor found!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div>
+171
View File
@@ -0,0 +1,171 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
?>
<div id="dokan-seller-listing-wrap" class="grid-view <?php echo 'grid-' . esc_attr($per_row) . '-cols'; ?>">
<div class="seller-listing-content">
<?php if (!empty($sellers['users'])) : ?>
<ul class="dokan-seller-wrap nasa-flex flex-wrap align-start nasa-style style-grid-2">
<?php
foreach ($sellers['users'] as $seller) :
$vendor = dokan()->vendor->get($seller->ID);
$store_name = $vendor->get_shop_name();
$store_url = $vendor->get_shop_url();
$store_rating = $vendor->get_rating();
$is_store_featured = $vendor->is_featured();
$store_phone = $vendor->get_phone();
$store_info = dokan_get_store_info($seller->ID);
$store_address = dokan_get_seller_short_address($seller->ID);
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_is_on = ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled && !$is_store_featured) ? ' store_open_is_on' : '';
$store_banner_id = $vendor->get_banner_id();
$store_banner = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size) : false;
$store_banner_src = $store_banner && is_array($store_banner) ? esc_url($store_banner[0]) : false;
// $store_banner_src = false;
$products = elessi_dokan_products_from_seller($seller->ID, 2);
?>
<li class="dokan-single-seller woocommerce coloum-<?php echo esc_attr($per_row); ?><?php echo (!$store_banner_id ) ? ' no-banner-img' : ''; ?>">
<div class="nasa-flex align-stretch">
<div class="store-banner-wrap nasa-relative">
<?php
/**
* Banner store
*/
echo $store_banner_src ? '<div class="store-banner" style="background-image:url(' . $store_banner_src . '); background-position: center center; background-repeat: no-repeat; background-size:cover;"></div>' : '';
?>
<?php /* !-- Badges -->
<div class="featured-favourite">
<?php if ($is_store_featured) : ?>
<div class="featured-label"><?php esc_html_e('Featured', 'elessi-theme'); ?></div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_featured', $seller, $store_info); ?>
</div>
<?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
<!-- Open | Closed -->
<?php if (dokan_is_store_open($seller->ID)) : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'elessi-theme'); ?>"><?php esc_html_e('Open', 'elessi-theme'); ?></span>
<?php else : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'elessi-theme'); ?>"><?php esc_html_e('Closed', 'elessi-theme'); ?></span>
<?php endif; ?>
<?php endif; */ ?>
</div>
<?php if ($products->have_posts()) : ?>
<!-- Seller Products -->
<div class="seller-products">
<div class="wrap-items nasa-flex">
<?php while ($products->have_posts()) :
$products->the_post();
global $product;
if (empty($product) || !$product->is_visible()) :
continue;
endif;
?>
<a class="seller-product" href="<?php echo esc_url($product->get_permalink()); ?>" title="<?php echo esc_attr($product->get_name()); ?>">
<?php echo $product->get_image('thumbnail'); ?>
</a>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="store-wrapper">
<div class="store-content<?php echo !$store_banner_id ? ' ' . esc_attr('default-store-banner') : '' ?>">
<div class="store-data-container">
<div class="store-data<?php echo esc_attr($store_open_is_on); ?>">
<!-- Store Avatar -->
<div class="seller-avatar">
<a href="<?php echo esc_url($store_url); ?>">
<img src="<?php echo esc_url($vendor->get_avatar()); ?>" alt="<?php echo esc_attr($vendor->get_shop_name()); ?>" width="68" height="68" />
</a>
</div>
<!-- Store Name -->
<h2>
<a href="<?php echo esc_attr($store_url); ?>"><?php echo esc_html($store_name); ?></a> <?php apply_filters('dokan_store_list_loop_after_store_name', $vendor); ?>
</h2>
<?php if (!empty($store_rating['count'])) : ?>
<!-- Store Rating -->
<div class="dokan-seller-rating" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_store_data', $seller, $store_info); ?>
</div>
</div>
</div>
<?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
</div>
</li>
<?php endforeach; ?>
</ul> <!-- .dokan-seller-wrap -->
<div class="dokan-clearfix"></div>
<?php
$user_count = $sellers['count'];
$num_of_pages = ceil($user_count / $limit);
if ($num_of_pages > 1) :
echo '<div class="pagination-container clearfix">';
$pagination_args = array(
'current' => $paged,
'total' => $num_of_pages,
'base' => $pagination_base,
'type' => 'array',
'prev_text' => __('&larr; Previous', 'elessi-theme'),
'next_text' => __('Next &rarr;', 'elessi-theme'),
);
if (!empty($search_query)) :
$pagination_args['add_args'] = array(
'dokan_seller_search' => $search_query,
);
endif;
$page_links = paginate_links($pagination_args);
if ($page_links) :
$pagination_links = '<div class="pagination-wrap">';
$pagination_links .= '<ul class="pagination"><li>';
$pagination_links .= join("</li>\n\t<li>", $page_links);
$pagination_links .= "</li>\n</ul>\n";
$pagination_links .= '</div>';
echo $pagination_links; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
endif;
echo '</div>';
endif;
?>
<?php else : ?>
<p class="dokan-error"><?php esc_html_e('No vendor found!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div>
+187
View File
@@ -0,0 +1,187 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
?>
<div id="dokan-seller-listing-wrap" class="grid-view">
<div class="seller-listing-content">
<?php if (!empty($sellers['users'])) : ?>
<ul class="dokan-seller-wrap nasa-flex flex-column nasa-style style-list-1">
<?php
foreach ($sellers['users'] as $seller) :
$vendor = dokan()->vendor->get($seller->ID);
$store_name = $vendor->get_shop_name();
$store_url = $vendor->get_shop_url();
$store_rating = $vendor->get_rating();
$is_store_featured = $vendor->is_featured();
$store_phone = $vendor->get_phone();
$store_info = dokan_get_store_info($seller->ID);
$store_address = dokan_get_seller_short_address($seller->ID);
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_is_on = ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled && !$is_store_featured) ? ' store_open_is_on' : '';
// $store_banner_id = $vendor->get_banner_id();
// $store_banner = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size) : false;
// $store_banner_src = $store_banner && is_array($store_banner) ? esc_url($store_banner[0]) : false;
$products = elessi_dokan_products_from_seller($seller->ID, 3);
?>
<li class="dokan-single-seller woocommerce">
<div class="nasa-flex single-seller-wrap">
<div class="store-wrapper">
<div class="store-content">
<div class="store-data-container">
<div class="store-data<?php echo esc_attr($store_open_is_on); ?>">
<div class="nasa-flex">
<!-- Store Avatar -->
<div class="seller-avatar">
<a href="<?php echo esc_url($store_url); ?>">
<img src="<?php echo esc_url($vendor->get_avatar()); ?>" alt="<?php echo esc_attr($vendor->get_shop_name()); ?>" width="68" height="68" />
</a>
</div>
<div class="seller-info margin-left-20 rtl-margin-left-0 rtl-margin-right-20">
<!-- Store Name -->
<h2>
<a href="<?php echo esc_attr($store_url); ?>"><?php echo esc_html($store_name); ?></a> <?php apply_filters('dokan_store_list_loop_after_store_name', $vendor); ?>
</h2>
<?php if (!empty($store_rating['count'])) : ?>
<!-- Store Rating -->
<div class="dokan-seller-rating" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('address') && $store_address) : ?>
<?php
$allowed_tags = array(
'span' => array(
'class' => array(),
),
'br' => array()
);
?>
<!-- Store Address -->
<p class="store-address"><?php echo wp_kses($store_address, $allowed_tags); ?></p>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('phone') && $store_phone) : ?>
<!-- Store Phone -->
<p class="store-phone">
<i class="fa fa-phone"></i> <?php echo esc_html($store_phone); ?>
</p>
<?php endif; ?>
</div>
</div>
<?php do_action('dokan_seller_listing_after_store_data', $seller, $store_info); ?>
</div>
</div>
</div>
<?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
</div>
<!-- Badges -->
<div class="nasa-dokan-badges hide-for-small">
<div class="featured-favourite">
<?php if ($is_store_featured) : ?>
<div class="featured-label"><?php esc_html_e('Featured', 'elessi-theme'); ?></div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_featured', $seller, $store_info); ?>
</div>
<?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
<!-- Open | Closed -->
<?php if (dokan_is_store_open($seller->ID)) : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'elessi-theme'); ?>"><?php esc_html_e('Open', 'elessi-theme'); ?></span>
<?php else : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'elessi-theme'); ?>"><?php esc_html_e('Closed', 'elessi-theme'); ?></span>
<?php endif; ?>
<?php endif; ?>
</div>
<?php if ($products->have_posts()) : ?>
<!-- Seller Products -->
<div class="seller-products">
<div class="wrap-items nasa-flex">
<?php while ($products->have_posts()) :
$products->the_post();
global $product;
if (empty($product) || !$product->is_visible()) :
continue;
endif;
?>
<a class="seller-product" href="<?php echo esc_url($product->get_permalink()); ?>" title="<?php echo esc_attr($product->get_name()); ?>">
<?php echo $product->get_image(); ?>
</a>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php endif; ?>
</div>
</li>
<?php endforeach; ?>
</ul> <!-- .dokan-seller-wrap -->
<div class="dokan-clearfix"></div>
<?php
$user_count = $sellers['count'];
$num_of_pages = ceil($user_count / $limit);
if ($num_of_pages > 1) :
echo '<div class="pagination-container clearfix">';
$pagination_args = array(
'current' => $paged,
'total' => $num_of_pages,
'base' => $pagination_base,
'type' => 'array',
'prev_text' => __('&larr; Previous', 'elessi-theme'),
'next_text' => __('Next &rarr;', 'elessi-theme'),
);
if (!empty($search_query)) :
$pagination_args['add_args'] = array(
'dokan_seller_search' => $search_query,
);
endif;
$page_links = paginate_links($pagination_args);
if ($page_links) :
$pagination_links = '<div class="pagination-wrap">';
$pagination_links .= '<ul class="pagination"><li>';
$pagination_links .= join("</li>\n\t<li>", $page_links);
$pagination_links .= "</li>\n</ul>\n";
$pagination_links .= '</div>';
echo $pagination_links; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
endif;
echo '</div>';
endif;
?>
<?php else : ?>
<p class="dokan-error"><?php esc_html_e('No vendor found!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div>
+181
View File
@@ -0,0 +1,181 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
?>
<div id="dokan-seller-listing-wrap" class="grid-view">
<div class="seller-listing-content">
<?php if (!empty($sellers['users'])) : ?>
<ul class="dokan-seller-wrap nasa-flex flex-column nasa-style style-list-2">
<?php
foreach ($sellers['users'] as $seller) :
$vendor = dokan()->vendor->get($seller->ID);
$store_name = $vendor->get_shop_name();
$store_url = $vendor->get_shop_url();
$store_rating = $vendor->get_rating();
$is_store_featured = $vendor->is_featured();
$store_phone = $vendor->get_phone();
$store_info = dokan_get_store_info($seller->ID);
$store_address = dokan_get_seller_short_address($seller->ID);
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_is_on = ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled && !$is_store_featured) ? ' store_open_is_on' : '';
$products = elessi_dokan_products_from_seller($seller->ID, 3);
?>
<li class="dokan-single-seller woocommerce">
<div class="nasa-flex align-start single-seller-wrap">
<div class="store-wrapper">
<div class="store-content">
<div class="store-data-container">
<?php /* !-- Badges -->
<div class="nasa-dokan-badges hide-for-small">
<div class="featured-favourite">
<?php if ($is_store_featured) : ?>
<div class="featured-label"><?php esc_html_e('Featured', 'elessi-theme'); ?></div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_featured', $seller, $store_info); ?>
</div>
<?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
<!-- Open | Closed -->
<?php if (dokan_is_store_open($seller->ID)) : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'elessi-theme'); ?>"><?php esc_html_e('Open', 'elessi-theme'); ?></span>
<?php else : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'elessi-theme'); ?>"><?php esc_html_e('Closed', 'elessi-theme'); ?></span>
<?php endif; ?>
<?php endif; ?>
</div*/ ?>
<div class="store-data-wrap">
<div class="store-data<?php echo esc_attr($store_open_is_on); ?>">
<!-- Store Avatar -->
<div class="seller-avatar">
<a href="<?php echo esc_url($store_url); ?>">
<img src="<?php echo esc_url($vendor->get_avatar()); ?>" alt="<?php echo esc_attr($vendor->get_shop_name()); ?>" width="68" height="68" />
</a>
</div>
<!-- Store Name -->
<h2>
<a href="<?php echo esc_attr($store_url); ?>"><?php echo esc_html($store_name); ?></a> <?php apply_filters('dokan_store_list_loop_after_store_name', $vendor); ?>
</h2>
<?php if (!empty($store_rating['count'])) : ?>
<!-- Store Rating -->
<div class="dokan-seller-rating" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('address') && $store_address) : ?>
<?php
$allowed_tags = array(
'span' => array(
'class' => array(),
),
'br' => array()
);
?>
<!-- Store Address -->
<p class="store-address"><?php echo wp_kses($store_address, $allowed_tags); ?></p>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('phone') && $store_phone) : ?>
<!-- Store Phone -->
<p class="store-phone">
<i class="fa fa-phone"></i> <?php echo esc_html($store_phone); ?>
</p>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_store_data', $seller, $store_info); ?>
</div>
</div>
</div>
</div>
<?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
</div>
<?php if ($products->have_posts()) : ?>
<!-- Seller Products -->
<div class="seller-products">
<div class="wrap-items nasa-flex">
<?php while ($products->have_posts()) :
$products->the_post();
global $product;
if (empty($product) || !$product->is_visible()) :
continue;
endif;
?>
<a class="seller-product" href="<?php echo esc_url($product->get_permalink()); ?>" title="<?php echo esc_attr($product->get_name()); ?>">
<?php echo $product->get_image(); ?>
</a>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php endif; ?>
</div>
</li>
<?php endforeach; ?>
</ul> <!-- .dokan-seller-wrap -->
<div class="dokan-clearfix"></div>
<?php
$user_count = $sellers['count'];
$num_of_pages = ceil($user_count / $limit);
if ($num_of_pages > 1) :
echo '<div class="pagination-container clearfix">';
$pagination_args = array(
'current' => $paged,
'total' => $num_of_pages,
'base' => $pagination_base,
'type' => 'array',
'prev_text' => __('&larr; Previous', 'elessi-theme'),
'next_text' => __('Next &rarr;', 'elessi-theme'),
);
if (!empty($search_query)) :
$pagination_args['add_args'] = array(
'dokan_seller_search' => $search_query,
);
endif;
$page_links = paginate_links($pagination_args);
if ($page_links) :
$pagination_links = '<div class="pagination-wrap">';
$pagination_links .= '<ul class="pagination"><li>';
$pagination_links .= join("</li>\n\t<li>", $page_links);
$pagination_links .= "</li>\n</ul>\n";
$pagination_links .= '</div>';
echo $pagination_links; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
endif;
echo '</div>';
endif;
?>
<?php else : ?>
<p class="dokan-error"><?php esc_html_e('No vendor found!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div>
+207
View File
@@ -0,0 +1,207 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
?>
<div id="dokan-seller-listing-wrap" class="grid-view">
<div class="seller-listing-content">
<?php if (!empty($sellers['users'])) : ?>
<ul class="dokan-seller-wrap nasa-flex flex-column nasa-style style-list-3">
<?php
foreach ($sellers['users'] as $seller) :
$vendor = dokan()->vendor->get($seller->ID);
$store_name = $vendor->get_shop_name();
$store_url = $vendor->get_shop_url();
$store_rating = $vendor->get_rating();
$is_store_featured = $vendor->is_featured();
$store_phone = $vendor->get_phone();
$store_info = dokan_get_store_info($seller->ID);
$store_address = dokan_get_seller_short_address($seller->ID);
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_is_on = ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled && !$is_store_featured) ? ' store_open_is_on' : '';
// $store_banner_id = $vendor->get_banner_id();
// $store_banner = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size) : false;
// $store_banner_src = $store_banner && is_array($store_banner) ? esc_url($store_banner[0]) : false;
$products = elessi_dokan_products_from_seller($seller->ID, 4);
?>
<li class="dokan-single-seller woocommerce">
<div class="nasa-flex single-seller-wrap">
<div class="store-wrapper">
<div class="store-content">
<div class="store-data-container">
<?php /*!-- Badges -->
<div class="nasa-dokan-badges hide-for-small">
<div class="featured-favourite">
<?php if ($is_store_featured) : ?>
<div class="featured-label"><?php esc_html_e('Featured', 'elessi-theme'); ?></div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_featured', $seller, $store_info); ?>
</div>
<?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
<!-- Open | Closed -->
<?php if (dokan_is_store_open($seller->ID)) : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'elessi-theme'); ?>"><?php esc_html_e('Open', 'elessi-theme'); ?></span>
<?php else : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'elessi-theme'); ?>"><?php esc_html_e('Closed', 'elessi-theme'); ?></span>
<?php endif; ?>
<?php endif; ?>
</div */?>
<div class="store-data<?php echo esc_attr($store_open_is_on); ?>">
<div class="nasa-flex">
<!-- Store Avatar -->
<div class="seller-avatar">
<a href="<?php echo esc_url($store_url); ?>">
<img src="<?php echo esc_url($vendor->get_avatar()); ?>" alt="<?php echo esc_attr($vendor->get_shop_name()); ?>" width="68" height="68" />
</a>
</div>
<div class="seller-info margin-left-20 rtl-margin-left-0 rtl-margin-right-20">
<!-- Store Name -->
<h2>
<a href="<?php echo esc_attr($store_url); ?>"><?php echo esc_html($store_name); ?></a> <?php apply_filters('dokan_store_list_loop_after_store_name', $vendor); ?>
</h2>
<?php if (!empty($store_rating['count'])) : ?>
<!-- Store Rating -->
<div class="dokan-seller-rating hide-for-desktop" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('address') && $store_address) : ?>
<?php
$allowed_tags = array(
'span' => array(
'class' => array(),
),
'br' => array()
);
?>
<!-- Store Address -->
<p class="store-address"><?php echo wp_kses($store_address, $allowed_tags); ?></p>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('phone') && $store_phone) : ?>
<!-- Store Phone -->
<p class="store-phone">
<i class="fa fa-phone"></i> <?php echo esc_html($store_phone); ?>
</p>
<?php endif; ?>
</div>
</div>
<?php do_action('dokan_seller_listing_after_store_data', $seller, $store_info); ?>
</div>
</div>
</div>
<?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
</div>
<?php if (!empty($store_rating['count'])) : ?>
<!-- Store Rating -->
<div class="dokan-seller-rating" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php if ($products->have_posts()) : ?>
<!-- Seller Products -->
<div class="seller-products">
<div class="wrap-items nasa-flex align-stretch">
<?php
$count = 0;
while ($products->have_posts()) :
$products->the_post();
global $product;
if (empty($product) || !$product->is_visible()) :
continue;
endif;
$count++;
?>
<a class="seller-product" href="<?php echo esc_url($product->get_permalink()); ?>" title="<?php echo esc_attr($product->get_name()); ?>">
<?php echo $product->get_image('thumbnail'); ?>
</a>
<?php endwhile; ?>
<?php if ($count >= 4) : ?>
<a class="seller-product more hide-for-small nasa-flex jc" href="<?php echo esc_url($store_url); ?>">
<i class="nasa-icon icon-nasa-icons-plus"></i>
</a>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php endif; ?>
</div>
</li>
<?php endforeach; ?>
</ul> <!-- .dokan-seller-wrap -->
<div class="dokan-clearfix"></div>
<?php
$user_count = $sellers['count'];
$num_of_pages = ceil($user_count / $limit);
if ($num_of_pages > 1) :
echo '<div class="pagination-container clearfix">';
$pagination_args = array(
'current' => $paged,
'total' => $num_of_pages,
'base' => $pagination_base,
'type' => 'array',
'prev_text' => __('&larr; Previous', 'elessi-theme'),
'next_text' => __('Next &rarr;', 'elessi-theme'),
);
if (!empty($search_query)) :
$pagination_args['add_args'] = array(
'dokan_seller_search' => $search_query,
);
endif;
$page_links = paginate_links($pagination_args);
if ($page_links) :
$pagination_links = '<div class="pagination-wrap">';
$pagination_links .= '<ul class="pagination"><li>';
$pagination_links .= join("</li>\n\t<li>", $page_links);
$pagination_links .= "</li>\n</ul>\n";
$pagination_links .= '</div>';
echo $pagination_links; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
endif;
echo '</div>';
endif;
?>
<?php else : ?>
<p class="dokan-error"><?php esc_html_e('No vendor found!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div>
+97
View File
@@ -0,0 +1,97 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
global $post;
$pagination_base = empty($post) ? '' : str_replace($post->ID, '%#%', esc_url(get_pagenum_link($post->ID)));
$get_data = wp_unslash($_GET);
$search_query = null;
if ('yes' === $search) {
$search_query = isset($get_data['dokan_seller_search']) ? sanitize_text_field($get_data['dokan_seller_search']) : '';
}
if (apply_filters('dokan_store_lists_filter', true)) {
echo '<div class="nasa-store-lists-filters">';
/**
* Hooks: dokan_store_lists_filter_form
*
* @since 2.9.30
*
* @hooked \WeDevs\Dokan\Vendor\StoreListsFilter::filter_area() - 10
*/
do_action('dokan_store_lists_filter_form', $sellers);
add_filter('dokan_show_seller_search', '__return_false');
echo '</div>';
}
/**
* Filter to toggle seller search form
*
* @since 2.8.6
*
* @var bool $show_form
*/
$show_seller_search = apply_filters('dokan_show_seller_search', true);
if ($show_seller_search) {
$args = array(
'search_query' => $search_query,
'pagination_base' => $pagination_base,
'per_row' => $per_row,
);
dokan_get_template_part('seller-search-form', false, $args);
}
/**
* Added extra search field after store listing search
*
* `dokan_after_seller_listing_serach_form` - action
*
* @since 2.5.7
*
* @param array|object $sellers
*/
do_action('dokan_after_seller_listing_serach_form', $sellers);
/**
* Action hook before starting seller listing loop
*
* @since 2.8.6
*
* @var array $sellers
*/
do_action('dokan_before_seller_listing_loop', $sellers);
$template_args = array(
'sellers' => $sellers,
'limit' => $limit,
'offset' => $offset,
'paged' => $paged,
'search_query' => $search_query,
'pagination_base' => $pagination_base,
'per_row' => $per_row,
'search_enabled' => $search,
'image_size' => $image_size,
'layout' => $layout,
);
dokan_get_template_part('nasa-store-lists-loop-' . $layout, false, $template_args);
/**
* Action hook after finishing seller listing loop
*
* @since 2.8.6
*
* @var array $sellers
*/
do_action('dokan_after_seller_listing_loop', $sellers);
+255
View File
@@ -0,0 +1,255 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
global $nasa_opt;
$dokan_appearance = get_option('dokan_appearance');
if (!isset($nasa_opt['dokan_header']) || $nasa_opt['dokan_header'] == '') :
$profile_layout = empty($dokan_appearance['store_header_template']) ? 'default' : $dokan_appearance['store_header_template'];
else:
$profile_layout = $nasa_opt['dokan_header'];
endif;
$layout = get_theme_mod('store_layout', 'left');
if ($layout === 'no' && $profile_layout == 'ns-1') :
$profile_layout = 'default';
endif;
$store_user = dokan()->vendor->get(get_query_var('author'));
$store_info = $store_user->get_shop_info();
$social_info = $store_user->get_social_profiles();
$store_tabs = dokan_get_store_tabs($store_user->get_id());
$social_fields = dokan_get_social_profile_fields();
$dokan_store_times = !empty($store_info['dokan_store_time']) ? $store_info['dokan_store_time'] : [];
$current_time = dokan_current_datetime();
$today = strtolower($current_time->format('l'));
$store_address = dokan_get_seller_short_address($store_user->get_id(), false);
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_notice = isset($store_info['dokan_store_open_notice']) && !empty($store_info['dokan_store_open_notice']) ? $store_info['dokan_store_open_notice'] : __('Store Open', 'elessi-theme');
$store_closed_notice = isset($store_info['dokan_store_close_notice']) && !empty($store_info['dokan_store_close_notice']) ? $store_info['dokan_store_close_notice'] : __('Store Closed', 'elessi-theme');
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$general_settings = get_option('dokan_general', array());
$banner_width = dokan_get_vendor_store_banner_width();
$banner_src = !in_array($profile_layout, array('layout3', 'ns-1')) ? $store_user->get_banner() : false;
$profile_class = 'profile-info-box profile-layout-' . $profile_layout;
$profile_img_class = 'profile-img-circle';
if (in_array($profile_layout, array('layout1', 'layout3'))) :
$profile_img_class = 'profile-img-square';
endif;
if ('layout3' === $profile_layout) :
unset($store_info['banner']);
$no_banner_class = ' profile-frame-no-banner';
$no_banner_class_tabs = ' dokan-store-tabs-no-banner';
else :
$no_banner_class = '';
$no_banner_class_tabs = '';
endif;
$style = '';
if (in_array($profile_layout, array('ns-2', 'ns-3', 'ns-4'))) :
if ($banner_src) :
$style = ' style="background-image:url(' . esc_url($banner_src) . '); background-position: center center; background-repeat: no-repeat; background-size:cover;"';
$profile_class .= ' has-bgimg';
endif;
$banner_src = false;
endif;
?>
<div class="dokan-profile-frame-wrapper wrap-<?php echo esc_attr($profile_layout); ?>">
<div class="profile-frame<?php echo esc_attr($no_banner_class); ?>">
<div class="<?php echo esc_attr($profile_class); ?>"<?php echo $style; ?>>
<?php if ($banner_src) : ?>
<img src="<?php echo esc_url($banner_src); ?>"
alt="<?php echo esc_attr($store_user->get_shop_name()); ?>"
title="<?php echo esc_attr($store_user->get_shop_name()); ?>"
class="profile-info-img" />
<?php elseif (!in_array($profile_layout, array('ns-1', 'ns-2', 'ns-3'))) : ?>
<div class="profile-info-img dummy-image">&nbsp;</div>
<?php endif; ?>
<div class="profile-info-summery-wrapper dokan-clearfix">
<div class="profile-info-summery">
<div class="profile-info-head">
<div class="profile-img <?php echo esc_attr($profile_img_class); ?>">
<img src="<?php echo esc_url($store_user->get_avatar()) ?>"
alt="<?php echo esc_attr($store_user->get_shop_name()) ?>"
size="150" />
</div>
<?php if (in_array($profile_layout, array('default', 'ns-2')) && !empty($store_user->get_shop_name())) : ?>
<h1 class="store-name">
<?php echo esc_html($store_user->get_shop_name()); ?> <?php apply_filters('dokan_store_header_after_store_name', $store_user); ?>
</h1>
<?php endif; ?>
<?php if (in_array($profile_layout, array('ns-2'))) : ?>
<div class="dokan-store-rating">
<i class="fas fa-star"></i>
<?php echo wp_kses_post(dokan_get_readable_seller_rating($store_user->get_id())); ?>
</div>
<?php endif; ?>
</div>
<div class="profile-info">
<?php if (!in_array($profile_layout, array('default', 'ns-2')) && !empty($store_user->get_shop_name())) : ?>
<h1 class="store-name"><?php echo esc_html($store_user->get_shop_name()); ?></h1>
<?php endif; ?>
<ul class="dokan-store-info">
<?php if (!dokan_is_vendor_info_hidden('address') && isset($store_address) && !empty($store_address)) : ?>
<li class="dokan-store-address"><i class="fas fa-map-marker-alt"></i>
<?php echo wp_kses_post($store_address); ?>
</li>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('phone') && !empty($store_user->get_phone())) : ?>
<li class="dokan-store-phone">
<i class="fas fa-mobile-alt"></i>
<a href="tel:<?php echo esc_html($store_user->get_phone()); ?>"><?php echo esc_html($store_user->get_phone()); ?></a>
</li>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('email') && $store_user->show_email() == 'yes') : ?>
<li class="dokan-store-email">
<i class="far fa-envelope"></i>
<a href="mailto:<?php echo esc_attr(antispambot($store_user->get_email())); ?>"><?php echo esc_attr(antispambot($store_user->get_email())); ?></a>
</li>
<?php endif; ?>
<?php if (!in_array($profile_layout, array('ns-2'))) : ?>
<li class="dokan-store-rating">
<i class="fas fa-star"></i>
<?php echo wp_kses_post(dokan_get_readable_seller_rating($store_user->get_id())); ?>
</li>
<?php endif; ?>
<?php if ($show_store_open_close == 'on' && $dokan_store_time_enabled == 'yes') : ?>
<li class="dokan-store-open-close">
<i class="fas fa-shopping-cart"></i>
<div class="store-open-close-notice">
<?php if (dokan_is_store_open($store_user->get_id())) : ?>
<span class='store-notice'><?php echo esc_attr($store_open_notice); ?></span>
<?php else : ?>
<span class='store-notice'><?php echo esc_attr($store_closed_notice); ?></span>
<?php endif; ?>
<span class="fa fa-angle-down"></span>
<div id="vendor-store-times">
<div class="store-times-heading">
<i class="fas fa-calendar-day"></i>
<h4><?php esc_html_e('Weekly Store Timing', 'elessi-theme'); ?></h4>
</div>
<?php
foreach (dokan_get_translated_days() as $day_key => $day) :
$store_info = !empty($dokan_store_times[$day_key]) ? $dokan_store_times[$day_key] : [];
$store_status = !empty($store_info['status']) ? $store_info['status'] : 'close';
?>
<div class="store-time-tags">
<div class="store-days <?php echo $today === $day_key ? 'current_day' : ''; ?>">
<?php echo esc_html($day); ?>
</div>
<div class="store-times">
<?php if ($store_status === 'close') : ?>
<span class="store-close">
<?php esc_html_e('CLOSED', 'elessi-theme'); ?>
</span>
<?php endif; ?>
<?php
// Get store times.
$opening_times = !empty($store_info['opening_time']) ? $store_info['opening_time'] : [];
// If dokan pro doesn't exists then get single item.
if (!dokan()->is_pro_exists()) :
$opening_times = !empty($opening_times) && is_array($opening_times) ? $opening_times[0] : [];
endif;
$times_length = !empty($opening_times) ? count((array) $opening_times) : 0;
// Get formatted times.
for ($index = 0; $index < $times_length; $index++) :
$formatted_opening_time = $current_time->modify($store_info['opening_time'][$index]);
$formatted_closing_time = $current_time->modify($store_info['closing_time'][$index]);
// check if store is open or closed time is valid.
if (empty($formatted_opening_time) || empty($formatted_closing_time)) :
continue;
endif;
$exact_time = '';
if ($today === $day_key && $formatted_opening_time <= $current_time && $formatted_closing_time >= $current_time) :
$exact_time = 'current_time';
endif;
?>
<span class="store-open <?php echo $exact_time; ?>" href="#">
<?php echo esc_html($formatted_opening_time->format(wc_time_format()) . ' - ' . $formatted_closing_time->format(wc_time_format())); ?>
</span>
<?php endfor; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</li>
<?php endif; ?>
<?php do_action('dokan_store_header_info_fields', $store_user->get_id()); ?>
</ul>
<?php if ($social_fields) : ?>
<div class="store-social-wrapper">
<ul class="store-social">
<?php foreach ($social_fields as $key => $field) : ?>
<?php if (!empty($social_info[$key])) : ?>
<li>
<a href="<?php echo esc_url($social_info[$key]); ?>" target="_blank">
<i class="fab fa-<?php echo esc_attr($field['icon']); ?>"></i>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div><!-- .profile-info -->
</div><!-- .profile-info-summery -->
</div><!-- .profile-info-summery-wrapper -->
</div><!-- .profile-info-box -->
</div><!-- .profile-frame -->
<?php if ($store_tabs) : ?>
<div class="dokan-store-tabs<?php echo esc_attr($no_banner_class_tabs); ?>">
<ul class="dokan-list-inline">
<?php foreach ($store_tabs as $key => $tab) : ?>
<?php if ($tab['url']) : ?>
<li>
<a href="<?php echo esc_url($tab['url']); ?>">
<?php echo esc_html($tab['title']); ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php do_action('dokan_after_store_tabs', $store_user->get_id()); ?>
</ul>
</div>
<?php endif; ?>
</div>
+151
View File
@@ -0,0 +1,151 @@
<?php
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
?>
<div id="dokan-seller-listing-wrap" class="grid-view">
<div class="seller-listing-content">
<?php if (!empty($sellers['users'])) : ?>
<ul class="dokan-seller-wrap">
<?php
foreach ($sellers['users'] as $seller) :
$vendor = dokan()->vendor->get($seller->ID);
$store_banner_id = $vendor->get_banner_id();
$store_name = $vendor->get_shop_name();
$store_url = $vendor->get_shop_url();
$store_rating = $vendor->get_rating();
$is_store_featured = $vendor->is_featured();
$store_phone = $vendor->get_phone();
$store_info = dokan_get_store_info($seller->ID);
$store_address = dokan_get_seller_short_address($seller->ID);
$store_banner_url = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size) : DOKAN_PLUGIN_ASSEST . '/images/default-store-banner.png';
$store_banner_src = is_array($store_banner_url) ? esc_url($store_banner_url[0]) : esc_url($store_banner_url);
$show_store_open_close = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
$dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
$store_open_is_on = ( 'on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled && !$is_store_featured ) ? 'store_open_is_on' : '';
$store_banner_style = ' style="background-image:url(' . $store_banner_src . '); background-position: center center; background-repeat: no-repeat; background-size:cover;"';
?>
<li class="dokan-single-seller woocommerce coloum-<?php echo esc_attr($per_row); ?><?php echo (!$store_banner_id) ? ' no-banner-img' : ''; ?>">
<div class="store-wrapper">
<div class="store-header">
<div class="store-banner"<?php echo $store_banner_style; ?>></div>
</div>
<div class="store-content<?php echo !$store_banner_id ? ' ' . esc_attr('default-store-banner') : ''; ?>">
<div class="store-data-container">
<div class="featured-favourite">
<?php if ($is_store_featured) : ?>
<div class="featured-label"><?php esc_html_e('Featured', 'elessi-theme'); ?></div>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_featured', $seller, $store_info); ?>
</div>
<?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
<?php if (dokan_is_store_open($seller->ID)) : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'elessi-theme'); ?>"><?php esc_html_e('Open', 'elessi-theme'); ?></span>
<?php else : ?>
<span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'elessi-theme'); ?>"><?php esc_html_e('Closed', 'elessi-theme'); ?></span>
<?php endif; ?>
<?php endif; ?>
<div class="store-data <?php echo esc_attr($store_open_is_on); ?>">
<h2><a href="<?php echo esc_attr($store_url); ?>"><?php echo esc_html($store_name); ?></a> <?php apply_filters('dokan_store_list_loop_after_store_name', $vendor); ?></h2>
<?php if (!empty($store_rating['count'])) : ?>
<div class="dokan-seller-rating" title="<?php echo sprintf(esc_attr__('Rated %s out of 5', 'elessi-theme'), esc_attr($store_rating['rating'])); ?>">
<?php echo wp_kses_post(dokan_generate_ratings($store_rating['rating'], 5)); ?>
<p class="rating">
<?php echo esc_html(sprintf(__('%s out of 5', 'elessi-theme'), $store_rating['rating'])); ?>
</p>
</div>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('address') && $store_address) : ?>
<?php
$allowed_tags = array(
'span' => array(
'class' => array(),
),
'br' => array()
);
?>
<p class="store-address"><?php echo wp_kses($store_address, $allowed_tags); ?></p>
<?php endif; ?>
<?php if (!dokan_is_vendor_info_hidden('phone') && $store_phone) : ?>
<p class="store-phone">
<i class="fa fa-phone" aria-hidden="true"></i> <?php echo esc_html($store_phone); ?>
</p>
<?php endif; ?>
<?php do_action('dokan_seller_listing_after_store_data', $seller, $store_info); ?>
</div>
</div>
</div>
<div class="store-footer">
<div class="seller-avatar">
<a href="<?php echo esc_url($store_url); ?>">
<img src="<?php echo esc_url($vendor->get_avatar()); ?>" alt="<?php echo esc_attr($vendor->get_shop_name()); ?>" size="150" />
</a>
</div>
<a href="<?php echo esc_url($store_url); ?>" title="<?php esc_attr_e('Visit Store', 'elessi-theme'); ?>">
<span class="dashicons dashicons-arrow-right-alt2 dokan-btn-theme dokan-btn-round"></span>
</a>
<?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
</div>
</div>
</li>
<?php endforeach; ?>
<div class="dokan-clearfix"></div>
</ul> <!-- .dokan-seller-wrap -->
<?php
$user_count = $sellers['count'];
$num_of_pages = ceil($user_count / $limit);
if ($num_of_pages > 1) :
echo '<div class="pagination-container clearfix">';
$pagination_args = array(
'current' => $paged,
'total' => $num_of_pages,
'base' => $pagination_base,
'type' => 'array',
'prev_text' => __('&larr; Previous', 'elessi-theme'),
'next_text' => __('Next &rarr;', 'elessi-theme'),
);
if (!empty($search_query)) :
$pagination_args['add_args'] = array(
'dokan_seller_search' => $search_query,
);
endif;
$page_links = paginate_links($pagination_args);
if ($page_links) :
$pagination_links = '<div class="pagination-wrap">';
$pagination_links .= '<ul class="pagination"><li>';
$pagination_links .= join("</li>\n\t<li>", $page_links);
$pagination_links .= "</li>\n</ul>\n";
$pagination_links .= '</div>';
echo $pagination_links; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
endif;
echo '</div>';
endif;
?>
<?php else: ?>
<p class="dokan-error"><?php esc_html_e('No vendor found!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div>
+130
View File
@@ -0,0 +1,130 @@
<?php
/**
* The Template for displaying all single Store.
*
* @package dokan
* @package dokan - 2014 1.0
*/
if (!defined('ABSPATH')) :
exit; // Exit if accessed directly
endif;
global $nasa_opt;
/**
* Custom Hook
*/
do_action('nasa_before_store_dokan');
$store_user = dokan()->vendor->get(get_query_var('author'));
$store_info = $store_user->get_shop_info();
$map_location = $store_user->get_location();
$layout = get_theme_mod('store_layout', 'left');
$dokan_appearance = get_option('dokan_appearance');
if (!isset($nasa_opt['dokan_header']) || $nasa_opt['dokan_header'] == '') :
$profile_layout = empty($dokan_appearance['store_header_template']) ? 'default' : $dokan_appearance['store_header_template'];
else:
$profile_layout = $nasa_opt['dokan_header'];
endif;
if ($layout === 'no' && $profile_layout == 'ns-1') :
$profile_layout = 'default';
endif;
get_header('shop');
if (function_exists('yoast_breadcrumb')) :
yoast_breadcrumb('<p id="breadcrumbs">', '</p>');
endif;
do_action('woocommerce_before_main_content'); ?>
<?php
if (in_array($profile_layout, array('ns-2', 'ns-3', 'ns-4'))) :
dokan_get_template_part('store-header');
endif;
?>
<div class="dokan-store-wrap layout-<?php echo esc_attr($layout); ?> profile-<?php echo esc_attr($profile_layout); ?>">
<?php if ('left' === $layout) :
if ($profile_layout == 'ns-1') :
echo '<div class="col-left-wrap dokan-col-wrap">';
dokan_get_template_part('store-header');
endif;
dokan_get_template_part('store', 'sidebar', array(
'store_user' => $store_user,
'store_info' => $store_info,
'map_location' => $map_location
));
if ($profile_layout == 'ns-1') :
echo '</div>';
endif;
endif; ?>
<div id="dokan-primary" class="dokan-single-store">
<div id="dokan-content" class="store-page-wrap woocommerce" role="main">
<?php
if (!in_array($profile_layout, array('ns-1', 'ns-2', 'ns-3', 'ns-4'))) :
dokan_get_template_part('store-header');
endif;
?>
<?php do_action('dokan_store_profile_frame_after', $store_user->data, $store_info); ?>
<?php if (have_posts()) : ?>
<div class="seller-items">
<?php woocommerce_product_loop_start(); ?>
<?php while (have_posts()) : the_post(); ?>
<?php wc_get_template_part('content', 'product'); ?>
<?php endwhile; // end of the loop. ?>
<?php woocommerce_product_loop_end(); ?>
</div>
<?php dokan_content_nav('nav-below'); ?>
<?php else : ?>
<p class="dokan-info"><?php esc_html_e('No products were found of this vendor!', 'elessi-theme'); ?></p>
<?php endif; ?>
</div>
</div><!-- .dokan-single-store -->
<?php if ('right' === $layout) :
if ($profile_layout == 'ns-1') :
echo '<div class="col-right-wrap dokan-col-wrap">';
dokan_get_template_part('store-header');
endif;
dokan_get_template_part('store', 'sidebar', array(
'store_user' => $store_user,
'store_info' => $store_info,
'map_location' => $map_location
));
if ($profile_layout == 'ns-1') :
echo '</div>';
endif;
endif; ?>
</div><!-- .dokan-store-wrap -->
<?php do_action('woocommerce_after_main_content'); ?>
<?php
get_footer('shop');