';
echo $return;
}
function cactus_after_shop_loop_item()
{
$return = '';
echo $return;
}
function cactus_product_single_add_to_cart_text()
{
return '';
}
function cactus_wcwl_add_wishlist_on_loop()
{
echo do_shortcode('[yith_wcwl_add_to_wishlist]');
}
if (defined('YITH_WCWL')) {
add_action( 'cactus_add_to_wishlist', 'cactus_wcwl_add_wishlist_on_loop', 15 );
}
function cactus_before_shop_loop_item_title()
{
global $post, $product, $woocommerce, $wishlists;
$id = get_the_ID();
$size = 'shop_catalog';
$gallery = get_post_meta($id, '_product_image_gallery', true);
$attachment_image = '';
if (!empty($gallery)) {
$gallery = explode( ',', $gallery );
$first_image_id = $gallery[0];
$attachment_image = wp_get_attachment_image( $first_image_id, $size, false, array( 'class' => 'hover-image' ) );
}
if (has_post_thumbnail()) {
$thumb = get_the_post_thumbnail(get_the_ID(), "shop_catalog");
$product_image = $thumb.$attachment_image;
} else {
$product_image = '';
}
$onsale = '';
if ($product->is_on_sale()) :
$onsale = apply_filters( 'woocommerce_sale_flash', '' . __( 'Sale!', 'cactus' ) . '', $post, $product );
endif;
echo ''.$onsale.'
'.$product_image.'
'.get_the_title().'
';
do_action( 'cactus_template_loop_rating' );
echo '';
do_action( 'cactus_template_loop_price' );
echo '
';
}
function cactus_template_loop_product_title()
{
global $post, $product, $woocommerce, $wishlists;
$add_to_cart_link_class = implode( ' ', array_filter( array(
// 'product_type_' . $product->product_type,
$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',
$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : ''
) ) );
do_action( 'cactus_template_loop_add_to_cart',array('class'=> 'button '.$add_to_cart_link_class) );
}
?>
>