This commit is contained in:
KhaiNguyen
2020-02-13 10:39:37 +07:00
commit 59401cb805
12867 changed files with 4646216 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
get_header();
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
$shop_columns = $shop_sidebar = '';
if (!isset($redux_ThemeTek['tek-woo-shop-columns'])) {
$shop_columns = 'woo-3-columns';
} else {
$shop_columns = $redux_ThemeTek['tek-woo-shop-columns'];
}
if (isset($redux_ThemeTek['tek-woo-sidebar-position'])) {
$shop_sidebar = $redux_ThemeTek['tek-woo-sidebar-position'];
}
?>
<section>
<div class="ShopFiltersWrapper">
<div class="container">
<?php if ( have_posts() ) : ?>
<?php
/**
* woocommerce_before_shop_loop hook.
*
* @hooked woocommerce_output_all_notices - 10
* @hooked woocommerce_result_count - 20
* @hooked woocommerce_catalog_ordering - 30
*/
do_action( 'woocommerce_before_shop_loop' );
?>
</div>
</div>
<div class="container">
<?php if (isset($shop_columns) && isset($shop_sidebar)) : ?>
<?php if ($shop_columns == 'woo-2-columns' && $shop_sidebar == 'woo-sidebar-left') : ?>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="woo-sidebar woo-sidebar-left">
<?php dynamic_sidebar('shop-sidebar'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($shop_columns)) : ?>
<?php if ($shop_columns != 'woo-2-columns') : ?>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 <?php echo esc_attr($shop_columns); ?>">
<?php else : ?>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 woo-2-columns">
<?php endif; ?>
<?php endif; ?>
<?php woocommerce_product_loop_start(); ?>
<?php woocommerce_product_subcategories(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php wc_get_template_part( 'content', 'product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php woocommerce_product_loop_end(); ?>
<?php
/**
* woocommerce_after_shop_loop hook.
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );
?>
<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
<?php wc_get_template( 'loop/no-products-found.php' ); ?>
<?php endif; ?>
</div>
<?php if (isset($shop_columns) && isset($shop_sidebar)) : ?>
<?php if ($shop_columns == 'woo-2-columns' && $shop_sidebar == 'woo-sidebar-right') : ?>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="woo-sidebar woo-sidebar-right">
<?php dynamic_sidebar('shop-sidebar'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</section>
<?php get_footer();

View File

@@ -0,0 +1,69 @@
<?php
/**
* The template for displaying product content within loops
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.6.0
*/
defined( 'ABSPATH' ) || exit;
global $product;
// Ensure visibility.
if ( empty( $product ) || ! $product->is_visible() ) {
return;
}
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
$single_prod_class = '';
if( !isset($redux_ThemeTek['tek-woo-catalog-style']) ) {
$single_prod_class = 'woo-detailed-style';
} else {
$single_prod_class = $redux_ThemeTek['tek-woo-catalog-style'];
}
?>
<li <?php wc_product_class($single_prod_class, $product); ?>>
<?php
/**
* Hook: woocommerce_before_shop_loop_item.
*
* @hooked woocommerce_template_loop_product_link_open - 10
*/
do_action( 'woocommerce_before_shop_loop_item' );
/**
* Hook: woocommerce_before_shop_loop_item_title.
*
* @hooked woocommerce_show_product_loop_sale_flash - 10
* @hooked woocommerce_template_loop_product_thumbnail - 10
*/
do_action( 'woocommerce_before_shop_loop_item_title' );
/**
* Hook: woocommerce_shop_loop_item_title.
*
* @hooked woocommerce_template_loop_product_title - 10
*/
do_action( 'woocommerce_shop_loop_item_title' );
/**
* Hook: woocommerce_after_shop_loop_item_title.
*
* @hooked woocommerce_template_loop_rating - 5
* @hooked woocommerce_template_loop_price - 10
*/
do_action( 'woocommerce_after_shop_loop_item_title' );
/**
* Hook: woocommerce_after_shop_loop_item.
*
* @hooked woocommerce_template_loop_product_link_close - 5
* @hooked woocommerce_template_loop_add_to_cart - 10
*/
do_action( 'woocommerce_after_shop_loop_item' );
?>
</li>

View File

@@ -0,0 +1,77 @@
<?php
/**
* The template for displaying product content in the single-product.php template
*
* This template can be overridden by copying it to yourtheme/woocommerce/content-single-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.6.0
*/
defined( 'ABSPATH' ) || exit;
global $product;
/**
* Hook: woocommerce_before_single_product.
*
* @hooked wc_print_notices - 10
*/
do_action( 'woocommerce_before_single_product' );
if ( post_password_required() ) {
echo get_the_password_form(); // WPCS: XSS ok.
return;
}
?>
<div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
<div class="product-inner-content">
<?php
/**
* Hook: woocommerce_before_single_product_summary.
*
* @hooked woocommerce_show_product_sale_flash - 10
* @hooked woocommerce_show_product_images - 20
*/
do_action( 'woocommerce_before_single_product_summary' );
?>
<div class="summary entry-summary">
<?php
/**
* Hook: woocommerce_single_product_summary.
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40
* @hooked woocommerce_template_single_sharing - 50
* @hooked WC_Structured_Data::generate_product_data() - 60
*/
do_action( 'woocommerce_single_product_summary' );
?>
</div>
</div>
<?php
/**
* Hook: woocommerce_after_single_product_summary.
*
* @hooked woocommerce_output_product_data_tabs - 10
* @hooked woocommerce_upsell_display - 15
* @hooked woocommerce_output_related_products - 20
*/
do_action( 'woocommerce_after_single_product_summary' );
?>
</div>
<?php do_action( 'woocommerce_after_single_product' ); ?>

View File

@@ -0,0 +1,21 @@
<?php
/**
* Loop Price
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $product;
?>
<div class="categories"><?php echo wc_get_product_category_list( $product->get_id() ); ?></div>
<?php if ( $price_html = $product->get_price_html() ) : ?>
<span class="price"><?php echo '<span class="price-wrapper">' . $price_html . '</span>'; ?></span>
<?php endif; ?>

View File

@@ -0,0 +1,84 @@
<?php
/**
* The Template for displaying all single products
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
$single_sidebar = $sidebar_position = $image_position = $gallery_template = $shop_active_widgets = '';
if (isset($redux_ThemeTek['tek-woo-single-sidebar'])) {
$single_sidebar = $redux_ThemeTek['tek-woo-single-sidebar'];
}
$shop_active_widgets = is_active_sidebar( 'shop-sidebar' );
if (!$shop_active_widgets) {
$single_sidebar = 0;
}
if (isset($redux_ThemeTek['tek-woo-single-sidebar-position'])) {
$sidebar_position = $redux_ThemeTek['tek-woo-single-sidebar-position'];
}
if (isset($redux_ThemeTek['tek-woo-single-image-position'])) {
$image_position = $redux_ThemeTek['tek-woo-single-image-position'];
}
if (isset($redux_ThemeTek['tek-woo-single-gallery'])) {
$gallery_template = $redux_ThemeTek['tek-woo-single-gallery'];
}
get_header(); ?>
<div class="container <?php echo esc_attr($image_position); ?> <?php echo esc_attr($gallery_template); ?>" id="product-content">
<?php if (isset($single_sidebar) && ($single_sidebar == '1') && isset($sidebar_position)) : ?>
<?php if ($sidebar_position == 'woo-single-sidebar-left') : ?>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="woo-sidebar">
<?php dynamic_sidebar('shop-sidebar'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($single_sidebar) && ($single_sidebar == '1') && isset($sidebar_position)) : ?>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<?php else : ?>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<?php endif; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php wc_get_template_part( 'content', 'single-product' ); ?>
<?php endwhile; // end of the loop. ?>
</div>
<?php if (isset($single_sidebar) && ($single_sidebar == '1') && isset($sidebar_position)) : ?>
<?php if ($sidebar_position == 'woo-single-sidebar-right') : ?>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="woo-sidebar">
<?php dynamic_sidebar('shop-sidebar'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="kd-shop-related">
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php do_action( 'woocommerce_after_main_content' ); ?>
</div>
</div>
</div>
</div>
<?php get_footer();

View File

@@ -0,0 +1,44 @@
<?php
/**
* Single Product Image
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.5.1
*/
defined( 'ABSPATH' ) || exit;
if ( ! function_exists( 'kd_get_gallery_image_html' ) ) {
return;
}
global $product;
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
$post_thumbnail_id = $product->get_image_id();
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
'woocommerce-product-gallery',
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
'woocommerce-product-gallery--columns-' . absint( $columns ),
'images',
) );
?>
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
<figure class="woocommerce-product-gallery__wrapper">
<?php
if ( $product->get_image_id() ) {
$html = kd_get_gallery_image_html( $post_thumbnail_id, true );
} else {
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'ekko' ) );
$html .= '</div>';
}
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id );
do_action( 'woocommerce_product_thumbnails' );
?>
</figure>
</div>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Single Product Thumbnails
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.5.1
*/
defined( 'ABSPATH' ) || exit;
if ( ! function_exists( 'kd_get_gallery_image_html' ) ) {
return;
}
global $product;
$attachment_ids = $product->get_gallery_image_ids();
if ( $attachment_ids && $product->get_image_id() ) { ?>
<div class="thumbnails">
<?php
foreach ( $attachment_ids as $attachment_id ) {
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', kd_get_gallery_image_html( $attachment_id ), $attachment_id );
}
?>
</div>
<?php } ?>