init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$custom_filter_text = get_theme_mod( 'category_filter_text' );
|
||||
$filter_text = $custom_filter_text ? $custom_filter_text : __( 'Filter', 'woocommerce' );
|
||||
?>
|
||||
<div class="category-filtering container text-center product-filter-row show-for-medium">
|
||||
<a href="#product-sidebar"
|
||||
data-open="#product-sidebar"
|
||||
data-pos="left"
|
||||
class="filter-button uppercase plain">
|
||||
<i class="icon-equalizer"></i>
|
||||
<strong><?php echo $filter_text ?></strong>
|
||||
</a>
|
||||
</div>
|
@@ -0,0 +1,19 @@
|
||||
<div class="shop-page-title product-page-title dark featured-title page-title <?php flatsome_header_title_classes() ?>">
|
||||
|
||||
<div class="page-title-bg fill">
|
||||
<div class="title-bg fill bg-fill" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
|
||||
<div class="title-overlay fill"></div>
|
||||
</div>
|
||||
|
||||
<div class="page-title-inner flex-row container medium-flex-wrap flex-has-center">
|
||||
<div class="flex-col">
|
||||
|
||||
</div>
|
||||
<div class="flex-col flex-center text-center">
|
||||
<?php do_action('flatsome_product_title') ;?>
|
||||
</div>
|
||||
<div class="flex-col flex-right nav-right text-right medium-text-center">
|
||||
<?php do_action('flatsome_product_title_tools') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,17 @@
|
||||
<div class="shop-page-title product-page-title dark page-title featured-title <?php flatsome_header_title_classes() ?>">
|
||||
|
||||
<div class="page-title-bg fill">
|
||||
<div class="title-bg fill bg-fill" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
|
||||
<div class="title-overlay fill"></div>
|
||||
</div>
|
||||
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<?php do_action('flatsome_product_title') ;?>
|
||||
</div>
|
||||
|
||||
<div class="flex-col nav-right medium-text-center">
|
||||
<?php do_action('flatsome_product_title_tools') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,11 @@
|
||||
<div class="page-title shop-page-title product-page-title">
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<?php do_action('flatsome_product_title') ;?>
|
||||
</div>
|
||||
|
||||
<div class="flex-col medium-text-center">
|
||||
<?php do_action('flatsome_product_title_tools') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,69 @@
|
||||
<div class="product-container">
|
||||
|
||||
<div class="product-gallery product-gallery-wide">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col large-12">
|
||||
<div class="product-info">
|
||||
<div class="row">
|
||||
<div class="large-7 col">
|
||||
<div class="entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
flatsome_breadcrumb();
|
||||
woocommerce_template_single_title();
|
||||
woocommerce_template_single_rating();
|
||||
woocommerce_template_single_excerpt();
|
||||
|
||||
if(get_theme_mod('product_info_share', 1)){
|
||||
woocommerce_template_single_sharing();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-5 col">
|
||||
<div class="is-well add-to-cart-wrapper <?php flatsome_product_summary_classes( false, false, true );?>">
|
||||
<?php
|
||||
|
||||
if(!flatsome_option('catalog_mode')){
|
||||
woocommerce_template_single_price();
|
||||
flatsome_before_add_to_cart_html();
|
||||
woocommerce_template_single_add_to_cart();
|
||||
flatsome_after_add_to_cart_html();
|
||||
} else {
|
||||
if(flatsome_option('catalog_mode_prices')){
|
||||
woocommerce_template_single_price();
|
||||
}
|
||||
echo '<div class="catalog-product-text pb relative">';
|
||||
echo do_shortcode(flatsome_option('catalog_mode_product'));
|
||||
echo '</div>';
|
||||
}
|
||||
woocommerce_template_single_meta();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="product-footer" style="margin-top: 30px;">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,72 @@
|
||||
<div class="product-main">
|
||||
<div class="row content-row row-divided row-large">
|
||||
|
||||
<div id="product-sidebar" class="col large-3 hide-for-medium shop-sidebar <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col large-9">
|
||||
<div class="row">
|
||||
<div class="large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="product-info summary entry-summary col col-fit <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="product-footer">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,66 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div id="product-sidebar" class="col large-2 hide-for-medium product-sidebar-small <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col col-fit entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,71 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col col-fit entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="col col-divided large-3 col-first hide-for-medium <?php flatsome_sidebar_classes(); ?>">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,71 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="mfp-hide">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,67 @@
|
||||
<div class="row content-row row-divided row-large row-reverse">
|
||||
<div id="product-sidebar" class="col large-3 hide-for-medium shop-sidebar <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col large-9">
|
||||
<div class="product-main">
|
||||
<div class="row">
|
||||
<div class="large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="product-info summary entry-summary col col-fit <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="product-footer">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,70 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row mb-0 content-row">
|
||||
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col-divided col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="col large-3 hide-for-medium <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,78 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery col large-<?php echo flatsome_option('product_image_width'); ?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
<?php flatsome_sticky_column_open(); ?>
|
||||
<div class="product-stacked-info">
|
||||
<?php if(!get_theme_mod('product_header') && get_theme_mod('product_next_prev_nav',1)) { ?>
|
||||
<div class="product-stacked-next-prev-nav absolute top right hide-for-medium">
|
||||
<?php flatsome_product_next_prev_nav('nav-right'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php flatsome_sticky_column_close(); ?>
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="mfp-hide">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action( 'flatsome_before_product_sidebar' );
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if ( is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar( 'product-sidebar' );
|
||||
} else if ( is_active_sidebar( 'shop-sidebar' ) ) {
|
||||
dynamic_sidebar( 'shop-sidebar' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,67 @@
|
||||
<div class="product-container">
|
||||
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery col large-<?php echo flatsome_option('product_image_width'); ?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="product-sidebar" class="col large-2 hide-for-medium product-sidebar-small">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @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>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* Photoswipe markup
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/photoswipe.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/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Root element of PhotoSwipe. Must have class pswp. -->
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<!-- Background of PhotoSwipe. It's a separate element as animating opacity is faster than rgba(). -->
|
||||
<div class="pswp__bg"></div>
|
||||
|
||||
<!-- Slides wrapper with overflow:hidden. -->
|
||||
<div class="pswp__scroll-wrap">
|
||||
|
||||
<!-- Container that holds slides.
|
||||
PhotoSwipe keeps only 3 of them in the DOM to save memory.
|
||||
Don't modify these 3 pswp__item elements, data is added later on. -->
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
|
||||
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
|
||||
<div class="pswp__top-bar">
|
||||
|
||||
<!-- Controls are self-explanatory. Order can be changed. -->
|
||||
|
||||
<div class="pswp__counter"></div>
|
||||
|
||||
<button class="pswp__button pswp__button--close" aria-label="<?php esc_attr_e( 'Close (Esc)', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--zoom" aria-label="<?php esc_attr_e( 'Zoom in/out', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<div class="pswp__preloader">
|
||||
<div class="loading-spin"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
|
||||
<button class="pswp__button--arrow--left" aria-label="<?php esc_attr_e( 'Previous (arrow left)', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<button class="pswp__button--arrow--right" aria-label="<?php esc_attr_e( 'Next (arrow right)', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Price, including microdata for SEO
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/price.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/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
$classes = array();
|
||||
if($product->is_on_sale()) $classes[] = 'price-on-sale';
|
||||
if(!$product->is_in_stock()) $classes[] = 'price-not-in-stock'; ?>
|
||||
<div class="price-wrapper">
|
||||
<p class="price product-page-price <?php echo implode(' ', $classes); ?>">
|
||||
<?php echo $product->get_price_html(); ?></p>
|
||||
</div>
|
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
global $post, $product;
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
$post_thumbnail = has_post_thumbnail();
|
||||
$thumb_count = count( $attachment_ids );
|
||||
|
||||
if ( $post_thumbnail ) $thumb_count++;
|
||||
|
||||
// Disable thumbnails if there is only one extra image.
|
||||
if ( $post_thumbnail && $thumb_count == 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rtl = 'false';
|
||||
$thumb_cell_align = 'left';
|
||||
|
||||
if ( is_rtl() ) {
|
||||
$rtl = 'true';
|
||||
$thumb_cell_align = 'right';
|
||||
}
|
||||
|
||||
if ( $attachment_ids ) {
|
||||
$loop = 0;
|
||||
$image_size = 'thumbnail';
|
||||
$gallery_class = array( 'product-thumbnails', 'thumbnails' );
|
||||
|
||||
// Check if custom gallery thumbnail size is set and use that.
|
||||
$image_check = wc_get_image_size( 'gallery_thumbnail' );
|
||||
if ( $image_check['width'] !== 100 ) {
|
||||
$image_size = 'gallery_thumbnail';
|
||||
}
|
||||
|
||||
$gallery_thumbnail = wc_get_image_size( apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
|
||||
if ( $thumb_count < 5 ) {
|
||||
$gallery_class[] = 'slider-no-arrows';
|
||||
}
|
||||
|
||||
$gallery_class[] = 'slider row row-small row-slider slider-nav-small small-columns-4';
|
||||
?>
|
||||
<div class="<?php echo implode( ' ', $gallery_class ); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "<?php echo $thumb_cell_align; ?>",
|
||||
"wrapAround": false,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons": true,
|
||||
"asNavFor": ".product-gallery-slider",
|
||||
"percentPosition": true,
|
||||
"imagesLoaded": true,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>,
|
||||
"contain": true
|
||||
}'>
|
||||
<?php
|
||||
|
||||
|
||||
if ( $post_thumbnail ) :
|
||||
?>
|
||||
<div class="col is-nav-selected first">
|
||||
<a>
|
||||
<?php
|
||||
$image_id = get_post_thumbnail_id( $post->ID );
|
||||
$image = wp_get_attachment_image_src( $image_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
$image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="' . $image[0] . '" alt="' . $image_alt . '" width="' . $gallery_thumbnail['width'] . '" height="' . $gallery_thumbnail['height'] . '" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo $image;
|
||||
?>
|
||||
</a>
|
||||
</div><?php
|
||||
endif;
|
||||
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
|
||||
$classes = array( '' );
|
||||
$image_class = esc_attr( implode( ' ', $classes ) );
|
||||
$image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
|
||||
if ( empty( $image ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$image_alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="' . $image[0] . '" alt="' . $image_alt . '" width="' . $gallery_thumbnail['width'] . '" height="' . $gallery_thumbnail['height'] . '" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<div class="col"><a>%s</a></div>', $image ), $attachment_id, $post->ID, $image_class );
|
||||
|
||||
$loop ++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_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="product-gallery-default has-hover relative">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<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 = flatsome_wc_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', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_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',
|
||||
) );
|
||||
|
||||
$slider_classes = array('product-gallery-stacked', 'product-gallery-slider', 'slider', 'slider-nav-small', 'mb-half');
|
||||
|
||||
// Image Zoom
|
||||
if(get_theme_mod('product_zoom', 0)){
|
||||
$slider_classes[] = 'has-image-zoom';
|
||||
}
|
||||
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
if(get_theme_mod('product_lightbox','default') == 'disabled'){
|
||||
$slider_classes[] = 'disable-lightbox';
|
||||
}
|
||||
|
||||
?>
|
||||
<?php do_action('flatsome_before_product_images'); ?>
|
||||
|
||||
<div class="product-images relative mb-half has-hover <?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode(' ', $slider_classes); ?>"
|
||||
data-flickity='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons": false,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'>
|
||||
<?php
|
||||
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_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', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
</div>
|
||||
<?php do_action('flatsome_after_product_images'); ?>
|
||||
|
||||
<div class="show-for-medium product-gallery-stacked-thumbnails">
|
||||
<?php wc_get_template( 'woocommerce/single-product/product-gallery-thumbnails.php' ); ?>
|
||||
</div>
|
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_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',
|
||||
) );
|
||||
|
||||
$slider_classes = array('product-gallery-slider','slider','slider-nav-small','mb-0');
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
// Image Zoom
|
||||
if(get_theme_mod('product_zoom', 0)){
|
||||
$slider_classes[] = 'has-image-zoom';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="row row-small">
|
||||
<div class="col large-10">
|
||||
<?php do_action('flatsome_before_product_images'); ?>
|
||||
|
||||
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?> relative mb-half has-hover" data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode(' ', $slider_classes); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons":true,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'>
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_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', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
|
||||
?>
|
||||
</figure>
|
||||
|
||||
<div class="image-tools absolute bottom left z-3">
|
||||
<?php do_action('flatsome_product_image_tools_bottom'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('flatsome_after_product_images'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
$thumb_count = count($attachment_ids)+1;
|
||||
|
||||
$rtl = 'false';
|
||||
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
$thumb_cell_align = "left";
|
||||
|
||||
if ( $attachment_ids ) {
|
||||
$loop = 0;
|
||||
$image_size = 'gallery_thumbnail';
|
||||
$gallery_class = array( 'product-thumbnails', 'thumbnails' );
|
||||
$gallery_thumbnail = wc_get_image_size( apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
|
||||
if($thumb_count <= 5){
|
||||
$gallery_class[] = 'slider-no-arrows';
|
||||
}
|
||||
|
||||
$gallery_class[] = 'slider row row-small row-slider slider-nav-small small-columns-4';
|
||||
|
||||
?>
|
||||
<div class="col large-2 large-col-first vertical-thumbnails pb-0">
|
||||
|
||||
<div class="<?php echo implode(' ', $gallery_class); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "left",
|
||||
"wrapAround": false,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons": false,
|
||||
"asNavFor": ".product-gallery-slider",
|
||||
"percentPosition": true,
|
||||
"imagesLoaded": true,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>,
|
||||
"contain": true
|
||||
}'
|
||||
><?php
|
||||
|
||||
if ( has_post_thumbnail() ) :
|
||||
?>
|
||||
<div class="col is-nav-selected first">
|
||||
<a>
|
||||
<?php
|
||||
$image_id = get_post_thumbnail_id($post->ID);
|
||||
$image = wp_get_attachment_image_src( $image_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_'.$image_size ) );
|
||||
$image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="'.$image[0].'" alt="'.$image_alt.'" width="'.$gallery_thumbnail['width'].'" height="'.$gallery_thumbnail['height'].'" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo $image;
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
|
||||
$classes = array( '' );
|
||||
$image_class = esc_attr( implode( ' ', $classes ) );
|
||||
$image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_'.$image_size ));
|
||||
$image_alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="'.$image[0].'" alt="'.$image_alt.'" width="'.$gallery_thumbnail['width'].'" height="'.$gallery_thumbnail['height'].'" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<div class="col"><a>%s</a></div>', $image ), $attachment_id, $post->ID, $image_class );
|
||||
|
||||
$loop++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_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',
|
||||
) );
|
||||
|
||||
$slider_classes = array( 'product-gallery-slider', 'slider', 'slider-nav-circle', 'mb-half', 'slider-style-container', 'slider-nav-light', 'slider-load-first', 'no-overflow' );
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
?>
|
||||
<?php do_action( 'flatsome_before_product_images' ); ?>
|
||||
|
||||
<div class="product-images slider-wrapper relative mb-half has-hover <?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?> " data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
<div class="absolute left right">
|
||||
<div class="container relative">
|
||||
<?php do_action( 'flatsome_sale_flash' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode( ' ', $slider_classes ); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons":true,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'
|
||||
style="background-color: #333;">
|
||||
<?php
|
||||
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_get_gallery_image_html( $post_thumbnail_id, true, 'full' );
|
||||
} 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', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
|
||||
<div class="loading-spin centered dark"></div>
|
||||
|
||||
<div class="absolute bottom left right">
|
||||
<div class="container relative image-tools">
|
||||
<div class="image-tools absolute bottom right z-3">
|
||||
<?php do_action( 'flatsome_product_image_tools_bottom' ); ?>
|
||||
<?php do_action( 'flatsome_product_image_tools_top' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php do_action( 'flatsome_after_product_images' ); ?>
|
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
if(get_theme_mod('product_gallery_woocommerce')) {
|
||||
wc_get_template_part( 'single-product/product-image', 'default' );
|
||||
return;
|
||||
}
|
||||
|
||||
if(get_theme_mod('product_layout') == 'gallery-wide'){
|
||||
wc_get_template_part( 'single-product/product-image', 'wide' );
|
||||
return;
|
||||
}
|
||||
|
||||
if(get_theme_mod('product_layout') == 'stacked-right'){
|
||||
wc_get_template_part( 'single-product/product-image', 'stacked' );
|
||||
return;
|
||||
}
|
||||
|
||||
if(get_theme_mod('product_image_style') == 'vertical'){
|
||||
wc_get_template_part( 'single-product/product-image', 'vertical' );
|
||||
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',
|
||||
) );
|
||||
|
||||
$slider_classes = array('product-gallery-slider','slider','slider-nav-small','mb-half');
|
||||
|
||||
// Image Zoom
|
||||
if(get_theme_mod('product_zoom', 0)){
|
||||
$slider_classes[] = 'has-image-zoom';
|
||||
}
|
||||
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
if(get_theme_mod('product_lightbox','default') == 'disabled'){
|
||||
$slider_classes[] = 'disable-lightbox';
|
||||
}
|
||||
|
||||
?>
|
||||
<?php do_action('flatsome_before_product_images'); ?>
|
||||
|
||||
<div class="product-images relative mb-half has-hover <?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode(' ', $slider_classes); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons":true,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'>
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_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', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
|
||||
<div class="image-tools absolute bottom left z-3">
|
||||
<?php do_action('flatsome_product_image_tools_bottom'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('flatsome_after_product_images'); ?>
|
||||
|
||||
<?php wc_get_template( 'woocommerce/single-product/product-gallery-thumbnails.php' ); ?>
|
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Thumbnails
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-thumbnails.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disabled, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
global $product;
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
$image_size = get_theme_mod( 'product_layout' ) == 'gallery-wide' ? 'full' : 'woocommerce_single';
|
||||
|
||||
|
||||
if ( $attachment_ids && $product->get_image_id() ) {
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', flatsome_wc_get_gallery_image_html( $attachment_id, $main_image = false, $image_size ), $attachment_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Rating
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/rating.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
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
global $product;
|
||||
$review_ratings_enabled = wc_review_ratings_enabled();
|
||||
if ( ! $review_ratings_enabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rating_count = $product->get_rating_count();
|
||||
$review_count = $product->get_review_count();
|
||||
$average = $product->get_average_rating();
|
||||
|
||||
if ( $rating_count > 0 ) : ?>
|
||||
|
||||
<div class="woocommerce-product-rating">
|
||||
<?php echo flatsome_get_rating_html( $average, $rating_count ); // WPCS: XSS ok. ?>
|
||||
<?php if ( get_theme_mod( 'product_info_review_count' ) && get_theme_mod( 'product_info_review_count_style' ) != 'tooltip' ) : ?>
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php //phpcs:disable ?>
|
||||
<a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'woocommerce' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a>
|
||||
<?php // phpcs:enable ?>
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* Related Products
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/related.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.9.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Get Type.
|
||||
$type = get_theme_mod( 'related_products', 'slider' );
|
||||
$repeater_classes = array();
|
||||
|
||||
if ( $type == 'hidden' ) return;
|
||||
if ( $type == 'grid' ) $type = 'row';
|
||||
|
||||
if ( get_theme_mod('category_force_image_height' ) ) $repeater_classes[] = 'has-equal-box-heights';
|
||||
if ( get_theme_mod('equalize_product_box' ) ) $repeater_classes[] = 'equalize-box';
|
||||
|
||||
$repeater['type'] = $type;
|
||||
$repeater['columns'] = get_theme_mod( 'related_products_pr_row', 4 );
|
||||
$repeater['columns__md'] = get_theme_mod( 'related_products_pr_row_tablet', 3 );
|
||||
$repeater['columns__sm'] = get_theme_mod( 'related_products_pr_row_mobile', 2 );
|
||||
$repeater['class'] = implode( ' ', $repeater_classes );
|
||||
$repeater['slider_style'] = 'reveal';
|
||||
$repeater['row_spacing'] = 'small';
|
||||
|
||||
|
||||
if ( $related_products ) : ?>
|
||||
|
||||
<div class="related related-products-wrapper product-section">
|
||||
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_related_products_heading', __( 'Related products', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h3 class="product-section-title container-width product-section-title-related pt-half pb-half uppercase">
|
||||
<?php echo esc_html( $heading ); ?>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php get_flatsome_repeater_start( $repeater ); ?>
|
||||
|
||||
<?php foreach ( $related_products as $related_product ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $related_product->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php get_flatsome_repeater_end( $repeater ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Review Comments Template
|
||||
*
|
||||
* Closing li is left out on purpose!.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/review.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 http://docs.woothemes.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
} ?>
|
||||
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
||||
<div id="comment-<?php comment_ID(); ?>" class="comment_container review-item flex-row align-top">
|
||||
|
||||
<div class="flex-col">
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_review_before hook
|
||||
*
|
||||
* @hooked woocommerce_review_display_gravatar - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_before', $comment );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="comment-text flex-col flex-grow">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_review_before_comment_meta hook.
|
||||
*
|
||||
* @hooked woocommerce_review_display_rating - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_before_comment_meta', $comment );
|
||||
|
||||
/**
|
||||
* The woocommerce_review_meta hook.
|
||||
*
|
||||
* @hooked woocommerce_review_display_meta - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_meta', $comment );
|
||||
|
||||
do_action( 'woocommerce_review_before_comment_text', $comment );
|
||||
|
||||
/**
|
||||
* The woocommerce_review_comment_text hook
|
||||
*
|
||||
* @hooked woocommerce_review_display_comment_text - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_comment_text', $comment );
|
||||
|
||||
do_action( 'woocommerce_review_after_comment_text', $comment ); ?>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Product loop sale flash
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $post, $product;
|
||||
|
||||
$badge_style = flatsome_option('bubble_style');
|
||||
|
||||
// Fix depricated
|
||||
if($badge_style == 'style1') $badge_style = 'circle';
|
||||
if($badge_style == 'style2') $badge_style = 'square';
|
||||
if($badge_style == 'style3') $badge_style = 'frame';
|
||||
|
||||
?>
|
||||
<div class="badge-container is-larger absolute left top z-1">
|
||||
<?php if ( $product->is_on_sale() ) : ?>
|
||||
<?php
|
||||
$custom_text = get_theme_mod( 'sale_bubble_text' );
|
||||
$text = $custom_text ? $custom_text : __( 'Sale!', 'woocommerce' );
|
||||
|
||||
if ( get_theme_mod( 'sale_bubble_percentage' ) ) {
|
||||
$text = flatsome_presentage_bubble( $product, $text );
|
||||
}
|
||||
?>
|
||||
<?php echo apply_filters( 'woocommerce_sale_flash', '<div class="callout badge badge-'.$badge_style.'"><div class="badge-inner secondary on-sale"><span class="onsale">' . $text . '</span></div></div>', $post, $product ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php echo apply_filters( 'flatsome_product_labels', '', $post, $product, $badge_style); ?>
|
||||
</div>
|
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Share
|
||||
*
|
||||
* Sharing plugins can hook into here or you can add your own code directly.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/share.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.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_share' ); // Sharing plugins can hook into here.
|
||||
|
||||
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
|
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Single product short description
|
||||
*
|
||||
* @author Automattic
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
global $post;
|
||||
|
||||
$short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
|
||||
|
||||
if ( ! $short_description ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="product-short-description">
|
||||
<?php echo $short_description; // WPCS: XSS ok. ?>
|
||||
</div>
|
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product tabs
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter tabs and allow third parties to add their own
|
||||
*
|
||||
* Each tab is an array containing title, callback and priority.
|
||||
* @see woocommerce_default_product_tabs()
|
||||
*/
|
||||
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
||||
|
||||
if ( ! empty( $product_tabs ) ) : ?>
|
||||
<div class="product-page-accordian">
|
||||
<div class="accordion" rel="<?php echo get_theme_mod( 'product_display', 'tabs' ) === 'accordian-collapsed' ? 0 : 1; ?>">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<div class="accordion-item">
|
||||
<a class="accordion-title plain" href="javascript:void();">
|
||||
<button class="toggle"><i class="icon-angle-down"></i></button>
|
||||
<?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ); ?>
|
||||
</a>
|
||||
<div class="accordion-inner">
|
||||
<?php
|
||||
if ( isset( $product_tab['callback'] ) ) {
|
||||
call_user_func( $product_tab['callback'], $key, $product_tab );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product tabs
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter tabs and allow third parties to add their own
|
||||
*
|
||||
* Each tab is an array containing title, callback and priority.
|
||||
* @see woocommerce_default_product_tabs()
|
||||
*/
|
||||
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
||||
|
||||
if ( ! empty( $product_tabs ) ) : ?>
|
||||
<div class="product-page-sections">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<div class="product-section">
|
||||
<div class="row">
|
||||
<div class="large-2 col pb-0 mb-0">
|
||||
<h5 class="uppercase mt"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ); ?></h5>
|
||||
</div>
|
||||
|
||||
<div class="large-10 col pb-0 mb-0">
|
||||
<div class="panel entry-content">
|
||||
<?php
|
||||
if ( isset( $product_tab['callback'] ) ) {
|
||||
call_user_func( $product_tab['callback'], $key, $product_tab );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product tabs
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/tabs/tabs.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.8.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$tabs_style = get_theme_mod( 'product_display', 'tabs' );
|
||||
|
||||
// Get sections instead of tabs if set.
|
||||
if ( $tabs_style == 'sections' ) {
|
||||
wc_get_template_part( 'single-product/tabs/sections' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Get accordion instead of tabs if set.
|
||||
if ( $tabs_style == 'accordian' || $tabs_style == 'accordian-collapsed' ) {
|
||||
wc_get_template_part( 'single-product/tabs/accordian' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter tabs and allow third parties to add their own.
|
||||
*
|
||||
* Each tab is an array containing title, callback and priority.
|
||||
*
|
||||
* @see woocommerce_default_product_tabs()
|
||||
*/
|
||||
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
||||
|
||||
$tab_count = 0;
|
||||
$panel_count = 0;
|
||||
|
||||
if ( ! empty( $product_tabs ) ) : ?>
|
||||
|
||||
<div class="woocommerce-tabs wc-tabs-wrapper container tabbed-content">
|
||||
<ul class="tabs wc-tabs product-tabs small-nav-collapse <?php flatsome_product_tabs_classes(); ?>" role="tablist">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<li class="<?php echo esc_attr( $key ); ?>_tab <?php if ( $tab_count == 0 ) echo 'active'; ?>" id="tab-title-<?php echo esc_attr( $key ); ?>" role="tab" aria-controls="tab-<?php echo esc_attr( $key ); ?>">
|
||||
<a href="#tab-<?php echo esc_attr( $key ); ?>">
|
||||
<?php echo wp_kses_post( apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ) ); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php $tab_count++; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="tab-panels">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--<?php echo esc_attr( $key ); ?> panel entry-content <?php if ( $panel_count == 0 ) echo 'active'; ?>" id="tab-<?php echo esc_attr( $key ); ?>" role="tabpanel" aria-labelledby="tab-title-<?php echo esc_attr( $key ); ?>">
|
||||
<?php if ( $key == 'description' && ux_builder_is_active() ) echo flatsome_dummy_text(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php
|
||||
if ( isset( $product_tab['callback'] ) ) {
|
||||
call_user_func( $product_tab['callback'], $key, $product_tab );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php $panel_count++; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_product_after_tabs' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product title
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/title.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 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
<h1 class="product-title product_title entry-title">
|
||||
<?php the_title(); ?>
|
||||
</h1>
|
||||
|
||||
<?php if ( get_theme_mod( 'product_title_divider', 1 ) ) { ?>
|
||||
<div class="is-divider small"></div>
|
||||
<?php } ?>
|
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Up-Sells
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/up-sells.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.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $upsells ) : ?>
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'product_upsell', 'sidebar' ) !== 'sidebar' ) :
|
||||
|
||||
$type = get_theme_mod( 'related_products', 'slider' );
|
||||
$repeater_classes = array();
|
||||
|
||||
if ( $type == 'grid' ) {
|
||||
$type = 'row';
|
||||
}
|
||||
|
||||
if ( get_theme_mod('category_force_image_height' ) ) $repeater_classes[] = 'has-equal-box-heights';
|
||||
if ( get_theme_mod('equalize_product_box' ) ) $repeater_classes[] = 'equalize-box';
|
||||
|
||||
$repeater['type'] = $type;
|
||||
$repeater['columns'] = get_theme_mod( 'related_products_pr_row', 4 );
|
||||
$repeater['columns__md'] = get_theme_mod( 'related_products_pr_row_tablet', 3 );
|
||||
$repeater['columns__sm'] = get_theme_mod( 'related_products_pr_row_mobile', 2 );
|
||||
$repeater['class'] = implode( ' ', $repeater_classes );
|
||||
$repeater['slider_style'] = 'reveal';
|
||||
$repeater['row_spacing'] = 'small';
|
||||
|
||||
if ( count( $upsells ) < $repeater['columns'] ) {
|
||||
$repeater['type'] = 'row';
|
||||
}
|
||||
?>
|
||||
<div class="up-sells upsells products upsells-wrapper product-section">
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_upsells_products_heading', __( 'You may also like…', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h3 class="product-section-title product-section-title-upsell pt-half pb-half uppercase">
|
||||
<?php echo esc_html( $heading ); ?>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php get_flatsome_repeater_start( $repeater ); ?>
|
||||
|
||||
<?php foreach ( $upsells as $upsell ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $upsell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php get_flatsome_repeater_end( $repeater ); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
||||
<aside class="widget widget-upsell">
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_upsells_products_heading', __( 'You may also like…', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h3 class="widget-title shop-sidebar">
|
||||
<?php echo esc_html( $heading ); ?>
|
||||
<div class="is-divider small"></div>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
<!-- Upsell List style -->
|
||||
<ul class="product_list_widget">
|
||||
<?php foreach ( $upsells as $upsell ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $upsell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product-small' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
Reference in New Issue
Block a user