本文整理汇总了PHP中wpsc_coupon_amount函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_coupon_amount函数的具体用法?PHP wpsc_coupon_amount怎么用?PHP wpsc_coupon_amount使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpsc_coupon_amount函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wpsc_coupon_amount
?>
</span>
</td>
</tr>
<?php
if (wpsc_uses_coupons() && wpsc_coupon_amount(false) > 0) {
?>
<tr class="total_price">
<td colspan="3">
<?php
echo TXT_WPSC_COUPONS;
?>
</td>
<td colspan="2">
<span id="coupons_amount" class="pricedisplay"><?php
echo wpsc_coupon_amount();
?>
</span>
</td>
</tr>
<?php
}
?>
<tr class='total_price'>
<td colspan='3'>
<?php
echo TXT_WPSC_TOTALPRICE;
?>
开发者ID:papayalabs,项目名称:htdocs,代码行数:31,代码来源:shopping_cart_page.php
示例2: wpsc_display_tax_label
<tr class="total_price total_tax">
<td colspan="3">
<?php echo wpsc_display_tax_label(true); ?>
</td>
<td colspan="2">
<span id="checkout_tax" class="pricedisplay checkout-tax"><?php echo wpsc_cart_tax(); ?></span>
</td>
</tr>
<?php if(wpsc_uses_coupons() && (wpsc_coupon_amount(false) > 0)): ?>
<tr class="total_price">
<td colspan="3">
<?php echo __('Discount', 'wpsc'); ?>
</td>
<td colspan="2">
<span id="coupons_amount" class="pricedisplay"><?php echo wpsc_coupon_amount(); ?></span>
</td>
</tr>
<?php endif ?>
<tr class='total_price'>
<td colspan='3'>
<?php echo __('Total Price', 'wpsc'); ?>
</td>
<td colspan='2'>
<span id='checkout_total' class="pricedisplay checkout-total"><?php echo wpsc_cart_total(); ?></span>
</td>
</tr>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:30,代码来源:shopping_cart_page.php
示例3: get_shipping_method_js_vars
private function get_shipping_method_js_vars()
{
global $wpsc_cart;
$js_var = array('subtotal' => (double) $wpsc_cart->calculate_subtotal(), 'shipping' => array(), 'tax' => wpsc_is_tax_enabled() && !wpsc_is_tax_included() ? (double) wpsc_cart_tax(false) : 0, 'discount' => wpsc_coupon_amount(false) > 0 ? wpsc_coupon_amount(false) : 0);
foreach ($this->shipping_calculator->sorted_quotes as $module_name => $quotes) {
foreach ($quotes as $option => $cost) {
$id = $this->shipping_calculator->ids[$module_name][$option];
$js_var['shipping'][$id] = $cost;
}
}
$currency = new WPSC_Country(get_option('currency_type'));
$currency_code = $currency->get_currency_code();
$isocode = $currency->get_isocode();
$without_fractions = in_array($currency_code, WPSC_Payment_Gateways::currencies_without_fractions());
$decimals = $without_fractions ? 0 : 2;
$decimals = apply_filters('wpsc_modify_decimals', $decimals, $isocode);
$decimal_separator = apply_filters('wpsc_format_currency_decimal_separator', wpsc_get_option('decimal_separator'), $isocode);
$thousands_separator = apply_filters('wpsc_format_currency_thousands_separator', wpsc_get_option('thousands_separator'), $isocode);
$symbol = apply_filters('wpsc_format_currency_currency_symbol', $currency->get_currency_symbol());
$sign_location = get_option('currency_sign_location');
$js_var['formatter'] = array('currency_code' => $currency_code, 'without_fractions' => $without_fractions, 'decimals' => $decimals, 'decimal_separator' => $decimal_separator, 'thousands_separator' => $thousands_separator, 'symbol' => $symbol, 'sign_location' => $sign_location);
return $js_var;
}
开发者ID:androidprojectwork,项目名称:WP-e-Commerce,代码行数:23,代码来源:checkout.php
示例4: wpsc_update_shipping_price
/**
* update_shipping_price function, used through ajax and in normal page loading.
* No parameters, returns nothing
*/
function wpsc_update_shipping_price()
{
global $wpsc_cart;
$quote_shipping_method = $_POST['method'];
$quote_shipping_option = $_POST['option'];
if (!empty($quote_shipping_option) && !empty($quote_shipping_method)) {
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
echo "\n\t\tif(jQuery('.pricedisplay.checkout-shipping .pricedisplay')){\n\t\t\tjQuery('.pricedisplay.checkout-shipping > .pricedisplay:first').html(\"" . wpsc_cart_shipping() . "\");\n\t\t\tjQuery('.shoppingcart .pricedisplay.checkout-shipping > .pricedisplay:first').html(\"" . wpsc_cart_shipping() . "\");\n\t\t} else {\n\t\t\tjQuery('.pricedisplay.checkout-shipping').html(\"" . wpsc_cart_shipping() . "\");}";
echo "\n\t\tif (jQuery('#coupons_amount .pricedisplay').size() > 0) {\n\t\t\tjQuery('#coupons_amount .pricedisplay').html(\"" . wpsc_coupon_amount() . "\");\n\t\t} else {\n\t\t\tjQuery('#coupons_amount').html(\"" . wpsc_coupon_amount() . "\");\n\t\t}\n\t\t";
echo "jQuery('.pricedisplay.checkout-total').html(\"" . wpsc_cart_total() . "\");\n\r";
}
exit;
}
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:17,代码来源:ajax.functions.php
示例5: get_total_discount
protected function get_total_discount()
{
return wpsc_coupon_amount(false);
}
开发者ID:RJHanson292,项目名称:WP-e-Commerce,代码行数:4,代码来源:cart-item-table.php
示例6: wpsc_update_shipping_price
/**
* update_shipping_price function, used through ajax and in normal page loading.
* No parameters, returns nothing
*/
function wpsc_update_shipping_price()
{
global $wpsc_cart;
$quote_shipping_method = $_POST['method'];
$quote_shipping_option = str_replace(array('®', '™'), array('®', '™'), $_POST['option']);
if (!empty($quote_shipping_option) && !empty($quote_shipping_method)) {
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
}
if (defined('DOING_AJAX') && DOING_AJAX) {
echo json_encode(array('shipping' => wpsc_cart_shipping(), 'coupon' => wpsc_coupon_amount(), 'cart_total' => wpsc_cart_total(), 'tax' => wpsc_cart_tax()));
exit;
}
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:17,代码来源:ajax.php
注:本文中的wpsc_coupon_amount函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论