},
            next	: {
                button	: "#slider-next",
                key		: "right"
            },
            //width   : <?php 
    echo yit_shop_single_w() + 18;
    ?>
,
            scroll : {
                items     : 1,
                pauseOnHover: true
            },
            items   : {
                //width: <?php 
    echo yit_shop_thumbnail_w() + 4;
    ?>
,
                visible: <?php 
    echo apply_filters('woocommerce_product_thumbnails_columns', $slider_items);
    ?>
            },
			swipe : {
				onTouch: 	true,
				onMouse:	true
			},
			mousewheel : {
				items: 1
			}
        },
예제 #2
0
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.3
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $woocommerce, $product;
?>
<div class="thumbnails nomagnifier"><?php 
$attachments = $product->get_gallery_attachment_ids();
if ($attachments) {
    $loop = 0;
    $columns = apply_filters('woocommerce_product_thumbnails_columns', floor(yit_shop_single_w() / yit_shop_thumbnail_w()));
    foreach ($attachments as $attachment_id) {
        $attachment = get_post($attachment_id);
        if (get_post_meta($attachment_id, '_woocommerce_exclude_image', true) == 1) {
            continue;
        }
        $classes = array('zoom');
        if ($loop == 0 || $loop % $columns == 0) {
            $classes[] = 'first';
        }
        if (($loop + 1) % $columns == 0) {
            $classes[] = 'last';
        }
        echo apply_filters('woocommerce_single_product_image_thumbnail_html', sprintf('<a href="%s" title="%s" data-rel="prettyPhoto[product-gallery]" class="%s">%s</a>', wp_get_attachment_url($attachment->ID), esc_attr($attachment->post_title), implode(' ', $classes), yit_image("id={$attachment->ID}&size=" . apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'), false)));
        $loop++;
    }
<?php

/**
 * Single Product Image
 *
 * @author 		YIThemes
 * @package 	YITH_Magnifier/Templates
 * @version     1.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $product, $woocommerce;
$columns = floor((yit_shop_single_w() + 16) / (yit_shop_thumbnail_w() + 16));
$attachment_ids = $product->get_gallery_attachment_ids();
// add featured image
if (!empty($attachment_ids)) {
    array_unshift($attachment_ids, get_post_thumbnail_id());
}
$enable_slider = (bool) (get_option('yith_wcmg_enableslider') == 'yes' && count($attachment_ids) > $columns);
if ($attachment_ids) {
    ?>
    <div class="thumbnails <?php 
    echo $enable_slider ? 'slider' : 'noslider';
    ?>
">
        <ul class="clearfix yith_magnifier_gallery">
            <?php 
    $loop = 0;
    $columns = apply_filters('woocommerce_product_thumbnails_columns', $columns);
예제 #4
0
function yit_size_images_style() {
    $content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870;
    ?>
    <style type="text/css">
        ul.products li.product.list {
            padding-left: <?php echo yit_shop_small_w() + 30 + 7 + 2; ?>px
        }

        ul.products li.product.list .product-thumbnail {
            margin-left: -<?php echo yit_shop_small_w() + 30 + 7 + 2; ?>px
        }

        .widget.widget_onsale li,
        .widget.widget_best_sellers li,
        .widget.widget_recent_reviews li,
        .widget.widget_recent_products li,
        .widget.widget_random_products li,
        .widget.widget_featured_products li,
        .widget.widget_top_rated_products li,
        .widget.widget_recently_viewed_products li {
            min-height: <?php echo yit_shop_thumbnail_h() ?>px
        }

        .widget.widget_onsale li .star-rating,
        .widget.widget_best_sellers li .star-rating,
        .widget.widget_recent_reviews li .star-rating,
        .widget.widget_recent_products li .star-rating,
        .widget.widget_random_products li .star-rating,
        .widget.widget_featured_products li .star-rating,
        .widget.widget_top_rated_products li .star-rating,
        .widget.widget_recently_viewed_products li .star-rating {
            margin-left: <?php echo yit_shop_thumbnail_w() + 15 ?>px
        }

            /* IE8, Portrait tablet to landscape and desktop till 1024px */
        .single-product div.images {
            width: <?php echo ( yit_shop_large_w() - 20 ) / 870 * 100 ?>%;
        }

        .single-product div.summary {
            width: <?php echo 96 - ( ( yit_shop_large_w() + 2 ) / 870 * 100 ) ?>%;
        }

            /* WooCommerce standard images */
        .single-product .images .thumbnails > a {
            width: <?php echo min( yit_shop_thumbnail_w(), 80 ) ?>px !important;
            height: <?php echo min( yit_shop_thumbnail_h(), 80 ) ?>px !important;
        }

            /* Slider images */
        .single-product .images .thumbnails li img {
            max-width: <?php echo min( yit_shop_thumbnail_w(), 80 ) ?>px !important;
        }

            /* Desktop above 1200px */
        @media (min-width:1200px) {
        <?php
        $single_product_image = get_option( 'shop_single_image_size' );
        $hard_crop_sp_image = $single_product_image['crop'];

        if( $hard_crop_sp_image ) :
        ?>
            .single-product div.images .yith_magnifier_zoom_wrap a img,
            .single-product div.images > a img {
                width: <?php echo yit_shop_large_w() ?>px;
                height: <?php echo yit_shop_large_h() ?>px;
            }

        <?php
        endif;
        ?>
            /* WooCommerce standard images */
            .single-product .images .thumbnails > a {
                width: <?php echo min( yit_shop_thumbnail_w(), 100 ) ?>px !important;
                height: <?php echo min( yit_shop_thumbnail_h(), 100 ) ?>px !important;
            }

            /* Slider images */
            .single-product .images .thumbnails li img {
                max-width: <?php echo min( yit_shop_thumbnail_w(), 100 ) ?>px !important;
            }
        }

            /* Desktop above 1200px */
        @media (max-width: 979px) and (min-width: 768px) {
            /* WooCommerce standard images */
            .single-product .images .thumbnails > a {
                width: <?php echo min( yit_shop_thumbnail_w(), 63 ) ?>px !important;
                height: <?php echo min( yit_shop_thumbnail_h(), 63 ) ?>px !important;
            }

            /* Slider images */
            .single-product .images .thumbnails li img {
                max-width: <?php echo min( yit_shop_thumbnail_w(), 63 ) ?>px !important;
            }
        }

        <?php if( yit_get_option( 'responsive-enabled' ) ) : ?>
            /* Below 767px, mobiles included */
        @media (max-width: 767px) {
            .single-product div.images,
            .single-product div.summary {
                float: none;
                margin-left: 0px !important;
                width: 100% !important;
            }

            .single-product div.images {
                margin-bottom: 20px;
            }

            /* WooCommerce standard images */
            .single-product .images .thumbnails > a {
                width: <?php echo min( yit_shop_thumbnail_w(), 65 ) ?>px !important;
                height: <?php echo min( yit_shop_thumbnail_h(), 65 ) ?>px !important;
            }

            /* Slider images */
            .single-product .images .thumbnails li img {
                max-width: <?php echo min( yit_shop_thumbnail_w(), 65 ) ?>px !important;
            }
        }

        <?php endif ?>
    </style>
<?php
}