Example #1
0
            <?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' );
            ?>
        </div>

        <?php if ( $woocommerce_loop['layout'] == 'classic' && yit_get_option('shop-view-show-shadow') ) : ?>
            <div class="product-shadow"></div>
        <?php endif; ?>

        <div class="product-meta" <?php if ($woocommerce_loop['view'] == 'list') echo 'style="width: ' . yit_shop_small_w() . 'px;"'; ?>>
            <?php if ( yit_get_option('shop-view-show-title') ): ?>
                <h3<?php echo $title_class ?>><?php the_title(); ?></h3>
            <?php endif ?>

            <?php
            /**
             * woocommerce_after_shop_loop_item_title hook
             *
             * @hooked woocommerce_template_loop_price - 10
             */
            do_action( 'woocommerce_after_shop_loop_item_title' );
            ?>
        </div>

        <?php do_action( 'woocommerce_after_shop_loop_item' ); ?>
Example #2
0
					$sc_special_offers = '[show_products per_page="' . $per_page . '" category="0" show="onsale" orderby="' . $orderby . '" order="' . $order . '" layout="default" ]';
			}
		?>
	</ul>
	<div class="border-box group">
		<div id="must-have" class="panel group"><?php echo do_shortcode( $sc_must_have ); ?></div>
		<div id="best-seller" class="panel group"><?php echo do_shortcode( $sc_best_seller ); ?></div>
		<div id="special-offers" class="panel group"><?php echo do_shortcode( $sc_special_offers ); ?></div>
	</div>
</div>

<script type="text/javascript" charset="utf-8">
<?php global $woocommerce_loop;

$content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870;
    $product_width = yit_shop_small_w() + 10 + 2; // 10 = padding & 2 = border

    $c                           = floor( $content_width / $product_width );
    $columns                     = $c;
    $woocommerce_loop['columns'] = $columns;

    ?>
jQuery(function($){
	var carouFredSel;
	var carouFredSelOptions = {
		responsive: false,
		auto: true,
		items: <?php echo empty( $woocommerce_loop['columns'] ) ? 0 : $woocommerce_loop['columns'] ?>,
		circular: true,
		infinite: true,
		debug: false,
Example #3
0
do_action('woocommerce_before_shop_loop_item_title');
?>
  
        </div>    
        
        <?php 
if ($woocommerce_loop['layout'] == 'classic' && yit_get_option('shop-view-show-shadow')) {
    ?>
        <div class="product-shadow"></div>
        <?php 
}
?>

        <div class="product-meta" <?php 
if ($woocommerce_loop['view'] == 'list') {
    echo 'style="width: ' . yit_shop_small_w() . 'px;"';
}
?>
>
    		<?php 
if (yit_get_option('shop-view-show-title')) {
    ?>
    			<h3<?php 
    echo $title_class;
    ?>
><?php 
    the_title();
    ?>
</h3>
    		<?php 
}
Example #4
0
		<div id="best-seller" class="panel group"><?php 
echo do_shortcode($sc_best_seller);
?>
</div>
		<div id="special-offers" class="panel group"><?php 
echo do_shortcode($sc_special_offers);
?>
</div>
	</div>
</div>

<script type="text/javascript" charset="utf-8">
<?php 
global $woocommerce_loop;
$content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870;
$product_width = yit_shop_small_w() + 10 + 2;
// 10 = padding & 2 = border
$c = floor($content_width / $product_width);
$columns = $c;
$woocommerce_loop['columns'] = $columns;
?>
jQuery(function($){
	var carouFredSel;
	var carouFredSelOptions = {
		responsive: false,
		auto: true,
		items: <?php 
echo empty($woocommerce_loop['columns']) ? 0 : $woocommerce_loop['columns'];
?>
,
		circular: true,
Example #5
0
    function yit_get_product_slider_items() {

        $product_width = yit_shop_small_w() + 10 + 2;


            if ( yit_get_sidebar_layout() == 'sidebar-no' ) {
                if ( $product_width >= 0 && $product_width < 120 ) {
                    return 12;
                }
                elseif ( $product_width >= 120 && $product_width < 220 ) {
                    return 6;
                }
                elseif ( $product_width >= 220 && $product_width < 320 ) {
                    return 4;
                }
                elseif ( $product_width >= 320 && $product_width < 470 ) {
                    return 3;
                }
                elseif ( $product_width >= 470 && $product_width < 620 ) {
                    return 2;
                }
                else {
                    return 1;
                }

            }
            else {
                if ( $product_width >= 0 && $product_width < 150 ) {
                    return 9;
                }
                elseif ( $product_width >= 150 && $product_width < 200 ) {
                    return 4;
                }
                elseif ( $product_width >= 200 && $product_width < 620 ) {
                    return 3;
                }
                else {
                    $is_span = false;
                }
            }
    }
Example #6
0
function yit_print_image_responsive_enabled_variables()
{
    global $woocommerce_loop, $yit_is_feature_tab;
    $content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870;
    if (isset($yit_is_feature_tab) && $yit_is_feature_tab) {
        $content_width -= 300;
    }
    $product_width = yit_shop_small_w() + 10 + 2;
    // 10 = padding & 2 = border
    $is_span = false;
    if (get_option('woocommerce_responsive_images') == 'yes') {
        $is_span = true;
        if (yit_get_sidebar_layout() == 'sidebar-no') {
            if ($product_width >= 0 && $product_width < 120) {
                $woocommerce_loop['li_class'][] = 'span1';
                $woocommerce_loop['columns'] = 12;
            } elseif ($product_width >= 120 && $product_width < 220) {
                $woocommerce_loop['li_class'][] = 'span2';
                $woocommerce_loop['columns'] = 6;
            } elseif ($product_width >= 220 && $product_width < 320) {
                $woocommerce_loop['li_class'][] = 'span3';
                $woocommerce_loop['columns'] = 4;
            } elseif ($product_width >= 320 && $product_width < 470) {
                $woocommerce_loop['li_class'][] = 'span4';
                $woocommerce_loop['columns'] = 3;
            } elseif ($product_width >= 470 && $product_width < 620) {
                $woocommerce_loop['li_class'][] = 'span6';
                $woocommerce_loop['columns'] = 2;
            } else {
                $is_span = false;
            }
        } else {
            if ($product_width >= 0 && $product_width < 150) {
                $woocommerce_loop['li_class'][] = 'span1';
                $woocommerce_loop['columns'] = 12;
            } elseif ($product_width >= 150 && $product_width < 620) {
                $woocommerce_loop['li_class'][] = 'span3';
                $woocommerce_loop['columns'] = 3;
            } else {
                $is_span = false;
            }
        }
    } else {
        $grid = yit_get_span_from_width($product_width);
        $woocommerce_loop['li_class'][] = 'span' . $grid;
        $product_width = yit_width_of_span($grid);
    }
    if ($yit_is_feature_tab || !$is_span) {
        $woocommerce_loop['columns'] = floor(($content_width + 30) / ($product_width + 30));
    }
    ?>
    <script type="text/javascript">
        var elastislide_defaults = {
            imageW              : <?php 
    echo get_option('woocommerce_responsive_images') == 'no' || !get_option('woocommerce_responsive_images') ? yit_shop_small_w() + 10 + 2 : '"100%"';
    ?>
,
            border              : 0,
            margin              : 0,
            preventDefaultEvents: false,
            infinite            : true,
            slideshowSpeed      : 3500
        };

        var carouFredSelOptions_defaults = {
            responsive: false,
            auto      : true,
            items     : <?php 
    echo empty($woocommerce_loop['columns']) ? 0 : $woocommerce_loop['columns'];
    ?>
,
            circular  : true,
            infinite  : true,
            debug     : false,
            prev      : '.es-nav .es-nav-prev',
            next      : '.es-nav .es-nav-next',
            swipe     : {
                onTouch: false
            },
            scroll    : {
                items       : 1,
                pauseOnHover: true
            }
        };


    </script>
<?php 
}