<?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/ *
@author WooThemes
*
@package WooCommerce\Templates
*
@version 3.6.0
*/
defined( 'ABSPATH' ) || exit;
global $product;
// Ensure visibility
if ( empty( $product ) || ! $product->is_visible() ) {
return;
}
$__productID = $product->get_id();
$image = wp_get_attachment_image_src(get_post_thumbnail_id($__productID), 'single-post-thumbnail');
$imageDuringHover = get_field('image_during_hover', $__productID);
$attachment_ids = $product->get_gallery_image_ids();
$image_link_hover = wp_get_attachment_url($attachment_ids[0]);
$no_product_image = get_field('no_product_image', 'option');
?>
<div class="body__el wow fadeIn" data-wow-delay="0.3s" data-wow-duration="1.2s">
<a href="<?php echo get_the_permalink() ?>" class="productCard">
<div class="__body"></div>
<img src="<?php echo wp_get_attachment_url($__productID); ?>" alt="#"
class="productCard__imgBG">
<div class="productCard__body">
<div class="productCard__imgContainer">
<img src="<?php echo $image[0] ?>" alt="#"
class="productCard__img1">
<img src="<?php if (empty($image_link_hover)) {
echo $no_product_image;
} else {
echo $image_link_hover;
} ?>" alt="#" class="productCard__img2">
</div>
<div class="productCard__text">
<div class="productCard__title"><?php echo $product->get_name(); ?></div>
<div class="productCard__button">
<span>קרא עוד</span>
<img src="<?php echo site_url() ?>/wp-content/themes/benda_enterprise/assets/img/arrow-more_black.svg"
class="arrowBlack" alt="#">
<img src="<?php echo site_url() ?>/wp-content/themes/benda_enterprise/assets/img/arrow-more.svg"
class="arrowWhite" alt="#">
</div>
</div>
</div>
</a>
</div>