本文整理汇总了PHP中edd_cart_total函数的典型用法代码示例。如果您正苦于以下问题:PHP edd_cart_total函数的具体用法?PHP edd_cart_total怎么用?PHP edd_cart_total使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了edd_cart_total函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edd_wallet_process_incentive
function edd_wallet_process_incentive()
{
if ($_REQUEST['gateway'] == 'wallet') {
EDD()->session->set('wallet_has_incentives', '1');
} else {
EDD()->session->set('wallet_has_incentives', null);
}
// Refresh the cart
if (empty($_POST['billing_country'])) {
$_POST['billing_country'] = edd_get_shop_country();
}
ob_start();
edd_checkout_cart();
$cart = ob_get_clean();
$response = array('html' => $cart, 'tax_raw' => edd_get_cart_tax(), 'tax' => html_entity_decode(edd_cart_tax(false), ENT_COMPAT, 'UTF-8'), 'tax_rate_raw' => edd_get_tax_rate(), 'tax_rate' => html_entity_decode(edd_get_formatted_tax_rate(), ENT_COMPAT, 'UTF-8'), 'total' => html_entity_decode(edd_cart_total(false), ENT_COMPAT, 'UTF-8'), 'total_raw' => edd_get_cart_total());
echo json_encode($response);
edd_die();
}
示例2: ajax_shipping_rate
/**
* Update the shipping costs via ajax
*
* This fires when the customer changes the country they are shipping to
*
* @since 1.0
*
* @access private
* @return void
*/
public function ajax_shipping_rate()
{
// Calculate new shipping
$shipping = $this->apply_shipping_fees();
ob_start();
edd_checkout_cart();
$cart = ob_get_clean();
$response = array('html' => $cart, 'total' => html_entity_decode(edd_cart_total(false), ENT_COMPAT, 'UTF-8'));
echo json_encode($response);
die;
}
示例3: do_action
<?php
}
?>
<tr class="edd_cart_footer_row">
<?php
do_action('edd_checkout_table_footer_first');
?>
<th colspan="<?php
echo edd_checkout_cart_columns();
?>
" class="edd_cart_total"><?php
esc_html_e('Total', 'helium');
?>
: <span class="edd_cart_amount" data-subtotal="<?php
echo edd_get_cart_total();
?>
" data-total="<?php
echo edd_get_cart_total();
?>
"><?php
edd_cart_total();
?>
</span></th>
<?php
do_action('edd_checkout_table_footer_last');
?>
</tr>
</tfoot>
</table>
示例4: edd_checkout_final_total
/**
* Shows the final purchase total at the bottom of the checkout page
*
* @since 1.5
* @return void
*/
function edd_checkout_final_total()
{
?>
<p id="edd_final_total_wrap">
<strong><?php
_e('Purchase Total:', 'edd');
?>
</strong>
<span class="edd_cart_amount" data-subtotal="<?php
echo edd_get_cart_subtotal();
?>
" data-total="<?php
echo edd_get_cart_subtotal();
?>
"><?php
edd_cart_total();
?>
</span>
</p>
<?php
}
示例5: edd_ajax_recalculate_taxes
/**
* Recalculate cart taxes
*
* @since 1.6
* @return void
*/
function edd_ajax_recalculate_taxes()
{
if (!edd_get_cart_contents()) {
return false;
}
if (empty($_POST['billing_country'])) {
$_POST['billing_country'] = edd_get_shop_country();
}
ob_start();
edd_checkout_cart();
$cart = ob_get_clean();
$response = array('html' => $cart, 'tax_raw' => edd_get_cart_tax(), 'tax' => html_entity_decode(edd_cart_tax(false), ENT_COMPAT, 'UTF-8'), 'tax_rate_raw' => edd_get_tax_rate(), 'tax_rate' => html_entity_decode(edd_get_formatted_tax_rate(), ENT_COMPAT, 'UTF-8'), 'total' => html_entity_decode(edd_cart_total(false), ENT_COMPAT, 'UTF-8'), 'total_raw' => edd_get_cart_total());
echo json_encode($response);
edd_die();
}
示例6: do_action
<?php do_action( 'edd_checkout_table_subtotal_last' ); ?>
</tr>
<?php endif; ?>
<tr class="edd_cart_footer_row edd_cart_discount_row" <?php if( ! edd_cart_has_discounts() ) echo ' style="display:none;"'; ?>>
<?php do_action( 'edd_checkout_table_discount_first' ); ?>
<th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_discount">
<?php edd_cart_discounts_html(); ?>
</th>
<?php do_action( 'edd_checkout_table_discount_last' ); ?>
</tr>
<?php if( edd_use_taxes() ) : ?>
<tr class="edd_cart_footer_row edd_cart_tax_row"<?php if( ! edd_is_cart_taxed() ) echo ' style="display:none;"'; ?>>
<?php do_action( 'edd_checkout_table_tax_first' ); ?>
<th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_tax">
<?php _e( 'Tax', 'edd' ); ?>: <span class="edd_cart_tax_amount" data-tax="<?php echo edd_get_cart_tax( false ); ?>"><?php echo esc_html( edd_cart_tax() ); ?></span>
</th>
<?php do_action( 'edd_checkout_table_tax_last' ); ?>
</tr>
<?php endif; ?>
<tr class="edd_cart_footer_row">
<?php do_action( 'edd_checkout_table_footer_first' ); ?>
<th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_total"><?php _e( 'Total', 'edd' ); ?>: <span class="edd_cart_amount" data-subtotal="<?php echo edd_get_cart_total(); ?>" data-total="<?php echo edd_get_cart_total(); ?>"><?php edd_cart_total(); ?></span></th>
<?php do_action( 'edd_checkout_table_footer_last' ); ?>
</tr>
</tfoot>
</table>
示例7: edd_ajax_opt_out_local_taxes
/**
* Opt out of local taxes via AJAX
*
* @since 1.4.1
* @return void
*/
function edd_ajax_opt_out_local_taxes()
{
if (!check_ajax_referer('edd_checkout_nonce', 'nonce')) {
return false;
}
edd_opt_out_local_taxes();
ob_start();
edd_checkout_cart();
$cart = ob_get_contents();
ob_end_clean();
$response = array('html' => $cart, 'total' => html_entity_decode(edd_cart_total(false), ENT_COMPAT, 'UTF-8'));
echo json_encode($response);
edd_die();
}
示例8: shortcode_edd_cart_total
/**
* Return woocommerce cart total (e.g. $5.99)
*
* @since 1.3.3
* @return string
*/
public function shortcode_edd_cart_total()
{
if (function_exists('edd_cart_total')) {
return "<span class='mega-menu-edd-cart-total'>" . edd_cart_total(false) . "</span>";
}
}
示例9: edd_checkout_final_total
/**
* Shows the final purchase total at the bottom of the checkout page
*
* @since 1.5
* @return void
*/
function edd_checkout_final_total()
{
?>
<fieldset id="edd_purchase_final_total">
<p id="edd_final_total_wrap">
<strong><?php
_e('Purchase Total:', 'edd');
?>
</strong>
<span class="edd_cart_amount" data-subtotal="<?php
echo edd_get_cart_amount(false);
?>
" data-total="<?php
echo edd_get_cart_amount(true, true);
?>
"><?php
edd_cart_total();
?>
</span>
</p>
</fieldset>
<?php
}
示例10: _e
<th class="edd_cart_tax">
<?php
_e('VAT', 'yoastcom');
?>
(<span id="yst_secondary_tax_rate"><?php
echo esc_html(edd_get_tax_rate());
?>
</span>%)
</th>
<th class="edd_cart_item_price">
<span class="edd_cart_tax_amount" id="yst_secondary_tax"><?php
echo esc_html(edd_cart_tax());
?>
</span>
</th>
</tr>
<tr>
<th><?php
_e('Total', 'yoastcom');
?>
:</th>
<th class="edd_cart_amount"><?php
echo esc_html(edd_cart_total(false));
?>
</th>
</tr>
</table>
</div>
<div class="clear"></div>
<br />
<?php
示例11: download_checkout_total_function
function download_checkout_total_function($atts, $content)
{
return edd_cart_total(false);
}