本文整理汇总了PHP中wpsc_product_postage_and_packaging函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_product_postage_and_packaging函数的具体用法?PHP wpsc_product_postage_and_packaging怎么用?PHP wpsc_product_postage_and_packaging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpsc_product_postage_and_packaging函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wpsc_display_product_multicurrency
?>
:<br/>
<?php
if (wpsc_product_has_multicurrency()) {
?>
<?php
echo wpsc_display_product_multicurrency();
?>
<?php
}
?>
<?php
if (get_option('display_pnp') == 1) {
?>
<span class="pricedisplay"><?php
echo wpsc_product_postage_and_packaging();
?>
</span><?php
echo __('P&P', 'wpsc');
?>
: <br />
<?php
}
?>
<?php
}
?>
</div>
<?php
if (function_exists('wpsc_akst_share_link') && get_option('wpsc_share_this') == 1) {
开发者ID:Jonathonbyrd,项目名称:wp-ecommerce,代码行数:31,代码来源:single_product.php
示例2: wpsc_the_product_id
<input type='text' id='donation_price_<?php echo wpsc_the_product_id(); ?>' name='donation_price' value='<?php echo $wpsc_query->product['price']; ?>' size='6' />
<br />
<?php else : ?>
<?php if(wpsc_product_on_special()) : ?>
<span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(); ?></span><br />
<?php endif; ?>
<span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(); ?></span><?php echo __('Price', 'wpsc'); ?>: <br/>
<!-- multi currency code -->
<?php if(wpsc_product_has_multicurrency()) : ?>
<?php echo wpsc_display_product_multicurrency(); ?>
<?php endif; ?>
<!-- end multi currency code -->
<?php if(get_option('display_pnp') == 1) : ?>
<span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(); ?></span><?php echo __('P&P', 'wpsc'); ?>: <br />
<?php endif; ?>
<?php endif; ?>
</div>
<?php if(function_exists('wpsc_akst_share_link') && (get_option('wpsc_share_this') == 1)) {
echo wpsc_akst_share_link('return');
} ?>
<input type="hidden" value="add_to_cart" name="wpsc_ajax_action"/>
<input type="hidden" value="<?php echo wpsc_the_product_id(); ?>" name="product_id"/>
<?php if(wpsc_product_is_customisable()) : ?>
<input type="hidden" value="true" name="is_customisable"/>
<?php endif; ?>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:29,代码来源:single_product.php
示例3: post_object
function post_object($id, $term_id = false, $matches = false)
{
$unset_array = array('post_date_gmt', 'post_status', 'comment_status', 'ping_status', 'post_password', 'post_content_filtered', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'guid', 'menu_order', 'post_mime_type', 'comment_count', 'ancestors', 'filter');
global $post;
$date_format = get_option('date_format');
$post = get_post($id);
if ($term_id) {
if (!in_category($term_id, $post->ID)) {
return false;
}
}
$size = array('height' => 50, 'width' => 50);
if ($post != null) {
$post_object = new stdclass();
$post_link = get_permalink($post->ID);
if (in_array('{post_image}', $matches) || in_array('{post_image_html}', $matches)) {
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
if ($post_thumbnail_id > 0) {
$thumb = wp_get_attachment_image_src($post_thumbnail_id, array($size['height'], $size['width']));
$post_object->post_image = trim($thumb[0]) == "" ? WEBNUS_SEARCH_NO_IMAGE : $thumb[0];
if (in_array('{post_image_html}', $matches)) {
$post_object->post_image_html = '<img src="' . $post_object->post_image . '" width="' . $size['width'] . '" height="' . $size['height'] . '"/>';
}
} else {
if ($src = $this->get_image_from_content($post->post_content, $size['height'], $size['width'])) {
$post_object->post_image = $src['src'] ? $src['src'] : WEBNUS_SEARCH_NO_IMAGE;
if (in_array('{post_image_html}', $matches)) {
$post_object->post_image_html = '<img src="' . $post_object->post_image . '" width="' . $src['width'] . '" height="' . $src['height'] . '" />';
}
} else {
$post_object->post_image = WEBNUS_SEARCH_NO_IMAGE;
if (in_array('{post_image_html}', $matches)) {
$post_object->post_image_html = '';
}
}
}
}
if ($post->post_type == "wpsc-product") {
if (function_exists('wpsc_calculate_price')) {
if (in_array('{wpsc_price}', $matches)) {
$post_object->wpsc_price = wpsc_the_product_price();
}
if (in_array('{wpsc_shipping}', $matches)) {
$post_object->wpsc_shipping = strip_tags(wpsc_product_postage_and_packaging());
}
if (in_array('{wpsc_image}', $matches)) {
$post_object->wpsc_image = wpsc_the_product_image($size['height'], $size['width']);
}
}
}
if ($post->post_type == 'product' && class_exists('WC_Product_Factory')) {
$product_factory = new WC_Product_Factory();
global $product;
$product = $product_factory->get_product($post);
if ($product->is_visible()) {
foreach ($matches as $match) {
$match = str_replace(array('{', '}'), '', $match);
if (in_array($match, array('categories', 'tags'))) {
$method = "get_" . $match;
if (method_exists($product, $method)) {
$term_list = call_user_func(array($product, $method), '');
if ($term_list) {
$post_object->{$match} = '<span class="sf_list sf_' . $match . '">' . $term_list . '</span>';
} else {
$post_object->{$match} = "";
}
}
} elseif ($match == 'add_to_cart_button') {
ob_start();
do_action('woocommerce_' . $product->product_type . '_add_to_cart');
$post_object->{$match} = '<div class="product">' . ob_get_contents() . '</div>';
ob_end_clean();
} else {
$method = "get_" . $match;
if (method_exists($product, $method)) {
$post_object->{$match} = call_user_func(array($product, $method));
} elseif (method_exists($product, $match)) {
$post_object->{$match} = call_user_func(array($product, $match));
}
}
}
}
/*
$post->sku = $product->get_sku();
$post->sale_price = $product->get_sale_price();
$post->regular_price = $product->get_regular_price();
$post->price = $product->get_price();
$post->price_including_tax = $product->get_price_including_tax();
$post->price_excluding_tax = $product->get_price_excluding_tax();
$post->price_suffix = $product->get_price_suffix();
$post->price_html = $product->get_price_html();
$post->price_html_from_text = $product->get_price_html_from_text();
$post->average_rating = $product->get_average_rating();
$post->rating_count = $product->get_rating_count();
$post->rating_html = $product->get_rating_html();
$post->dimensions = $product->get_dimensions();
$post->shipping_class = $product->get_shipping_class();
$post->add_to_cart_text = $product->add_to_cart_text();
$post->single_add_to_cart_text = $product->single_add_to_cart_text();
$post->add_to_cart_url = $product->add_to_cart_url();
//.........这里部分代码省略.........
开发者ID:kulgee001,项目名称:VoiceOfADF,代码行数:101,代码来源:live-search.php
示例4: wpsc_the_product_id
?>
<span id="product_price_<?php
echo wpsc_the_product_id();
?>
" class="pricedisplay"><?php
echo wpsc_the_product_price(get_option('wpsc_hide_decimals'));
?>
</span><?php
echo __('Price', 'wpsc');
?>
: <br/>
<?php
if (get_option('display_pnp') == 1) {
?>
<span class="pricedisplay"><?php
echo wpsc_product_postage_and_packaging(get_option('wpsc_hide_decimals'));
?>
</span><?php
echo __('P&P', 'wpsc');
?>
: <br />
<?php
}
?>
<?php
}
?>
</div>
<input type="hidden" value="add_to_cart" name="wpsc_ajax_action"/>
开发者ID:Jonathonbyrd,项目名称:wp-ecommerce,代码行数:31,代码来源:products_page.php
注:本文中的wpsc_product_postage_and_packaging函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论