本文整理汇总了PHP中woocommerce_template_single_price函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_template_single_price函数的具体用法?PHP woocommerce_template_single_price怎么用?PHP woocommerce_template_single_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woocommerce_template_single_price函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: kt_woocommerce_single_product
function kt_woocommerce_single_product()
{
?>
<div class="product-detail-info">
<div class="product-section">
<?php
woocommerce_template_single_meta();
woocommerce_template_single_rating();
woocommerce_template_single_excerpt();
?>
</div>
<div class="product-section">
<?php
woocommerce_template_single_add_to_cart();
?>
<div class="group-product-price">
<label><?php
esc_html_e('Price', 'kutetheme');
?>
</label>
<?php
woocommerce_template_single_price();
?>
</div>
</div>
<div class="product-section">
<?php
woocommerce_template_single_sharing();
?>
</div>
</div>
<?php
}
开发者ID:hikaram,项目名称:wee,代码行数:33,代码来源:woocommerce.php
示例2: widget
//.........这里部分代码省略.........
<h4>
<a href="<?php
the_permalink();
?>
" class="nav-button" rel="bookmark" title="Click to learn more about <?php
the_title();
?>
"><?php
the_title();
?>
</a>
</h4>
<?php
if ($show_date || $show_comments) {
?>
<div class="recent-posts-entry-meta">
<?php
if ($show_date) {
?>
<div class="post-date"><?php
the_time('F jS, Y');
?>
<span class="post-author"> by <?php
the_author_posts_link();
?>
</span></div>
<?php
}
// Post Date & Author
?>
<?php
if ($show_comments) {
?>
<div class="comments-qty"><?php
comments_popup_link('No comments yet', '1 comment', '% comments', 'comments-link', 'Comments are off for this post');
?>
</div>
<?php
}
// Post Comments
?>
</div>
<?php
}
?>
<?php
if ($show_excerpt) {
?>
<div class="recent-posts-entry-content"><?php
the_excerpt();
?>
<a href="<?php
the_permalink();
?>
" class="more-link" rel="bookmark" title="Read more about <?php
the_title();
?>
"><?php
echo $excerpt_more;
?>
</a>
</div>
<?php
}
// Post Content
?>
<?php
if ($show_price && $post_type != 'product') {
continue;
} else {
if ($post_type === 'product') {
echo '<div class="product-price">';
woocommerce_template_single_price();
echo '</div>';
// Product Price if WOO
} elseif ($post_type === 'wpsc-product') {
echo '<div class="product-price">';
wpsc_the_product_price_display();
echo '</div>';
// Product Price if WPEC
} else {
continue;
}
}
?>
</li>
<?php
}
echo '</ul>';
echo $after_widget;
wp_reset_postdata();
}
开发者ID:binq2,项目名称:borealpaddle,代码行数:101,代码来源:class-pt-widget-recent-posts.php
示例3: thb_single_product_mobile_header
function thb_single_product_mobile_header()
{
echo "<div class='thb_product_mobile_header'>";
woocommerce_template_single_title();
woocommerce_template_loop_rating();
woocommerce_template_single_price();
echo "</div>";
}
开发者ID:alfredpp,项目名称:sarath-portfolio,代码行数:8,代码来源:theme-woocommerce.php
示例4: woocommerce_template_single_title
<div class="summary entry-summary">
<?php
/**
* woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40
* @hooked woocommerce_template_single_sharing - 50
*/
woocommerce_template_single_title();
woocommerce_template_single_rating();
woocommerce_template_single_price();
woocommerce_template_single_excerpt();
?>
<div class="cart">
<?php
woocommerce_template_loop_add_to_cart();
?>
</div>
<?php
woocommerce_template_single_meta();
?>
</div>
</div>
</div>
</div>
</div><!-- #product-<?php
开发者ID:jimmitjoo,项目名称:mnh,代码行数:31,代码来源:quickview.php
示例5: yit_load_product_quick_view_ajax
function yit_load_product_quick_view_ajax()
{
if (!isset($_REQUEST['item_id'])) {
die;
}
$product_id = intval($_REQUEST['item_id']);
// set the main wp query for the product
wp('p=' . $product_id . '&post_type=product');
// remove parts from single product page
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10);
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50);
remove_all_actions('woocommerce_after_single_product_summary');
remove_all_actions('woocommerce_after_single_product');
// change template for variable products
if (isset($GLOBALS['yith_wccl'])) {
$GLOBALS['yith_wccl']->obj = new YITH_WCCL_Frontend(YITH_WCCL_VERSION);
$GLOBALS['yith_wccl']->obj->override();
}
//wp_head();
while (have_posts()) {
the_post();
?>
<?php
woocommerce_template_single_title();
?>
<?php
woocommerce_template_single_rating();
?>
<?php
woocommerce_template_single_price();
?>
<div class="single-product woocommerce">
<?php
wc_get_template_part('content', 'single-product');
?>
</div>
<?php
}
// end of the loop.
//wp_footer();
die;
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:50,代码来源:woocommerce.php
示例6: avia_title
function avia_title($post = "", $_product = "", $title = "")
{
if (!$_product) {
global $product;
$_product = $product;
}
if (!$title) {
$title = get_the_title();
}
echo "<div class='title_container'>";
if (!is_front_page()) {
echo avia_breadcrumbs();
}
echo '<h1 class="page-title">' . $title . '</h1>';
if ($_product && is_singular()) {
echo '<span class="amount" style="color: #662D91; font-size: 20px;">' . $_product->get_sku() . '</span>';
echo "<div class='price_container'>";
woocommerce_template_single_price($post, $_product);
echo "</div>";
}
echo "</div>";
}
开发者ID:eddiewilson,项目名称:new-ke,代码行数:22,代码来源:functions.072712.php
示例7: actionSingleProduct
public static function actionSingleProduct()
{
if (static::getPrice() < static::$priceGreaterThanOrEqualTo) {
woocommerce_template_single_price();
return;
}
$product = get_product();
?>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<p class="price"><?php
echo $product->get_price_html();
?>
<span class="francotecnologia_wc_parcpagseg_single_product_price_span">
<?php
echo (static::getPrice() > 0 ? static::$language['or'] . ' ' : '') . static::getParceledValue();
?>
</span>
</p>
<?php
if ($product->product_type != 'variable') {
echo static::getParceledTable();
} else {
$variationList = $product->get_available_variations();
foreach ($variationList as $variation) {
$productVariation = new WC_Product_Variation($variation['variation_id']);
$defaultVariation = array_diff($variation['attributes'], $product->get_variation_default_attributes());
echo static::getParceledTable($productVariation->get_price(), $variation['variation_id'], empty($defaultVariation));
}
}
?>
<meta itemprop="price" content="<?php
echo $product->get_price();
?>
" />
<meta itemprop="priceCurrency" content="<?php
echo get_woocommerce_currency();
?>
" />
<link itemprop="availability" href="http://schema.org/<?php
echo $product->is_in_stock() ? static::$language['InStock'] : static::$language['OutOfStock'];
?>
" />
</div>
<?php
}
开发者ID:origgami,项目名称:woocommerce-installments,代码行数:45,代码来源:woocommerce-installments.php
示例8: avia_title
function avia_title($post = "", $_product = "", $title = "")
{
if (!$_product) {
global $product;
$_product = $product;
}
if (!$title) {
$title = get_the_title();
}
echo "<div class='title_container'>";
if (!is_front_page()) {
echo avia_breadcrumbs();
}
echo '<h1 class="page-title">' . $title . '</h1>';
if ($_product && is_singular()) {
echo "<div class='price_container'>";
woocommerce_template_single_price($post, $_product);
echo "</div>";
}
echo "</div>";
}
开发者ID:eddiewilson,项目名称:new-ke,代码行数:21,代码来源:functions.070612.php
示例9: tokopress_wc_before_single_variation
function tokopress_wc_before_single_variation()
{
global $product;
$from = false;
$saleprices = array($product->get_variation_price('min', true), $product->get_variation_price('max', true));
if ($saleprices[0] !== $saleprices[1]) {
$from = true;
}
$regprices = array($product->get_variation_regular_price('min', true), $product->get_variation_regular_price('max', true));
if ($regprices[0] !== $regprices[1]) {
$from = true;
}
if (!$from) {
woocommerce_template_single_price();
}
}
开发者ID:rtmzzi,项目名称:yummMacVersao,代码行数:16,代码来源:frontend.php
注:本文中的woocommerce_template_single_price函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论