/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot
/
inc
/
woocommerce
/
Upload File
HOME
<?php /** * The template for displaying product content within loops * * This template can be overridden by copying it to yourtheme/woocommerce/content-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.4.0 */ defined( 'ABSPATH' ) || exit; // $product_counter - in woocommerce/bootstrap.php global $product, $product_counter; // Ensure visibility if ( empty( $product ) || ! $product->is_visible() ) { return; } if ( $product_counter === 8 ) { $product_counter = 0; } $product_counter ++; // Get template name $template_name = basement_get_template_name(); // Default empty post classes & styles $post_classes = array( 'col-sm-6 col-lg-4 col-xl-3' ); $post_style = array(); $sidebar_status = $widget_area = ''; // 5 cols for fullwidth templates if ( strpos( $template_name, 'fullwidth' ) !== false ) { $post_classes[] = 'col-xl-2_5'; } // If archive page - check sidebar exist if ( is_archive() ) { $sidebar_status = get_option( 'basement_framework_woo_sidebar' ); $widget_area = get_option( 'basement_framework_woo_sidebar_area' ); } elseif ( is_page() ) { $sidebar_params = basement_get_ready_params( array( 'sidebar' ) ); $sidebar_status = isset( $sidebar_params['sidebar'] ) ? $sidebar_params['sidebar'] : ''; $widget_area = isset( $sidebar_params['sidebar_area'] ) ? $sidebar_params['sidebar_area'] : ''; } // Adds/change some classes if sidebar enabled if ( 'yes' === $sidebar_status && is_active_sidebar( $widget_area ) ) { $post_classes = array( 'col-sm-6 col-xl-4' ); if ( strpos( $template_name, 'fullwidth' ) !== false ) { $post_classes = array( 'col-sm-6 col-lg-6 col-xl-4' ); } } // Add some class for different templates if ( strpos( $template_name, 'woo-modern' ) !== false ) { $post_classes[] = 'product--tile'; } if ( strpos( $template_name, 'woo-tiles' ) !== false ) { $post_classes[] = 'product--tile product--nomargin'; } // Different columns size for mixed templates if ( strpos( $template_name, 'woo-mixed' ) !== false ) { $post_classes = array( 'product--tile product--tile-mixed' ); switch ( $product_counter ) { case 1 : $post_classes[] = 'product--tile-height1'; break; case 2 : case 3 : $post_classes[] = 'product--tile-height2'; break; case 4 : $post_classes[] = 'product--tile-height3'; break; case 5 : case 6 : $post_classes[] = 'product--tile-height2'; break; case 7 : $post_classes[] = 'product--tile-height1'; break; case 8 : $post_classes[] = 'product--tile-height3'; break; } } // Tile type identification $post_classes[] = 'product--type-' . str_replace( 'page-woo', '', $template_name ); // Reset all classes on single product page if ( is_single() || is_cart() ) { $post_classes = array(); } ?> <article <?php wc_product_class( implode( ' ', $post_classes ) ); ?>> <?php // Card if template = *woo-classic*.php if ( strpos( $template_name, 'woo-classic' ) !== false || is_single() || is_cart() ) { ?> <div class="product-entry js-product-entry"> <?php woocommerce_show_product_loop_sale_flash(); ?> <div class="product-entry__thumbnail js-product-thumbnail"> <?php woocommerce_template_loop_product_link_open(); ?> <span style="background-image: url(<?php echo woocommerce_get_product_thumbnail_src(); ?>);"></span> <?php woocommerce_template_loop_product_link_close(); ?> <div class="product-entry__actions"> <?php woocommerce_template_loop_add_to_cart(); ?> <a href="<?php echo esc_url( get_the_permalink() ); ?>" class="js-product-action-trigger" title="<?php esc_attr_e( 'Discover More', 'covercase' ); ?>"><i class="cov-simple-menu" aria-hidden="true"></i></a> </div> </div> <div class="product-entry__desc"> <h2 class="woocommerce-loop-product__title js-product-hover-trigger"><?php woocommerce_template_loop_product_link_open(); ?><?php echo esc_html( get_the_title() ); ?><?php woocommerce_template_loop_product_link_close(); ?></h2> <?php woocommerce_template_loop_price(); ?> </div> </div> <?php } else { ?> <div class="product-entry"> <?php woocommerce_show_product_loop_sale_flash(); ?> <div class="product-entry__thumbnail"> <?php woocommerce_template_loop_product_link_open(); ?> <span style="background-image: url(<?php echo woocommerce_get_product_thumbnail_src(); ?>);"></span> <?php woocommerce_template_loop_product_link_close(); ?> <div class="product-entry__actions"> <?php woocommerce_template_loop_add_to_cart(); ?> <a href="<?php echo esc_url( get_the_permalink() ); ?>" class="js-product-action-trigger" title="<?php esc_attr_e( 'Discover More', 'covercase' ); ?>"><i class="cov-simple-menu" aria-hidden="true"></i></a> <div class="product-entry__desc"> <h2 class="woocommerce-loop-product__title"><?php woocommerce_template_loop_product_link_open(); ?><?php echo esc_html( get_the_title() ); ?><?php woocommerce_template_loop_product_link_close(); ?></h2> <?php woocommerce_template_loop_price(); ?> </div> </div> </div> </div> <?php } ?> </article>