File: /var/www/sites/1250.info/wp-content/themes/savoy/woocommerce/content-product.php
<?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.6.0
NM: Modified */
defined( 'ABSPATH' ) || exit;
global $product, $nm_globals, $nm_theme_options;
// Ensure visibility
if ( empty( $product ) || ! $product->is_visible() ) {
return;
}
nm_add_page_include( 'products' );
// Wrapper link
remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
// Product variation attributes
$attributes_escaped = function_exists( 'nm_template_loop_attributes' ) ? nm_template_loop_attributes() : null;
$product_class = ( $attributes_escaped ) ? 'nm-has-attributes' : '';
// Title
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
add_action( 'woocommerce_shop_loop_item_title', 'nm_template_loop_product_title', 10 );
// Rating
if ( ! $nm_theme_options['product_rating'] ) {
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
}
// Action link
if ( ! $nm_theme_options['product_action_link'] ) {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
?>
<li <?php wc_product_class( $product_class, $product ); ?> data-product-id="<?php echo esc_attr( $product->get_id() ); ?>">
<div class="nm-shop-loop-product-wrap">
<?php
/**
* Hook: woocommerce_before_shop_loop_item.
*
* NM: Removed - @hooked woocommerce_template_loop_product_link_open - 10
*/
do_action( 'woocommerce_before_shop_loop_item' );
?>
<div class="nm-shop-loop-thumbnail">
<?php
/**
* Wishlist button - Note: Centered layout only
*/
if ( $nm_globals['wishlist_enabled'] && $nm_theme_options['products_layout'] == 'centered' ) { nm_wishlist_button(); }
?>
<a href="<?php echo esc_url( get_permalink() ); ?>" class="nm-shop-loop-thumbnail-link woocommerce-LoopProduct-link">
<?php
/**
* 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' );
?>
</a>
</div>
<div class="nm-shop-loop-details">
<?php
/**
* Wishlist button
*/
if ( $nm_globals['wishlist_enabled'] && $nm_theme_options['products_layout'] !== 'centered' ) { nm_wishlist_button(); }
?>
<div class="nm-shop-loop-title-price">
<?php
/**
* Hook: woocommerce_shop_loop_item_title.
*
* NM: Removed - @hooked woocommerce_template_loop_product_title - 10
* NM: Added - @hooked nm_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' );
?>
</div>
<div class="nm-shop-loop-actions">
<?php
/**
* Hook: woocommerce_after_shop_loop_item.
*
* NM: Removed - @hooked woocommerce_template_loop_product_link_close - 5
* @hooked woocommerce_template_loop_add_to_cart - 10
*/
do_action( 'woocommerce_after_shop_loop_item' );
/**
* Quick view link
*/
if ( $nm_theme_options['product_quickview'] && $nm_theme_options['product_quickview_link'] ) {
echo apply_filters( 'nm_product_quickview_link', '<a href="' . esc_url( get_permalink() ) . '" class="nm-quickview-btn">' . esc_html__( 'Show more', 'nm-framework' ) . '</a>' );
}
?>
</div>
</div>
<?php
/**
* Product variation attributes
*/
if ( $attributes_escaped ) {
echo $attributes_escaped;
}
?>
</div>
</li>