Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying product content within loops.
- *
- * Override this template by copying it to yourtheme/woocommerce/content-product.php
- *
- * @author WooThemes
- * @package WooCommerce/Templates
- * @version 3.4.0
- */
- if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly
- }
- global $product, $woocommerce_loop;
- $options = _WSH()->option();
- $theme_options = (sh_set($options, 'shop_page_view') == 'four_column') ? ' style="width:24.33%"' : ' ';
- $column = (sh_set($options, 'shop_page_view') == 'four_column') ? '4' : '3';
- // Store loop count we're currently on
- if ( empty( $woocommerce_loop['loop'] ) )
- $woocommerce_loop['loop'] = 0;
- // Store column count for displaying the grid
- if ( empty( $woocommerce_loop['columns'] ) )
- $woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', $column );
- // Ensure visibility
- if ( ! $product || ! $product->is_visible() )
- return;
- // Increase loop count
- $woocommerce_loop['loop']++;
- // Extra post classes
- $classes = array();
- if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns'] )
- $classes[] = 'first';
- if ( 0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns'] )
- $classes[] = 'last';
- $classes[] = '';
- $meta = _WSH()->get_meta();
- ?>
- <li class="mix <?php echo implode(' ', $classes );?>" <?php echo $theme_options; ?>>
- <div class="clearfix"<?php //post_class( $classes ); ?>>
- <?php //do_action( 'woocommerce_before_shop_loop_item' ); ?>
- <div class="thumbnail thumbnail-product">
- <figure class="image-zoom">
- <?php the_post_thumbnail( '267x265' );?>
- </figure>
- <div class="caption">
- <div class="text-wrap">
- <h5><a href="<?php the_permalink(); ?>">
- <?php
- /**
- * woocommerce_before_shop_loop_item_title hook
- *
- * @hooked woocommerce_show_product_loop_sale_flash - 10
- * @hooked woocommerce_template_loop_product_thumbnail - 10
- */
- do_action( 'woocommerce_before_shop_loop_item_title' );
- ?>
- <?php the_title();?>
- </a></h5>
- <div class="rating-star">
- <?php woocommerce_template_loop_rating(); ?>
- </div>
- <p class="prod-price text-primary"><?php esc_html_e('Cena ', 'perfume'); ?><?php woocommerce_template_loop_price(); ?></p>
- <div class="filter-list-disp">
- <p class="dispatch-info"><i class="flaticon-shipping"></i> <?php echo sh_set($meta, 'time-duratn'); ?></p>
- <a href="<?php the_permalink(); ?>" class="btn btn-default view-detail"><?php esc_html_e('View Details', 'perfume'); ?></a>
- </div>
- </div>
- <?php $product_data = sh_set( $meta, 'product-data' );
- $explode = ($product_data ) ? explode("\n", $product_data) : array();
- if( $explode ) :?>
- <div class="list-wrap">
- <h5><?php echo esc_html_e('Highlights:', 'perfume'); ?></h5>
- <ul class="list-6">
- <?php foreach( $explode as $ex ): ?>
- <li><?php echo balanceTags( $ex ); ?></li>
- <?php endforeach; ?>
- </ul>
- <a href="<?php the_permalink(); ?>" class="btn btn-default view-detail"><?php esc_html_e('View Details', 'perfume'); ?></a>
- </div><!-- /list-wrap -->
- <?php endif; ?>
- </div>
- <?php
- /**
- * woocommerce_after_shop_loop_item hook
- *
- * @hooked woocommerce_template_loop_add_to_cart - 10
- */
- do_action( 'woocommerce_after_shop_loop_item' );
- ?>
- </div>
- </div>
- </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement