// 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';
}
$count = $product->get_rating_count();
$chairman_shopclass = Chairman::chairman_shop_class('');
if ($chairman_shopclass == 'shop-fullwidth') {
    if (isset($chairman_opt)) {
        $woocommerce_loop['columns'] = $chairman_opt['product_per_row_fw'];
        $colwidth = round(12 / $woocommerce_loop['columns']);
    }
    $classes[] = ' item-col col-xs-12 col-sm-4 col-md-' . $colwidth;
} else {
    if (isset($chairman_opt)) {
        $woocommerce_loop['columns'] = $chairman_opt['product_per_row'];
        $colwidth = round(12 / $woocommerce_loop['columns']);
    }
    $classes[] = ' item-col col-xs-12 col-sm-' . $colwidth;
}
?>
Пример #2
0
$shopsidebar = 'left';
if (isset($chairman_opt['sidebarshop_pos']) && $chairman_opt['sidebarshop_pos'] != '') {
    $shopsidebar = $chairman_opt['sidebarshop_pos'];
}
if (isset($_GET['sidebar']) && $_GET['sidebar'] != '') {
    $shopsidebar = $_GET['sidebar'];
}
switch ($shoplayout) {
    case 'fullwidth':
        Chairman::chairman_shop_class('shop-fullwidth');
        $shopcolclass = 12;
        $shopsidebar = 'none';
        $productcols = 4;
        break;
    default:
        Chairman::chairman_shop_class('shop-sidebar');
        $shopcolclass = 9;
        $productcols = 3;
}
$chairman_viewmode = Chairman::chairman_show_view_mode();
?>
<div class="main-container">
	<div class="page-content"> 
		<div class="shop-desc <?php 
echo esc_attr($shoplayout);
?>
">
			<div class="shop_header">
				<div class="container">
					<div class="shop-desc-inner">
						<?php