File: /var/www/html/shootinschool/wp-content/themes/splash-child/woocommerce/content-single-product.php
<?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/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.6.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<?php
/**
* woocommerce_before_single_product hook.
*
* @hooked wc_print_notices - 10
*/
do_action( 'woocommerce_before_single_product' );
if ( post_password_required() ) {
echo get_the_password_form();
return;
}
?>
<div id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if(is_af() || is_layout("baseball")): ?>
<div class="row">
<div class="col-md-12 af-single-product-title">
<?php woocommerce_template_single_title(); ?>
</div>
</div>
<?php endif; ?>
<div class="row">
<?php
$class_left = "col-md-6 col-sm-6";
$class_right = "col-md-6 col-sm-6";
if(is_layout("af") || is_layout("baseball")) { $class_left = "col-md-7 col-sm-6"; $class_right = "col-md-5 col-sm-6"; }
elseif(is_layout("sccr")) { $class_left = "col-md-4 col-sm-6"; $class_right = "col-md-8 col-sm-6"; }
?>
<div class="<?php echo $class_left; ?>">
<div class="stm-badge-wrapper stm-thumb-num-<?php echo count(wc_get_product()->get_gallery_image_ids()); ?>">
<?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' );
echo woocommerce_show_product_images();
?>
</div>
</div>
<div class="<?php echo $class_right ; ?>">
<div class="summary entry-summary stm-single-product-content-right <?php if(is_layout("bb")) echo "stm-bb-prod-cont-right"?>">
<?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
* @hooked WC_Structured_Data::generate_product_data() - 60
*/
echo woocommerce_template_single_title();
echo woocommerce_template_single_rating();
echo woocommerce_template_single_price();
echo woocommerce_template_single_excerpt();
//echo woocommerce_template_single_meta();
//echo woocommerce_template_single_sharing();
//do_action( 'woocommerce_single_product_summary' );
?>
<button class="abc">Register Now</button>
</div><!-- .summary -->
</div>
</div>
<div class="grivity-form-setting" style="display:none;">
<?php echo woocommerce_template_single_add_to_cart(); ?>
</div>
<script>
jQuery(".abc").click(function(){
jQuery(".grivity-form-setting").toggle('slow');
});
</script>
<?php
if(is_layout("sccr") && !wp_is_mobile()) {
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
do_action( 'woocommerce_after_single_product_summary' );
}
?>
<?php
/* ...............quantity check code ....................*/
global $product;
//print_r($product->stock_status);
if( $product->stock_status == 'outofstock' ) {
?>
<!-- Button trigger modal -->
<?php $abc = get_post_meta( get_the_ID(), 'popup', true );
echo $abc;
if($abc)
{
?>
<script>
jQuery(window).load(function() {
jQuery('#myModal').modal('show');
// alert("Window load request messgae");
});
</script>
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
</div>
</div>
</div>
<?php
}
?>
<!-- Modal -->
<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Some text in the modal
</div>
</div>
</div>
</div>
<?php
}
?>
<?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
*/
if(is_layout("sccr")) {
if(!wp_is_mobile()) {
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);
}
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
}
do_action( 'woocommerce_after_single_product_summary' );
?>
<meta itemprop="url" content="<?php the_permalink(); ?>" />
</div><!-- #product-<?php the_ID(); ?> -->
<?php do_action( 'woocommerce_after_single_product' ); ?>