Ejemplo n.º 1
2
        public function widget($args, $instance)
        {
            extract($args);
            extract($instance);
            $title = apply_filters('widget_title', $title);
            echo $before_widget;
            echo $before_title . $title . $after_title;
            $loop = pgl_woocommerce_query('deals', 1);
            ?>

                <div class="woocommerce">
                    <div class="inner-content">  
                            <?php 
            if ($loop->have_posts()) {
                while ($loop->have_posts()) {
                    $loop->the_post();
                    wc_get_template_part('content', 'product-deals');
                }
            }
            ?>
                    </div>
                </div>
            <?php 
            wp_reset_query();
            echo $after_widget;
        }
Ejemplo n.º 2
0
    <?php 
extract($atts);
$deals = array();
$loop = pgl_woocommerce_query('deals', $number);
$_id = pgl_make_id();
?>

<div class="woocommerce">
    <div class="inner-content">   
        <?php 
if ($title != '') {
    ?>
            <h3 class="widget-title">
                <span><?php 
    echo $title;
    ?>
</span>
            </h3>
        <?php 
}
?>
        <?php 
if ($loop->have_posts()) {
    while ($loop->have_posts()) {
        $loop->the_post();
        global $product;
        $time_sale = get_post_meta($product->id, '_sale_price_dates_to', true);
        ?>
                        <div class="product-block product-grid product">
                            <div class="product-image">
Ejemplo n.º 3
0
<?php

extract(shortcode_atts(array('el_class' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
$loop = pgl_woocommerce_query('deals', 1);
$_id = pgl_make_id();
?>

<div class="woocommerce<?php 
echo esc_attr($el_class);
?>
">
    <div class="inner-content">  
            <?php 
if ($loop->have_posts()) {
    while ($loop->have_posts()) {
        $loop->the_post();
        wc_get_template_part('content', 'product-deals');
    }
}
?>
    </div>
</div>
<?php 
wp_reset_query();
    case '3':
        $class_column = 'col-sm-4 col-xs-6';
        break;
    case '2':
        $class_column = 'col-sm-6 col-xs-6';
        break;
    default:
        $class_column = 'col-sm-12 col-xs-6';
        break;
}
$_id = pgl_make_id();
if ($category == '') {
    return;
}
$_count = 1;
$loop = pgl_woocommerce_query('', $number, $category);
if ($loop->have_posts()) {
    ?>
	<?php 
    $_total = $loop->found_posts;
    ?>
	<div class="woocommerce<?php 
    echo esc_attr($el_class);
    ?>
">
		<div class="inner-content">
			<?php 
    wc_get_template('product-layout/' . $style . '.php', array('show_rating' => true, '_id' => $_id, 'loop' => $loop, 'columns_count' => $columns_count, 'class_column' => $class_column, '_total' => $_total, 'number' => $number));
    ?>
		</div>
	</div>
Ejemplo n.º 5
0
        break;
    default:
        $class_column = 'col-lg-12 col-md-12 col-sm-12 col-xs-6';
        break;
}
if ($type == '') {
    return;
}
global $woocommerce;
$_id = pgl_make_id();
$_count = 1;
$show_rating = false;
if ($type == 'top_rate') {
    $show_rating = true;
}
$loop = pgl_woocommerce_query($type, $number);
if ($loop->have_posts()) {
    ?>

	<?php 
    $_total = $loop->found_posts;
    ?>
    <div class="woocommerce<?php 
    echo $el_class != '' ? ' ' . $el_class : '';
    ?>
">
		<div class="inner-content">
			<?php 
    wc_get_template('product-layout/' . $style . '.php', array('show_rating' => $show_rating, '_id' => $_id, 'loop' => $loop, 'columns_count' => $columns_count, 'class_column' => $class_column, '_total' => $_total, 'number' => $number));
    ?>
		</div>