• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP woocommerce_template_loop_price函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中woocommerce_template_loop_price函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_template_loop_price函数的具体用法?PHP woocommerce_template_loop_price怎么用?PHP woocommerce_template_loop_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了woocommerce_template_loop_price函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: dokan_product_loop_price

/**
 * Renders item-bar of products in the loop
 *
 * @global WC_Product $product
 */
function dokan_product_loop_price()
{
    global $product;
    ?>
    <span class="item-bar">

        <?php 
    woocommerce_template_loop_price();
    ?>

        <span class="item-button">
            <?php 
    woocommerce_template_loop_add_to_cart();
    ?>
            <?php 
    if (function_exists('dokan_add_to_wishlist_link')) {
        dokan_add_to_wishlist_link();
    }
    ?>
        </span>
    </span>
    <?php 
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:28,代码来源:wc-template.php


示例2: show_desc

/**
 * Product loop desc
 */
function show_desc()
{
    echo '<div class="product-item__desc">';
    echo woocommerce_template_loop_product_title();
    echo woocommerce_template_loop_price();
    echo '</div>';
}
开发者ID:aguynamedirvin,项目名称:fc_wp,代码行数:10,代码来源:woocommerce.php


示例3: waxom_woocommerce_product_details

function waxom_woocommerce_product_details()
{
    echo '<div class="vntd-product-excerpt">';
    echo waxom_excerpt(20, false);
    echo '</div>';
    echo '<div class="vntd-product-details btn btn-style-default btn-dark btn-icon accent-hover-bg"><i class="fa fa-file-text-o"></i>' . esc_html__('View Details', 'waxom') . '</div>';
    echo '<div class="vntd-product-price">';
    woocommerce_template_loop_price();
    echo '<div class="vntd-product-rating">';
    woocommerce_template_loop_rating();
    echo '</div>';
    echo '</div>';
    echo '</div>';
    // End details
}
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:15,代码来源:config.php


示例4: thb_loop_product_end

 function thb_loop_product_end()
 {
     global $post, $product;
     $size = sizeof(get_the_terms($post->ID, 'product_cat'));
     echo $product->get_categories(', ', '<span class="posted_in">' . _n('', '', $size, 'woocommerce') . ' ', '</span>');
     woocommerce_template_loop_rating();
     echo '<div class="thb-add-to-cart-wrapper">';
     woocommerce_template_loop_price();
     woocommerce_template_loop_add_to_cart();
     echo "</div>";
     echo "</div>";
 }
开发者ID:alfredpp,项目名称:sarath-portfolio,代码行数:12,代码来源:theme-woocommerce.php


示例5: dt_woocommerce_shop_overview_extra_div_close

		function dt_woocommerce_shop_overview_extra_div_close() {
			global $product;

			$link = apply_filters( 'out_of_stock_add_to_cart_url', get_permalink( $product->id ) );
			
			ob_start();
			woocommerce_template_loop_price();
			$price = ob_get_clean();

			ob_start();
			woocommerce_template_loop_add_to_cart();
			$add_to_cart = ob_get_clean();

			if( !empty($add_to_cart) ) {
				$add_to_cart = str_replace(' class="',' class="small button ',$add_to_cart);
			}

			echo "		<div class='product-details'>";
			echo 		$price;
			echo "		<div class='product-buttons'>";
			echo 			$add_to_cart;
							if ( shortcode_exists( 'yith_wcwl_add_to_wishlist' ) )
							echo  do_shortcode('[yith_wcwl_add_to_wishlist]');	
			echo "		</div>";			
			echo "		</div>";
			echo '	</div>';
			echo '</div>';
		}
开发者ID:namnguyen2312,项目名称:spa,代码行数:28,代码来源:index.php


示例6: grve_woo_after_shop_loop_item

/**
 * Function to add after shop loop item
 */
function grve_woo_after_shop_loop_item()
{
    ?>
			<div class="grve-product-options">
				<?php 
    woocommerce_template_loop_rating();
    ?>
				<?php 
    woocommerce_template_loop_add_to_cart();
    ?>
			</div>
		</div>
		<div class="grve-product-content">
			<span class="grve-product-name"><a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a></span>
			<span class="grve-product-price"><?php 
    woocommerce_template_loop_price();
    ?>
</span>
		</div>
	</div>
<?php 
}
开发者ID:poweronio,项目名称:mbsite,代码行数:31,代码来源:grve-woocommerce-functions.php


示例7: content

    protected function content($atts, $content = null)
    {
        $class_col = null;
        extract(shortcode_atts(array('num_cols' => '2', 'num_posts' => '12', 'products_type' => '1', 'slugs' => 'web-design,logo-design,illustration'), $atts));
        // $width_class = '';
        // $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $width_class, $this->settings['base'], $atts );
        switch ($num_cols) {
            case '2':
                $class_col = 'two_col';
                break;
            case '3':
                $class_col = 'three_col';
                break;
            case '4':
                $class_col = 'four_col';
                break;
            default:
                $class_col = 'four_col';
                break;
        }
        $args = array('post_type' => 'product', 'posts_per_page' => $num_posts);
        if ($products_type == '2') {
            $args = array('post_type' => 'product', 'posts_per_page' => $num_posts, 'meta_query' => array('relation' => 'OR', array('key' => '_sale_price', 'value' => 0, 'compare' => '>', 'type' => 'numeric'), array('key' => '_min_variation_sale_price', 'value' => 0, 'compare' => '>', 'type' => 'numeric')));
        }
        if ($products_type == '3') {
            $args = array('post_type' => 'product', 'meta_key' => '_featured', 'meta_value' => 'yes', 'posts_per_page' => $num_posts);
        }
        if ($products_type == '4') {
            $cat_slugs = explode(',', $slugs);
            $args = array('posts_per_page' => $num_posts, 'tax_query' => array('relation' => 'AND', array('taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $cat_slugs)), 'post_type' => 'product');
        }
        ob_start();
        ?>

		<div class="framed_wrapper_products">
			<?php 
        $products_loop = new WP_Query($args);
        if ($products_loop->have_posts()) {
            while ($products_loop->have_posts()) {
                $products_loop->the_post();
                global $product, $post;
                $cat_count = sizeof(get_the_terms($post->ID, 'product_cat'));
                $attachment_id = $product->get_gallery_attachment_ids();
                ?>

			<div class="framed_woo_product <?php 
                echo esc_attr($class_col);
                ?>
">
				<div class="framed_img">
					<a href="<?php 
                the_permalink();
                ?>
">
						<?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');
                ?>
					</a>
				</div>
				<div class="framed_wrap_content">
					<div>
						<?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), esc_html($product->add_to_cart_text())), $product);
                ?>
						<a href="<?php 
                the_permalink();
                ?>
"><?php 
                _e('View More', THEME_NAME);
                ?>
</a>
					</div>
					<div class="framed_content">
						<div>
							<h3><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></h3>
							<p><?php 
                echo apply_filters('the_content', $product->get_categories(', ', '<span class="posted_in">' . _n('', '', $cat_count, 'woocommerce') . ' ', '.</span>'));
                ?>
</p>
						</div>
						<div>
							<?php 
                woocommerce_template_loop_price();
                ?>
						</div>
					</div>
				</div>
			</div>
//.........这里部分代码省略.........
开发者ID:estrategasdigitales,项目名称:Dagutorio,代码行数:101,代码来源:woocommerce-framed-products.php


示例8: widget

        function widget($args, $instance)
        {
            extract($args);
            $title = apply_filters('widget_title', empty($instance['title_popular']) ? __('Hot Products', 'wpdance') : $instance['title_popular']);
            $num_popular = empty($instance['num_popular']) ? 5 : absint($instance['num_popular']);
            $post_type = "product";
            $thumbnail_width = 60;
            $thumbnail_height = 60;
            $output = $before_widget;
            if ($title) {
                $output .= $before_title . $title . $after_title;
            }
            echo $output;
            wp_reset_query();
            $popular = new wp_query(array('post_type' => 'product', 'posts_per_page' => $num_popular, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'order' => 'DESC'));
            global $post, $product;
            ?>
			<?php 
            if ($popular->post_count > 0) {
                $i = 0;
                $id_widget = 'hot_product-' . rand(0, 1000) . time();
                ?>
			<ul class="popular-post-list<?php 
                echo $id_widget;
                ?>
">
				<?php 
                while ($popular->have_posts()) {
                    $popular->the_post();
                    ?>
				<li>
					<div class="wd_hot_product_wrapper">
						<div class="image image-style">
							<a class="thumbnail" href="<?php 
                    echo get_permalink($post->ID);
                    ?>
">
								<?php 
                    if (has_post_thumbnail()) {
                        the_post_thumbnail('wd_hot_product', array('title' => esc_attr(get_the_title()), 'alt' => esc_attr(get_the_title())));
                    }
                    ?>
							</a>		
							<span class="shadow"></span>
						</div><!-- .image -->
						<?php 
                    $product = get_product($popular->post);
                    ?>
						<div class="detail">
							<p class="hot_pr_sku"><?php 
                    echo $product->get_sku();
                    ?>
</p>
							<p class="title"><a  href="<?php 
                    echo get_permalink($post->ID);
                    ?>
"><?php 
                    echo esc_attr(get_the_title($post->ID));
                    ?>
</a></p>
							<?php 
                    //the_excerpt();
                    ?>
							<?php 
                    woocommerce_template_loop_price();
                    ?>
						</div>
					</div>
				</li>
				<?php 
                }
                ?>
			</ul>
			<?php 
                echo '<div class="clearfix"></div>';
                echo '<div class="wd_hot_control"><a class="prev" title="prev" id="wd_hot_product_prev_' . $id_widget . '" href="#">&lt;</a>';
                echo '<a class="next" title="next" id="wd_hot_product_next_' . $id_widget . '" href="#" >&gt;</a> </div>';
            }
            ?>
			
			<script type="text/javascript" language="javascript">
		//<![CDATA[
			jQuery(document).ready(function() {
				
				var li_widget = jQuery('.popular-post-list<?php 
            echo $id_widget;
            ?>
').parent().parent('li');
				var temp_class = '';
				if(li_widget.hasClass('first')){ 
					temp_class = '.first';
				}
				
				_slider_datas = {				
					responsive: true
					,width	: 240
					,height	: 'auto'
					,scroll  : {
						items	: 1,
					}
//.........这里部分代码省略.........
开发者ID:proj-2014,项目名称:vlan247-test-wp2,代码行数:101,代码来源:hot_product.php


示例9: widget


//.........这里部分代码省略.........
                    $product = wc_get_product($post->ID);
                    ?>
						<?php 
                    if ($count % $row == 0) {
                        ?>
						<div class="per-slide">
							<ul class="product_list_widget">
						<?php 
                    }
                    ?>
							<li>
								<a class="ts-wg-thumbnail" href="<?php 
                    echo esc_url(get_permalink($product->id));
                    ?>
" title="<?php 
                    echo esc_attr($product->get_title());
                    ?>
">
									<?php 
                    if ($show_thumbnail) {
                        if (!$lazy_load) {
                            echo $product->get_image();
                        } else {
                            $image_size = 'shop_thumbnail';
                            $img_src = '';
                            $alt = '';
                            $dimensions = wc_get_image_size($image_size);
                            if (has_post_thumbnail($product->id)) {
                                $post_thumbnail_id = get_post_thumbnail_id($product->id);
                                $image_obj = wp_get_attachment_image_src($post_thumbnail_id, $image_size, 0);
                                if (isset($image_obj[0])) {
                                    $img_src = $image_obj[0];
                                }
                                $alt = trim(strip_tags(get_post_meta($post_thumbnail_id, '_wp_attachment_image_alt', true)));
                            } else {
                                if (wc_placeholder_img_src()) {
                                    $img_src = wc_placeholder_img_src();
                                }
                            }
                            echo '<img src="' . esc_url($placeholder_img_src) . '" data-src="' . esc_url($img_src) . '" alt="' . esc_attr($alt) . '" class="attachment-shop_thumbnail wp-post-image ts-lazy-load" width="' . $dimensions['width'] . '" height="' . $dimensions['height'] . '" />';
                        }
                    }
                    ?>
								</a>
								
								<div class="ts-wg-meta">
								
									<?php 
                    if ($show_categories) {
                        ts_template_loop_categories();
                    }
                    ?>
									
									<a href="<?php 
                    echo esc_url(get_permalink($product->id));
                    ?>
" title="<?php 
                    echo esc_attr($product->get_title());
                    ?>
">
										<?php 
                    if ($show_product_title) {
                        echo esc_html($product->get_title());
                    }
                    ?>
									</a>
									<?php 
                    if ($show_price) {
                        woocommerce_template_loop_price();
                    }
                    ?>
									<?php 
                    if ($show_rating) {
                        woocommerce_template_loop_rating();
                    }
                    ?>
								</div>
							</li>
						<?php 
                    if ($count % $row == $row - 1 || $count == $num_posts - 1) {
                        ?>
	
							</ul>
						</div>
						<?php 
                    }
                    ?>
					<?php 
                    $count++;
                }
                ?>
				</div>
				<?php 
            }
            echo $after_widget;
            if ($product_type == 'top_rated') {
                remove_filter('posts_clauses', array(WC()->query, 'order_by_rating_post_clauses'));
            }
            wp_reset_postdata();
        }
开发者ID:ericsoncardosoweb,项目名称:dallia,代码行数:101,代码来源:products.php


示例10: khore_woocommerce_before_shop_loop_item

function khore_woocommerce_before_shop_loop_item()
{
    global $post;
    echo '<td class="title">';
    do_action('woocommerce_before_shop_loop_item_title');
    echo '<h3>' . get_the_title() . '</h3>';
    do_action('woocommerce_after_shop_loop_item_title');
    echo '</td>';
    echo '<td class="description">';
    echo '<span class="short-description">' . $post->post_excerpt . '</span>';
    echo '</td>';
    echo '<td class="price">';
    woocommerce_template_loop_price();
    echo '</td>';
    echo '<td class="quantity">';
    woocommerce_quantity_input();
    echo '<input type="hidden" name="product_id" value="' . $post->ID . '" />';
    echo '</td>';
}
开发者ID:digideskio,项目名称:stammtisch,代码行数:19,代码来源:januas.php


示例11: venedor_featured_products_slider

function venedor_featured_products_slider()
{
    $args = array('post_status' => 'publish', 'post_type' => 'product', 'ignore_sticky_posts' => 1, 'meta_key' => '_featured', 'meta_value' => 'yes', 'posts_per_page' => 8, 'orderby' => 'date', 'order' => 'desc', 'product_cat' => get_query_var('product_cat'));
    $products = new WP_Query($args);
    global $venedor_product_slider;
    if ($products->have_posts()) {
        ?>

        <div class="product-featured-slider owl-carousel">

            <?php 
        while ($products->have_posts()) {
            $products->the_post();
            if (!has_post_thumbnail()) {
                continue;
            }
            ?>

                <div class="container product-item product"><div class="row">

                    <div class="col-sm-5">
                    <?php 
            venedor_woocommerce_image();
            ?>
                    </div>

                    <div class="col-sm-7 product-details"><div class="inner">
                        <a href="<?php 
            the_permalink();
            ?>
">
                            <h3 class="product-name"><?php 
            the_title();
            ?>
</h3>
                        </a>
                        <div class="price-box"><?php 
            echo woocommerce_template_loop_price();
            ?>
</div>
                        <div class="product-desc"><?php 
            echo venedor_excerpt(50, false);
            ?>
</div>
                        <?php 
            global $product;
            if (!$product->is_in_stock()) {
                ?>

                            <a href="<?php 
                echo apply_filters('out_of_stock_add_to_cart_url', get_permalink($product->id));
                ?>
" class="button"><?php 
                echo apply_filters('out_of_stock_add_to_cart_text', __('Read More', 'woocommerce'));
                ?>
</a>

                        <?php 
            } else {
                $link = array('url' => '', 'label' => '', 'class' => '');
                $handler = apply_filters('woocommerce_add_to_cart_handler', $product->product_type, $product);
                switch ($handler) {
                    case "variable":
                        $link['url'] = apply_filters('variable_add_to_cart_url', get_permalink($product->id));
                        $link['label'] = apply_filters('variable_add_to_cart_text', __('Select options', 'woocommerce'));
                        break;
                    case "grouped":
                        $link['url'] = apply_filters('grouped_add_to_cart_url', get_permalink($product->id));
                        $link['label'] = apply_filters('grouped_add_to_cart_text', __('View options', 'venedor'));
                        break;
                    case "external":
                        $link['url'] = apply_filters('external_add_to_cart_url', get_permalink($product->id));
                        $link['label'] = apply_filters('external_add_to_cart_text', __('Read More', 'woocommerce'));
                        break;
                    default:
                        if ($product->is_purchasable()) {
                            $link['url'] = apply_filters('add_to_cart_url', esc_url($product->add_to_cart_url()));
                            $link['label'] = apply_filters('add_to_cart_text', __('Add to cart', 'woocommerce'));
                            $link['class'] = apply_filters('add_to_cart_class', 'add_to_cart_button');
                        } else {
                            $link['url'] = apply_filters('not_purchasable_url', get_permalink($product->id));
                            $link['label'] = apply_filters('not_purchasable_text', __('Read More', 'woocommerce'));
                        }
                        break;
                }
                echo apply_filters('woocommerce_loop_add_to_cart_link', sprintf('<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" class="%s cart-links btn btn-lg product_type_%s">%s</a>', esc_url($link['url']), esc_attr($product->id), esc_attr($product->get_sku()), esc_attr($link['class']), esc_attr($product->product_type), esc_html($link['label'])), $product, $link);
            }
            ?>
                    </div></div>
                </div></div>

            <?php 
        }
        // end of the loop.
        ?>

            </div>

            <script type="text/javascript">
            /* <![CDATA[ */
//.........这里部分代码省略.........
开发者ID:robwri32,项目名称:garland,代码行数:101,代码来源:functions.php


示例12: dt_woocommerce_shop_overview_show_price

function dt_woocommerce_shop_overview_show_price()
{
    $out = "";
    global $product;
    ob_start();
    woocommerce_template_loop_price();
    $price = ob_get_clean();
    $out .= "<div class='product-details'>";
    $out .= '<h5><a href="' . get_permalink($product->id) . '">' . $product->post->post_title . '</a></h5>';
    $out .= '<span class="product-price">' . $price . '</span>';
    $out .= '</div>';
    echo $out;
}
开发者ID:h3rodev,项目名称:sometheme,代码行数:13,代码来源:index.php


示例13: lab_wc_product_loop_item_info

function lab_wc_product_loop_item_info()
{
    global $woocommerce, $product;
    $shop_catalog_layout = get_data('shop_catalog_layout');
    $cart_url = $woocommerce->cart->get_cart_url();
    $show_price = get_data('shop_product_price_listing');
    $shop_product_category = get_data('shop_product_category_listing');
    // Full + Transparent Background Layout Type
    if (in_array($shop_catalog_layout, array('full-bg', 'transparent-bg'))) {
        ?>
		<div class="item-info">
			
			<h3 <?php 
        if ($shop_catalog_layout == 'transparent-bg' && $shop_product_category == false) {
            ?>
 class="no-category-present"<?php 
        }
        ?>
>
				<a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a>
			</h3>
			
			<?php 
        if ($shop_product_category) {
            ?>
			<div class="product-category">
				<?php 
            echo $product->get_categories();
            ?>
			</div>
			<?php 
        }
        ?>
			
			
			<div class="product-bottom-details">
				
				<?php 
        if ($show_price) {
            woocommerce_template_loop_price();
        }
        ?>
				
				<?php 
        woocommerce_template_loop_add_to_cart();
        ?>
				
			</div>
			
		</div>
		<?php 
        // Centered – Distanced Background Layout Type
    } elseif (in_array($shop_catalog_layout, array('distanced-centered'))) {
        ?>
		
		<div class="item-info">
			
			<div class="title-and-price">
				
				<h3>
					<a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a>
				</h3>
				
				<?php 
        if ($show_price) {
            woocommerce_template_loop_price();
        }
        ?>
				
			</div>
			
			<?php 
        woocommerce_template_loop_add_to_cart();
        ?>
			
		</div>
		<?php 
    } else {
        ?>
	<div class="item-info">
		
		<div class="row custom-margin">
			<div class="col-xs-<?php 
        echo $show_price ? 9 : 12;
        ?>
">
				<h3>
					<a href="<?php 
//.........这里部分代码省略.........
开发者ID:adrienlementheour,项目名称:AliceRouat,代码行数:101,代码来源:laborator_woocommerce.php


示例14: content

    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('list_product_megamenu', $atts) : $atts;
        $atts = shortcode_atts(array('title' => '', 'cat' => 0, 'number' => 4, 'types' => 'sale', 'css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        global $woocommerce_loop;
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'list_product_megamenu', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        ob_start();
        $meta_query = WC()->query->get_meta_query();
        $query = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $number, 'meta_query' => $meta_query);
        global $woocommerce_loop;
        $woocommerce_loop['columns'] = $number;
        if ($cat > 0) {
            $query['tax_query'] = array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => $cat));
        }
        if ($types == 'arrival') {
            $query['orderby'] = 'date';
            $query['order'] = 'DESC';
        }
        if ($types == 'sale') {
            $product_ids_on_sale = wc_get_product_ids_on_sale();
            $query['meta_key'] = 'total_sales';
            $query['orderby'] = 'meta_value_num';
            $query['post__in'] = array_merge(array(0), $product_ids_on_sale);
        }
        if ($types == 'review') {
            add_filter('posts_clauses', array($this, 'order_by_rating_post_clauses'));
        }
        $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $query, $atts));
        if ($types == 'review') {
            remove_filter('posts_clauses', array($this, 'order_by_rating_post_clauses'));
        }
        $bootstrapColumn = round(12 / $number);
        if ($products->have_posts()) {
            ?>
        <div class="mega-group <?php 
            echo esc_attr($elementClass);
            ?>
">
            <?php 
            if ($title != "") {
                ?>
            <h4 class="mega-group-header"><span><?php 
                echo esc_attr($title);
                ?>
</span></h4>
            <?php 
            }
            ?>
            <div class="mega-products row">
                <?php 
            while ($products->have_posts()) {
                $products->the_post();
                ?>
                    <?php 
                global $product;
                $rating_count = $product->get_rating_count();
                ?>
                    <div class="col-sm-<?php 
                echo esc_attr($bootstrapColumn);
                ?>
 mega-product">
                        <div class="product-avatar">
                            <a href="<?php 
                the_permalink();
                ?>
">
                            <?php 
                the_post_thumbnail('shop_catalog');
                ?>
                            </a>
                        </div>
                        <div class="product-name">
                            <a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a>
                        </div>
                        <div class="price-box">
                            <?php 
                woocommerce_template_loop_price();
                ?>
                        </div>
                        <?php 
                echo edo_display_rating($rating_count);
                ?>
                    </div>
                <?php 
            }
            // end of the loop.
            ?>
            </div>
        </div>  
        <?php 
        }
        return ob_get_clean();
//.........这里部分代码省略.........
开发者ID:ngocthangict,项目名称:edo,代码行数:101,代码来源:list_product_mega_menu.php


示例15: dt_woocommerce_shop_overview_show_price

function dt_woocommerce_shop_overview_show_price()
{
    global $product;
    ob_start();
    woocommerce_template_loop_price();
    $price = ob_get_clean();
    echo $price;
}
开发者ID:jgabrielfreitas,项目名称:MultipagosTestesAPP,代码行数:8,代码来源:index.php


示例16: dt_woocommerce_shop_overview_extra_div_close

 function dt_woocommerce_shop_overview_extra_div_close()
 {
     global $product;
     $link = apply_filters('out_of_stock_add_to_cart_url', get_permalink($product->id));
     $out = "";
     ob_start();
     woocommerce_template_loop_price();
     $price = ob_get_clean();
     ob_start();
     woocommerce_template_loop_add_to_cart();
     $add_to_cart = ob_get_clean();
     if (!empty($add_to_cart)) {
         $add_to_cart = str_replace(' class="', ' class="dt-sc-button ', $add_to_cart);
     }
     $out .= '<!-- Product Details -->';
     $out .= "<div class='product-details'>";
     $out .= $price;
     $out .= $add_to_cart;
     $out .= '</div><!-- Product Details -->';
     $out .= '<div class="product-details-hover">';
     $out .= "<h3><a href='{$link}'>" . $product->get_title() . '</a></h3>';
     $rating = $product->get_rating_html();
     //get rating
     $rating = !empty($rating) ? $rating : "";
     $out .= $rating;
     $out .= $price;
     $out .= $add_to_cart;
     if (shortcode_exists('yith_wcwl_add_to_wishlist')) {
         $out .= do_shortcode('[yith_wcwl_add_to_wishlist]');
     }
     $out .= '</div><!-- Product Details Hover -->';
     $out .= "</div> </div> <!-- Product Wrapper End-->";
     echo $out;
 }
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:34,代码来源:index.php


示例17: the_permalink

?>
" class="cbp-singlePageInline"><i class="icon-basket"></i></a>
            <a href="<?php 
the_permalink();
?>
" class="cbp-lightbox" data-title="<?php 
the_title();
?>
"><i class="icon-paperclip"></i></a>
          </p>
          </figcaption>

      </div>
      <div class="woo-title-price">
          <h2><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h2>
          <p><?php 
echo wp_kses_post(woocommerce_template_loop_price());
?>
</p>
      </div>

  </div>

</li>
开发者ID:WillLin,项目名称:CS-SC-Front-End,代码行数:30,代码来源:content-product.php


示例18: content


//.........这里部分代码省略.........
        }
        if ($products_type == '3') {
            $args = array('post_type' => 'product', 'meta_key' => '_featured', 'meta_value' => 'yes', 'posts_per_page' => $num_posts);
        }
        if ($products_type == '4') {
            $cat_slugs = explode(',', $slugs);
            $args = array('posts_per_page' => $num_posts, 'tax_query' => array('relation' => 'AND', array('taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $cat_slugs)), 'post_type' => 'product');
        }
        ob_start();
        ?>

		<div class="rated_woo_slider">
			<?php 
        if ($products_slider == 'true') {
            ?>
				<div class="custom_rate_nav">
					<a href="#" data-scroll="prev"><i class="icon icon-arrow-67"></i> Prev</a>
					<a href="#" data-scroll="next">Next <i class="icon icon-arrow-68"></i></a>
				</div>
				<div class="slick_slider products_with_rate" data-slick='{"slidesToShow": <?php 
            echo esc_attr($slides_show);
            ?>
, "slidesToScroll": <?php 
            echo esc_attr($slides_scroll);
            ?>
, "autoplay": true, "autoplaySpeed": 3000, "arrows" : false}'>
			<?php 
        } else {
            ?>
				<div class="products_with_rate">
			<?php 
        }
        ?>
			<?php 
        $products_loop = new WP_Query($args);
        if ($products_loop->have_posts()) {
            while ($products_loop->have_posts()) {
                $products_loop->the_post();
                global $product, $post;
                $attachment_id = $product->get_gallery_attachment_ids();
                ?>
			<div class="rate_woo_holder <?php 
                echo $products_slider != 'true' ? esc_attr($class_col) : '';
                ?>
">
				<div class="product_img_holder">
					<a href="<?php 
                the_permalink();
                ?>
">
						<?php 
                if ($attachment_id) {
                    $classes = array('hover_product_img');
                    $image = wp_get_attachment_image($attachment_id[0], apply_filters('single_product_small_thumbnail_size', 'shop_catalog'));
                    $image_class = esc_attr(implode(' ', $classes));
                    $image_title = esc_attr(get_the_title($attachment_id[0]));
                    echo apply_filters('woocommerce_single_product_image_thumbnail_html', sprintf('<div class="%s">%s</div>', $image_class, $image), $attachment_id[0], $post->ID, $image_class);
                }
                /**
                 * 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');
                ?>
					</a>
				</div>
				<div class="product_pricing_holder">
					<h3><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></h3>
				</div>
				<div class="rate_price">
					<div><?php 
                woocommerce_template_loop_price();
                ?>
</div>
					<div><?php 
                echo apply_filters('woocommerce_product_get_rating_html', $product->get_rating_html());
                ?>
</div>
				</div>
			</div>
			<?php 
            }
        }
        ?>
			</div>
		</div>

		<?php 
        $output = ob_get_contents();
        ob_end_clean();
        return $output;
    }
开发者ID:estrategasdigitales,项目名称:Dagutorio,代码行数:101,代码来源:woocommerce-products-withrate.php


示例19: tpvc_wc_product_featured_shortcode

function tpvc_wc_product_featured_shortcode($atts)
{
    if (!class_exists('woocommerce')) {
        return;
    }
    global $woocommerce_loop;
    extract(shortcode_atts(array('tpvc_wc_featured_title' => __('Featured Product', 'tokopress'), 'tpvc_wc_featured_title_color' => '', 'tpvc_wc_featured_title_bg' => '', 'tpvc_wc_featured_title_icon' => '', 'tpvc_wc_featured_title_icon_color' => '', 'tpvc_wc_featured_link' => __('see all', 'tokopress'), 'tpvc_wc_featured_link_color' => '', 'tpvc_wc_featured_number' => '6', 'tpvc_wc_featured_orderby' => 'date', 'tpvc_wc_featured_order' => 'desc', 'tpvc_wc_featured_hide_title' => '', 'tpvc_wc_featured_hide_prodprice' => '', 'tpvc_wc_featured_hide_prodtitle' => '', 'tpvc_wc_featured_hide_prodlink' => '', 'tpvc_wc_featured_hide_prodcart' => '', 'tpvc_wc_featured_hide_prodlink_text' => __('detail', 'tokopress'), 'tpvc_wc_featured_class' => ''), $atts));
    $tpvc_wc_featured_columns = 1;
    $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $tpvc_wc_featured_number, 'orderby' => $tpvc_wc_featured_orderby, 'order' => $tpvc_wc_featured_order, 'meta_query' => array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN'), array('key' => '_featured', 'value' => 'yes')));
    ob_start();
    $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $args, $atts));
    $woocommerce_loop['columns'] = $tpvc_wc_featured_columns;
    if ($products->have_posts()) {
        ?>
	<div class="tpvc-featured-product woocommerce woocommerce-product-col-<?php 
        echo $tpvc_wc_featured_columns;
        ?>
 <?php 
        echo $tpvc_wc_f 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap