Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined( 'ABSPATH' ) || exit;
- global $product;
- // Ensure visibility.
- if ( empty( $product ) || ! $product->is_visible() ) {
- return;
- }
- ?>
- <li <?php wc_product_class(); ?>>
- <div class="product-bg" style="background-image:url(<?php echo get_the_post_thumbnail_url(get_the_ID(), 'medium'); ?>)">
- <div class="row text-center">
- <div class="col my-auto">
- <div class="product-buttons">
- <!-- Add to cart Button -->
- <a href="<?php echo site_url(); ?>/?add-to-cart=<?php echo get_the_ID(); ?>" data-quantity="1" class="product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="<?php echo get_the_ID(); ?>"><i class="fa fa-shopping-cart"></i></a>
- <?php if(function_exists('yith_wishlist_constructor')) : ?>
- <!-- Add to wishlist Button -->
- <?php echo do_shortcode('[yith_wcwl_add_to_wishlist]'); ?>
- <?php endif; ?>
- <?php if(function_exists('yith_woocompare_constructor')) : ?>
- <!-- Add to compare Button -->
- <a class="compare" data-product_id="<?php echo get_the_ID(); ?>" href="<?php echo site_url(); ?>/?action=yith-woocompare-add-product&id=<?php echo get_the_ID(); ?>"></a>
- <?php endif; ?>
- </div>
- <?php woocommerce_template_loop_rating(); ?>
- </div>
- </div>
- </div>
- <a href="<?php the_permalink(); ?>"><?php do_action('woocommerce_shop_loop_item_title'); ?></a>
- <?php woocommerce_template_loop_price(); ?>
- </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement