Exemplo n.º 1
0
/**
 * Product loop thumbnail
 *
 */
function show_thumbnail()
{
    echo '<div class="product-item__preview">';
    echo woocommerce_template_loop_product_link_open();
    echo woocommerce_get_product_thumbnail();
    echo woocommerce_template_loop_product_link_close();
    echo '</div>';
}
Exemplo n.º 2
0
function product_thumbnail_with_cart()
{
    ?>
	
   <div class="product-thumb-wrap">
	   	<?php 
    echo woocommerce_get_product_thumbnail();
    ?>
	   	<?php 
    woocommerce_get_template('loop/add-to-cart.php');
    ?>
   	</div>
<?php 
}
Exemplo n.º 3
0
        function woocommerce_template_loop_product_thumbnail()
        {
            ?>
		<a href="<?php 
            the_permalink();
            ?>
">
			<figure class="item-thumb">
				<?php 
            echo woocommerce_get_product_thumbnail();
            ?>
			</figure>
		</a>
		<?php 
        }
Exemplo n.º 4
0
 /**
  * Get the product thumbnail for the loop.
  *
  * @access public
  * @subpackage	Loop
  * @return void
  */
 function woocommerce_template_loop_product_thumbnail()
 {
     global $product;
     $attachment_ids = $product->get_gallery_attachment_ids();
     $secondary_image = '';
     if ($attachment_ids) {
         $secondary_image_id = $attachment_ids['0'];
         $secondary_image = wp_get_attachment_image($secondary_image_id, apply_filters('shop_catalog', 'shop_catalog'));
     }
     ?>
     <div class="product-thumb-container">
         <?php 
     if (has_post_thumbnail()) {
         ?>
             <div class="product-thumb-primary">
                 <?php 
         echo woocommerce_get_product_thumbnail();
         ?>
             </div>
         <?php 
         if (!empty($secondary_image)) {
             ?>
             <div class="product-thumb-secondary">
                 <?php 
             echo wp_kses_post($secondary_image);
             ?>
             </div>
         <?php 
         }
         ?>
     <?php 
     } elseif (!empty($secondary_image)) {
         ?>
         <div class="product-thumb-primary">
             <?php 
         echo wp_kses_post($secondary_image);
         ?>
         </div>
     <?php 
     }
     ?>
     </div>
 <?php 
 }
Exemplo n.º 5
0
function custom_woo_thumb()
{
    global $product;
    ?>
    <div class="thumb">
      <?php 
    echo woocommerce_get_product_thumbnail();
    ?>
      <div class="icon-more">
         <div class="icon icon-animate-left">
            <i class="fa fa-link"></i>
         </div>
         <div class="icon icon-animate-right">
            <?php 
    echo apply_filters('woocommerce_loop_add_to_cart_link', sprintf('<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="button %s product_type_%s">%s</a>', esc_url($product->add_to_cart_url()), esc_attr($product->id), esc_attr($product->get_sku()), esc_attr(isset($quantity) ? $quantity : 1), $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '', esc_attr($product->product_type), '<i class="fa fa-shopping-cart"></i>'), $product);
    ?>
         </div>
      </div>
   </div>
   <?php 
}
Exemplo n.º 6
0
function vk_display_plays($date, $city)
{
    global $wpdb;
    $querystr = "\n\t    SELECT {$wpdb->posts}.*\n\t    FROM {$wpdb->posts}, {$wpdb->postmeta}, {$wpdb->terms}, {$wpdb->term_relationships}\n\t    WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id\n\t    AND {$wpdb->postmeta}.meta_key = '_vk_date_input'\n\t    AND {$wpdb->postmeta}.meta_value LIKE '%" . $date . "%'\n\t\t\t\t\tAND {$wpdb->term_relationships}.object_id = {$wpdb->postmeta}.post_id\n\t\t\t\t\tAND {$wpdb->term_relationships}.term_taxonomy_id = {$wpdb->terms}.term_id\n\t\t\t\t\tAND {$wpdb->terms}.name ='" . $city . "'";
    $pageposts = $wpdb->get_results($querystr, OBJECT);
    ?>
		</br>
	<?php 
    $count = 1;
    if ($pageposts) {
        ?>
	 <?php 
        global $post;
        ?>
	 <?php 
        foreach ($pageposts as $post) {
            ?>
		 <?php 
            $html = woocommerce_get_product_thumbnail('shop_catalog');
            $xpath = new DOMXPath(@DOMDocument::loadHTML($html));
            $img_src = $xpath->evaluate("string(//img/@src)");
            ?>
		 <?php 
            if ($count == 1) {
                echo '<div class="row">';
            }
            ?>
		 <div class="col-xs-6 col-md-4">
     <a href="<?php 
            the_permalink();
            ?>
" >
						<img class="img-top" src="<?php 
            echo $img_src;
            ?>
" width="300" height="300" alt="<?php 
            the_title();
            ?>
">
					</a>
     <h4 class="title"><a href="<?php 
            the_permalink();
            ?>
" ><?php 
            the_title();
            ?>
</a></h4>

     <small class="text-muted">
						<?php 
            $meta_time = get_post_meta($post->ID, '_vk_time_input', true);
            if ($meta_time) {
                echo '<span class="glyphicon glyphicon-time"></span> ' . $meta_time . '<br/>';
            }
            $taxonomyName = "product_cat";
            $parent_terms = wp_get_post_terms($post->ID, $taxonomyName, array('parent' => 0, 'orderby' => 'slug', 'hide_empty' => false));
            echo '<span class="glyphicon glyphicon-map-marker"></span>';
            foreach ($parent_terms as $pterm) {
                $terms = wp_get_post_terms($post->ID, $taxonomyName, array('parent' => $pterm->term_id, 'orderby' => 'slug', 'hide_empty' => false));
                foreach ($terms as $term) {
                    echo '<a href="' . get_term_link($term->name, $taxonomyName) . '">' . $term->name . '</a>';
                }
            }
            ?>
			 	</small>
					<hr/>
		</div>
		<?php 
            if ($count == 3) {
                echo '</div>';
                $count = 0;
            }
            $count++;
            ?>
	 <?php 
        }
        if (count($pageposts) % 2 == 0 || count($pageposts) == 1) {
            echo "</div>";
        }
        ?>
	 <?php 
    } else {
        ?>
	    <h2 class="center">Няма резултати</h2>
	    <p class="center">Съжалявам, търсите нещо, което не е тук.</p>
	    <?php 
        include TEMPLATEPATH . "/searchform.php";
        ?>
	 <?php 
    }
}
Exemplo n.º 7
0
 *
 * @hooked woocommerce_show_product_loop_sale_flash - 10
 * @hooked woocommerce_template_loop_product_thumbnail - 10
 */
/*			ob_start();
			do_action( 'woocommerce_before_shop_loop_item_title' );
			$data = ob_get_clean();
			$pattern = '|<img.*src="([^"]*)".*>|';
			preg_match($pattern, $data, $matches);
			$img_tag = isset($matches[0]) ? $matches[0] : "";
			$img_url  = isset($matches[1]) ? $matches[1] : "";
			$replacement = "<div class='pic'><div class='links'><a class='fancy fa fa-eye' href='" . $img_url . "'></a></div><div class='hover-effect'></div><img src='" . $img_url . "'></div>";
			$data = preg_replace('|' . $img_tag . '|', $replacement, $data);
			echo $data;*/
woocommerce_show_product_loop_sale_flash();
$img = woocommerce_get_product_thumbnail('full');
preg_match('|<img.*src="([^"]+)".*>|', $img, $matches);
$img_url = isset($matches[1]) ? $matches[1] : "";
if (!empty($img_url)) {
    $dims = get_option('shop_catalog_image_size');
    $thumb_url = bfi_thumb($img_url, $dims);
    echo "<div class='pic'><img src='{$thumb_url}' alt /><div class='hover-effect'></div><div class='links'><a class='fancy fa fa-eye' href='{$img_url}'></a></div></div>";
    //echo "<a class='fancy fa fa-eye' href='$img_url'></a>";
}
//woocommerce_template_loop_product_thumbnail();
?>

		<h3><a href="<?php 
the_permalink();
?>
"><?php 
Exemplo n.º 8
0
    <div class="product-container">
	<?php 
do_action('woocommerce_before_shop_loop_item');
?>
    	<div class="left-block">
            <a href="<?php 
echo get_permalink();
?>
">
                <?php 
/**
 * kt_loop_product_thumbnail hook
 *
 * @hooked woocommerce_template_loop_product_thumbnail - 10
 */
echo woocommerce_get_product_thumbnail('shop_catalog_image_size');
?>
            </a>
            <div class="quick-view">
                <?php 
/**
 * kt_loop_product_function hook
 *
 * @hooked kt_get_tool_wishlish - 1
 * @hooked kt_get_tool_compare - 5
 * @hooked kt_get_tool_quickview - 10
 */
do_action('kt_loop_product_function');
?>
            </div>
            <?php 
Exemplo n.º 9
0
$loop = new WP_Query($args);
if ($loop->have_posts()) {
    while ($loop->have_posts()) {
        $loop->the_post();
        global $product;
        ?>
						<!-- single-product start -->
						<div class="col-lg-3 col-md-3">
							<div class="single-product">
								<div class="product-img">
									<a href="<?php 
        echo get_permalink();
        ?>
">
										<?php 
        echo woocommerce_get_product_thumbnail();
        ?>
										
										<span class="box-over"></span>
									</a>
									<div class="new-item"><h6>NEW</h6></div>
									<div class="price-box">
										<?php 
        echo $product->get_price_html();
        ?>
									</div>
									<div class="actions-item">
										<ul>
											<?php 
        //woocommerce_template_loop_add_to_cart( $loop->post, $product );
        ?>
Exemplo n.º 10
0
/**
 * Loop shop product thumbnail.
 *
 */
function dt_woocommerce_template_loop_product_thumbnail()
{
    echo '<span class="rollover">' . woocommerce_get_product_thumbnail() . '</span>';
}
Exemplo n.º 11
0
function woocommerce_template_loop_product_thumbnail()
{
    global $product;
    if (class_exists('woocommerce')) {
        echo '<span class="thumb">' . woocommerce_get_product_thumbnail();
        echo '</span>';
    }
}
Exemplo n.º 12
0
    /**
     * Add to Cart for product listing
     */
    public function cart_icon()
    {
        ?>

		<div class="product-thumb">

		<?php 
        echo woocommerce_get_product_thumbnail();
        wc_get_template('loop/add-to-cart.php');
        ?>

		</div>
		
		<a href="<?php 
        the_permalink();
        ?>
">
   		
		<?php 
    }
Exemplo n.º 13
0
 function oxy_woocommerce_template_loop_product_thumbnail()
 {
     global $product;
     $image_ids = $product->get_gallery_attachment_ids();
     $back_image = array_shift($image_ids);
     echo '<div class="product-image">';
     echo '<div class="product-image-front">' . woocommerce_get_product_thumbnail() . '</div>';
     if (null != $back_image) {
         $back_image = wp_get_attachment_image_src($back_image, 'shop_catalog');
         echo '<div class="product-image-back"><img src="' . $back_image[0] . '" alt=""/></div>';
     }
     echo '</div>';
 }
Exemplo n.º 14
0
 /**
  * WooCommerce Loop Product Thumbs
  *
  * @since  1.0
  *
  * @return string
  */
 function product_thumbnail()
 {
     global $product;
     $attachment_ids = $product->get_gallery_attachment_ids();
     if (count($attachment_ids) == 0) {
         echo '<span class="bb-product-thumbnails bb-thumbnail-single">';
     } else {
         echo '<span class="bb-product-thumbnails">';
     }
     echo woocommerce_get_product_thumbnail();
     if (count($attachment_ids) > 0) {
         echo wp_get_attachment_image($attachment_ids[0], 'shop_catalog');
     }
     echo '<span data-href="' . $product->get_permalink() . '" data-original-title="' . esc_attr__('Quick View', 'bigboom') . '" rel="tooltip" class="bb-quick-view"><i class="fa fa-search"></i></span>';
     echo '</span>';
 }
Exemplo n.º 15
0
/**
 * Products slider on single page product
 * @since  1.0.0
 */
function shop_isle_products_slider_on_single_page()
{
    global $wp_customize;
    $shop_isle_products_slider_single_hide = get_theme_mod('shop_isle_products_slider_single_hide');
    if (isset($shop_isle_products_slider_single_hide) && $shop_isle_products_slider_single_hide != 1) {
        echo '<hr class="divider-w">';
        echo '<section class="module module-small-bottom aya">';
    } elseif (isset($wp_customize)) {
        echo '<hr class="divider-w">';
        echo '<section class="module module-small-bottom shop_isle_hidden_if_not_customizer">';
    }
    if (isset($shop_isle_products_slider_single_hide) && $shop_isle_products_slider_single_hide != 1 || isset($wp_customize)) {
        echo '<div class="container">';
        $shop_isle_products_slider_title = get_theme_mod('shop_isle_products_slider_title', __('Exclusive products', 'shop-isle'));
        $shop_isle_products_slider_subtitle = get_theme_mod('shop_isle_products_slider_subtitle', __('Special category of products', 'shop-isle'));
        if (!empty($shop_isle_products_slider_title) || !empty($shop_isle_products_slider_subtitle)) {
            echo '<div class="row">';
            echo '<div class="col-sm-6 col-sm-offset-3">';
            if (!empty($shop_isle_products_slider_title)) {
                echo '<h2 class="module-title font-alt">' . $shop_isle_products_slider_title . '</h2>';
            }
            if (!empty($shop_isle_products_slider_subtitle)) {
                echo '<div class="module-subtitle font-serif">' . $shop_isle_products_slider_subtitle . '</div>';
            }
            echo '</div>';
            echo '</div><!-- .row -->';
        }
        $shop_isle_products_slider_category = get_theme_mod('shop_isle_products_slider_category');
        if (!empty($shop_isle_products_slider_category) && $shop_isle_products_slider_category != '-') {
            $shop_isle_products_slider_args = array('post_type' => 'product', 'posts_per_page' => 10, 'tax_query' => array(array('taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => $shop_isle_products_slider_category)));
            $shop_isle_products_slider_loop = new WP_Query($shop_isle_products_slider_args);
            if ($shop_isle_products_slider_loop->have_posts()) {
                echo '<div class="row">';
                echo '<div class="owl-carousel text-center" data-items="5" data-pagination="false" data-navigation="false">';
                while ($shop_isle_products_slider_loop->have_posts()) {
                    $shop_isle_products_slider_loop->the_post();
                    echo '<div class="owl-item">';
                    echo '<div class="col-sm-12">';
                    echo '<div class="ex-product">';
                    echo '<a href="' . get_permalink() . '">' . woocommerce_get_product_thumbnail() . '</a>';
                    echo '<h4 class="shop-item-title font-alt"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
                    echo 'L12.00';
                    echo '</div>';
                    echo '</div>';
                    echo '</div>';
                }
                wp_reset_postdata();
                echo '</div>';
                echo '</div>';
            }
        } else {
            $shop_isle_products_slider_args = array('post_type' => 'product', 'posts_per_page' => 10);
            $shop_isle_products_slider_loop = new WP_Query($shop_isle_products_slider_args);
            if ($shop_isle_products_slider_loop->have_posts()) {
                echo '<div class="row">';
                echo '<div class="owl-carousel text-center" data-items="5" data-pagination="false" data-navigation="false">';
                while ($shop_isle_products_slider_loop->have_posts()) {
                    $shop_isle_products_slider_loop->the_post();
                    echo '<div class="owl-item">';
                    echo '<div class="col-sm-12">';
                    echo '<div class="ex-product">';
                    echo '<a href="' . get_permalink() . '">' . woocommerce_get_product_thumbnail() . '</a>';
                    echo '<h4 class="shop-item-title font-alt"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
                    echo 'L12.00';
                    echo '</div>';
                    echo '</div>';
                    echo '</div>';
                }
                wp_reset_postdata();
                echo '</div>';
                echo '</div>';
            }
        }
        echo '</div>';
        echo '</section>';
    }
}
Exemplo n.º 16
0
function woocommerce_template_loop_product_thumbnail()
{
    global $dynamo_tpl;
    $output = '<figure class="product-thumb">';
    $output .= '<div class="text-overlay">';
    $output .= '<div class="info">';
    $output .= '<div class="product-thumb-links">';
    $output .= '<div class="product-thumb-links-inner">';
    $output .= '<a class="list-view-details dp-tipsy-t" data-tipcontent="View Details" href="' . get_permalink() . '"><i class="Default-eye2"></i></a>';
    $output .= '<div class="list-compare-wishlist">';
    if (class_exists('YITH_Woocompare')) {
        if (get_theme_mod('store_add_to_compare', 1) == 1 && get_option($dynamo_tpl->name . '_woocommerce_list_compare', 'Y') == 'Y') {
            $output .= do_shortcode('[yith_compare_button container="no"]');
        }
    }
    if (class_exists('YITH_WCWL_Init')) {
        if (get_theme_mod('store_add_to_wishlist', 1) == 1 && get_option($dynamo_tpl->name . '_woocommerce_list_wishlist', 'Y') == 'Y') {
            global $yith_wcwl, $product;
            $output .= DP_YITH::add_to_wishlist_button($yith_wcwl->get_wishlist_url(), $product->product_type, $yith_wcwl->is_product_in_wishlist($product->id));
        }
    }
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= woocommerce_get_product_thumbnail();
    $output .= '</figure>';
    echo $output;
}
Exemplo n.º 17
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('brand', $atts) : $atts;
        $atts = shortcode_atts(array('title' => '', 'line_brand' => '1-line', 'show_product' => 'true', 'orderby' => 'date', 'order' => 'desc', 'css_animation' => '', 'el_class' => '', 'css' => '', 'autoplay' => 'false', 'navigation' => 'false', 'margin' => 1, 'slidespeed' => 250, 'css' => '', 'css_animation' => '', 'el_class' => '', 'nav' => 'true', 'loop' => 'true', 'use_responsive' => 1, 'items_destop' => 8, 'items_tablet' => 6, 'items_mobile' => 4), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'brand ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $data_carousel = array("autoplay" => $autoplay, "navigation" => $navigation, "margin" => $margin, "slidespeed" => $slidespeed, "theme" => 'style-navigation-bottom', "autoheight" => 'false', 'nav' => 'true', 'dots' => 'false', 'loop' => $loop, 'autoplayTimeout' => 1000, 'autoplayHoverPause' => 'true');
        if ($use_responsive) {
            $arr = array('0' => array("items" => $items_mobile), '768' => array("items" => $items_tablet), '992' => array("items" => $items_destop));
            $data_responsive = json_encode($arr);
            $data_carousel["responsive"] = $data_responsive;
        } else {
            $data_carousel['items'] = 8;
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        ob_start();
        //Set up the taxonomy object and get terms
        $tax = get_taxonomy('product_brand');
        if ($tax) {
            $terms = get_terms('product_brand', array('hide_empty' => 0, 'orderby' => $orderby, 'order' => $order));
            if (!is_wp_error($terms) && count($terms) > 0) {
                if ($show_product == "true") {
                    ?>
                    <div class="brand-showcase <?php 
                    echo esc_attr($elementClass);
                    ?>
">
                        <?php 
                    if ($title) {
                        ?>
                            <h2 class="brand-showcase-title"><?php 
                        echo esc_html($title);
                        ?>
</h2>
                        <?php 
                    }
                    ?>
                        <div class="brand-showcase-box">
                            <ul class="brand-showcase-logo owl-carousel" <?php 
                    echo _data_carousel($data_carousel);
                    ?>
>
                                <?php 
                    $i = 1;
                    ?>
                                <?php 
                    foreach ($terms as $term) {
                        ?>
                                <li data-tab="showcase-<?php 
                        echo esc_attr($term->term_id);
                        ?>
" class="item<?php 
                        echo $i == 1 ? ' active' : '';
                        ?>
">
                                    <h3><?php 
                        echo esc_html($term->name);
                        ?>
</h3>
                                </li>
                                <?php 
                        $i++;
                        ?>
                                <?php 
                    }
                    ?>
                            </ul>
                            <div class="brand-showcase-content">
                                <?php 
                    $i = 1;
                    ?>
                                <?php 
                    //add_filter( 'kt_template_loop_product_thumbnail_size', array( $this, 'kt_thumbnail_size' ) );
                    ?>
                                <?php 
                    foreach ($terms as $term) {
                        ?>
                                    <div class="brand-showcase-content-tab<?php 
                        echo $i == 1 ? ' active' : '';
                        ?>
" id="showcase-<?php 
                        echo esc_attr($term->term_id);
                        ?>
">
                                        <?php 
                        $term_link = get_term_link($term);
                        $thumbnail_id = absint(get_woocommerce_term_meta($term->term_id, 'thumbnail_id', true));
                        if ($thumbnail_id) {
                            $image = wp_get_attachment_image(intval($thumbnail_id), 'full');
                        } else {
                            $image = "";
                        }
                        $meta_query = WC()->query->get_meta_query();
                        $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => 4, 'meta_query' => $meta_query, 'suppress_filter' => true, 'tax_query' => array(array('taxonomy' => 'product_brand', 'field' => 'id', 'terms' => $term->term_id, 'operator' => 'IN')));
                        $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $args, $atts));
                        if ($products->have_posts()) {
                            ?>
                                        <div class="row">
                                            <div class="col-xs-12 col-sm-4 trademark-info">
                                                <?php 
                            if ($image) {
                                ?>
                                                <div class="trademark-logo">
                                                    <a href="<?php 
                                echo esc_url($term_link);
                                ?>
">
                                                        <?php 
                                echo apply_filters('kt_brand_image_' . $term->slug, $image);
                                ?>
                                                    </a>
                                                </div>
                                                <?php 
                            }
                            ?>
                                                <div class="trademark-desc">
                                                    <?php 
                            echo esc_html($term->description);
                            ?>
                                                </div>
                                                <a href="<?php 
                            echo esc_url($term_link);
                            ?>
" class="trademark-link"><?php 
                            _e('shop this brand', 'kutetheme');
                            ?>
</a>
                                            </div>
                                            <div class="col-xs-12 col-sm-8 trademark-product">
                                                <div class="row">
                                                    <?php 
                            while ($products->have_posts()) {
                                $products->the_post();
                                $link = get_the_permalink();
                                ?>
                                                    <div class="col-xs-12 col-sm-6 product-item">
                                                        <div class="image-product hover-zoom">
                                                            <a href="<?php 
                                echo esc_url($link);
                                ?>
">
                                                                <?php 
                                /**
                                 * kt_loop_product_thumbnail hook
                                 *
                                 * @hooked woocommerce_template_loop_product_thumbnail - 10
                                 */
                                echo woocommerce_get_product_thumbnail();
                                ?>
                                                            </a>
                                                        </div>
                                                        <div class="info-product">
                                                            <a href="<?php 
                                echo esc_url($link);
                                ?>
">
                                                                <h5><?php 
                                echo esc_html(get_the_title());
                                ?>
</h5>
                                                            </a>
                                                            <div class="content_price">
                                                                <?php 
                                /**
                                 * woocommerce_after_shop_loop_item_title hook
                                 * @hooked woocommerce_template_loop_price - 5
                                 * @hooked woocommerce_template_loop_rating - 10
                                 */
                                do_action('kt_after_shop_loop_item_title');
                                ?>
                                                            </div>
                                                            <a class="btn-view-more" title="<?php 
                                _e('View More', 'kutetheme');
                                ?>
" href="<?php 
                                echo esc_url($link);
                                ?>
"><?php 
                                _e('View More', 'kutetheme');
                                ?>
</a>
                                                        </div>
                                                    </div>
                                                    <?php 
                            }
                            ?>
                                                </div>
                                            </div>
                                        </div>
                                        <?php 
                        }
                        ?>
                                        <?php 
                        wp_reset_query();
                        ?>
                                        <?php 
                        wp_reset_postdata();
                        ?>
                                    </div>
                                <?php 
                        $i++;
                        ?>
                                <?php 
                    }
                    ?>
                                <?php 
                    //remove_filter( 'kt_template_loop_product_thumbnail_size', array( $this, 'kt_thumbnail_size' ) );
                    ?>
                            </div>
                        </div>
                    </div>
                    <?php 
                } else {
                    ?>
                        <?php 
                    if ($line_brand == '2-line') {
                        ?>
                            <div class="option7">
                                <!-- ./blog list -->
                                <div class="row-brand <?php 
                        echo esc_attr($elementClass);
                        ?>
">
                                    <?php 
                        if ($title) {
                            ?>
                                        <h2 class="page-heading">
                                            <span class="page-heading-title"><?php 
                            echo esc_html($title);
                            ?>
</span>
                                        </h2>
                                    <?php 
                        }
                        ?>
                                    <ul class="band-logo no-product owl-carousel" <?php 
                        echo _data_carousel($data_carousel);
                        ?>
>
                                        <?php 
                        for ($i = 0; $i < count($terms); $i += 2) {
                            ?>
                                            <?php 
                            if (isset($terms[$i]) && $terms[$i]) {
                                ?>
                                                <?php 
                                $term = $terms[$i];
                                ?>
                                                <li>
                                                    <h3><?php 
                                echo esc_html($term->name);
                                ?>
</h3>
                                                    <?php 
                                if (isset($terms[$i + 1]) && $terms[$i + 1]) {
                                    ?>
                                                        <?php 
                                    $term_2 = $terms[$i + 1];
                                    ?>
                                                        <h3><?php 
                                    echo esc_html($term_2->name);
                                    ?>
</h3>
                                                    <?php 
                                }
                                ?>
                                                </li>
                                            <?php 
                            }
                            ?>
                                        <?php 
                        }
                        ?>
                                    </ul>
                                </div>
                                <!-- ./blog list -->
                            </div>
                        <?php 
                    } else {
                        ?>
                            <div class="<?php 
                        echo esc_attr($elementClass);
                        ?>
 band-logo no-product owl-carousel" <?php 
                        echo _data_carousel($data_carousel);
                        ?>
>
                                <?php 
                        foreach ($terms as $term) {
                            ?>
                                    <h3><?php 
                            echo esc_html($term->name);
                            ?>
</h3>
                                <?php 
                        }
                        ?>
                            </div>
                        <?php 
                    }
                    ?>
                    <?php 
                }
            }
        }
        $result = ob_get_contents();
        ob_end_clean();
        return $result;
    }
Exemplo n.º 18
0
function woocommerce_template_loop_product_thumbnail()
{
    global $product;
    $attachments = $product->get_gallery_attachment_ids();
    $active_hover = (bool) (yit_get_option('active-flip-3d') && !empty($attachments) && isset($attachments[0]));
    echo '<a href="' . get_permalink() . '" class="thumb' . ($active_hover ? ' flip' : '') . '"><span class="face">' . woocommerce_get_product_thumbnail() . '</span>';
    // add another image for hover
    if ($active_hover) {
        echo '<span class="face back">';
        yit_image("id={$attachments['0']}&size=shop_catalog&class=image-hover");
        echo '</span>';
    }
    echo '</a>';
}
 public function after_shop_loop_item()
 {
     echo '<a href="' . get_the_permalink() . '" class="product-image">';
     echo woocommerce_get_product_thumbnail('shop_catalog');
     echo '</a>';
 }
Exemplo n.º 20
0
 function ocin_lite_template_loop_product_thumbnail()
 {
     //Get if this product is portrait
     $portrait_image = get_post_meta(get_the_ID(), '_portrait_image', true);
     //Default thumbnail size for WooCommerce
     $thumbnail_size = 'shop_catalog';
     //If portrait we use a different thumbnail size if not we use default one
     //"!is_product()" is to avoid portrait images in realted product section
     if (!empty($portrait_image) && 'yes' == $portrait_image && !is_product()) {
         $thumbnail_size = 'ocin_lite_shop_catalog_portrait';
     }
     echo woocommerce_get_product_thumbnail($thumbnail_size);
     //Get one more image
     global $product;
     $attachment_ids = $product->get_gallery_attachment_ids();
     if ($attachment_ids > 0) {
         $default_attr = array('class' => "product_second_img");
         $image = wp_get_attachment_image($attachment_ids[0], $thumbnail_size, false, $default_attr);
         echo wp_kses_post($image);
     }
 }
Exemplo n.º 21
0
 function anaglyph_woo_set_products_image_size()
 {
     global $anaglyph_config;
     if ((int) $anaglyph_config['shop-product-perrow'] == 2) {
         echo woocommerce_get_product_thumbnail(array(560, 560));
     } else {
         if ((int) $anaglyph_config['shop-product-perrow'] == 3) {
             echo woocommerce_get_product_thumbnail(array(420, 420));
         } else {
             echo woocommerce_get_product_thumbnail();
         }
     }
 }
Exemplo n.º 22
0
function ss_render_sidebar_product($wp_query)
{
    $settings = get_option('shopstyler');
    echo '<h4 class="ss-promote-title">' . $settings['woo_promote_title'] . '</h4>';
    echo '<ul class="products">';
    if ($sale != '') {
        $discount = product_discount($price, $sale);
        echo '<div class="discount"><span>-' . $discount . '%</span></div>';
    }
    while ($wp_query->have_posts()) {
        $wp_query->the_post();
        $image = woocommerce_get_product_thumbnail('shop_catalog');
        $link = get_permalink(get_the_ID());
        $title = get_the_title(get_the_ID());
        $url = "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
        $escaped_url = htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
        $price = get_post_meta(get_the_ID(), '_regular_price', true);
        $sale = get_post_meta(get_the_ID(), '_sale_price', true);
        echo '<a href="' . $link . '">
			<figure>
				<li class="product-promote">';
        echo '<div class="product-container" style="display:block;">';
        //product image
        echo '<div class="product-image-promote img-' . get_the_ID() . '">';
        echo $image;
        echo '</div>';
        echo '<span class="title"><h2 class="ss-name-promote">' . $title . '</h2></span><br/>';
        echo '</div>';
        echo '<div class="product-caption">';
        //echo '<div style="float:right;width:100%;height:100%;padding:10% 20%;text-align:center!important;">';
        //echo '<a href="' . $link . '"><h2 style="font-size:1.5em!important">' .$title. '</h2>';
        echo '<span class="price">';
        if ($sale != '') {
            echo '<span class="amount amount-' . get_the_ID() . '">' . wc_price($sale) . '</span>';
        } else {
            echo '<span class="amount amount-' . get_the_ID() . '">' . wc_price($price) . '</span>';
        }
        echo '</span><br/>';
        echo '<div style="display:none" class="excerpt-' . get_the_ID() . '">' . get_the_excerpt() . '</div>';
        echo '</div>';
        //echo '</div>';
        echo '</li>
			</figure>
		</a>';
    }
    echo '</ul>';
    wp_reset_query();
}
Exemplo n.º 23
0
function product_thumbnail_with_cart_alt()
{
    ?>
	
   	

   <div class="product-wrap">
	   	<?php 
    global $product;
    echo woocommerce_get_product_thumbnail();
    ?>

	   	<div class="bg-overlay"></div>
	   	<a href="<?php 
    the_permalink();
    ?>
" class="link-overlay"></a>
	   	<div class="text-on-hover-wrap">
			<?php 
    do_action('woocommerce_after_shop_loop_item_title');
    ?>
			<?php 
    echo '<div class="categories">' . $product->get_categories() . '</div>';
    ?>
		</div> 



   	</div>
   	<h3><a href="<?php 
    the_permalink();
    ?>
"><?php 
    do_action('woocommerce_shop_loop_item_title');
    ?>
</a></h3>
   	<?php 
    woocommerce_get_template('loop/add-to-cart.php');
}
Exemplo n.º 24
0
function woocommerce_template_loop_product_thumbnail()
{
    global $product, $yit_products_layout, $woocommerce_loop;
    $attachments = $product->get_gallery_attachment_ids();
    $original_size = wc_get_image_size('shop_catalog');
    if ($woocommerce_loop['view'] == 'masonry_item') {
        $size = $original_size;
        $size['height'] = 0;
        YIT_Registry::get_instance()->image->set_size('shop_catalog', $size);
    }
    echo '<div class="thumb-wrapper ' . $yit_products_layout . '">';
    switch ($yit_products_layout) {
        case 'slideup':
            echo '<a href="' . get_permalink() . '" class="thumb">' . woocommerce_get_product_thumbnail() . '</a>';
            echo '<div class="quick-view' . (yit_get_option('shop-use-quick-view') == 'no' ? ' none' : '') . '" data-product_id="' . esc_attr($product->id) . '">';
            if (yit_get_option('shop-use-quick-view') == 'yes') {
                $sc_index = function_exists('YIT_Shortcodes') && YIT_Shortcodes()->is_inside ? '-' . YIT_Shortcodes()->index() : '';
                echo '<a id="quick-view-trigger-' . esc_attr($product->id) . $sc_index . '" href="#" class="trigger" data-item_id="' . $product->id . '">+ ' . yit_get_option('shop-quick-view-text') . '</a>';
            } elseif (yit_get_option('shop-add-to-cart') == 'yes') {
                if (!$product->is_in_stock()) {
                    echo '<p>' . __('Out of stock', 'yit') . '</p>';
                } elseif ($product->product_type == 'simple') {
                    echo '<p>' . yit_get_option('shop-add-to-cart-text') . '</p>';
                } elseif ($product->product_type == 'grouped' || $product->product_type == 'variable') {
                    echo '<p>' . __('View options', 'yit') . '</p>';
                } else {
                    echo '<p>' . __('Read more', 'yit') . '</p>';
                }
            }
            do_action('yith_add_to_cart_button');
            echo '</div>';
            break;
        case 'classic':
            if (isset($attachments[0])) {
                echo '<a href="' . get_permalink() . '" class="thumb backface"><span class="face">' . woocommerce_get_product_thumbnail() . '</span>';
                echo '<span class="face back">';
                yit_image("id={$attachments['0']}&size=shop_catalog&class=image-hover");
                echo '</span></a>';
            } else {
                echo '<a href="' . get_permalink() . '" class="thumb"><span class="face">' . woocommerce_get_product_thumbnail() . '</span></a>';
            }
            break;
    }
    echo '</div>';
    if ($woocommerce_loop['view'] == 'masonry_item') {
        YIT_Registry::get_instance()->image->set_size('shop_catalog', $original_size);
    }
}
 /**
  * wrap the product thumbnails in div.product-thumbnail
  */
 function woocommerce_template_loop_product_thumbnail()
 {
     echo '<div class="product-thumbnail">' . woocommerce_get_product_thumbnail() . '</div>';
 }
Exemplo n.º 26
0
<div id="image-slider" class="owl-carousel">
    <?php 
$args = array('posts_per_page' => 16, 'post_type' => 'product', 'cat' => '', 'orderby' => 'post_date', 'post_status' => 'publish');
$product_carousel_query = new WP_Query($args);
if ($product_carousel_query->have_posts()) {
    while ($product_carousel_query->have_posts()) {
        $product_carousel_query->the_post();
        ?>
    <div class="item">
        <a href="<?php 
        echo esc_url(get_permalink());
        ?>
">
            <?php 
        if (has_post_thumbnail()) {
            echo woocommerce_get_product_thumbnail('shop_catalog');
        }
        ?>
        </a>
        <div class="carousel-caption">
            <?php 
        the_title(sprintf('<h6 class="product-title"><a href="%s">', esc_url(get_permalink())), '</a></h6>');
        ?>
            <?php 
        echo woocommerce_get_template('loop/price.php');
        ?>
            <?php 
        echo '<p>' . wp_trim_excerpt() . '</p>';
        ?>
        </div>
    </div>
 function woocommerce_template_loop_product_thumbnail()
 {
     echo woocommerce_get_product_thumbnail();
 }
Exemplo n.º 28
0
function woocommerce_template_loop_product_thumbnail()
{
    printf('<span class="et_shop_image">%1$s<span class="et_overlay"></span></span>', woocommerce_get_product_thumbnail());
}
Exemplo n.º 29
0
					<div class="kleo-carousel-items kleo-carousel-products" data-min-items="1" data-max-items="1">
						<ul class="kleo-carousel">

							<?php 
if (has_post_thumbnail()) {
    ?>
							
								<?php 
    //Get the Thumbnail URL
    $src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), false, '');
    ?>

								<li>
									<div class="kleo-product-image" itemprop="image">
									<?php 
    echo woocommerce_get_product_thumbnail('shop_single');
    ?>
									</div>
								</li>

							<?php 
}
?>
	

							<?php 
if ($attachment_ids) {
    foreach ($attachment_ids as $attachment_id) {
        $image_link = wp_get_attachment_url($attachment_id);
        if (!$image_link) {
            continue;
Exemplo n.º 30
-2
function ss_loop_image()
{
    $image_url = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID()));
    ?>
	<div class="product-image img-<?php 
    echo get_the_ID();
    ?>
  animated zoomIn" style="text-align:center">
		<a href="<?php 
    echo $image_url;
    ?>
" data-lightbox="lbimage-<?php 
    echo get_the_ID();
    ?>
" data-title="<?php 
    echo get_the_title();
    ?>
" class="lbimg-<?php 
    echo get_the_ID();
    ?>
"><?php 
    echo woocommerce_get_product_thumbnail('shop_catalog');
    ?>
</a>
		
		<?php 
    do_action('ss_loop_after_product_image');
    ?>
		
	</div>
	<?php 
}