コード例 #1
0
ファイル: new-page.php プロジェクト: olechka1505/hungrylemur
    ?>

		<?php 
}
?>

		<?php 
foreach (WC()->cart->get_fees() as $fee) {
    ?>
			<tr class="fee">
				<th><?php 
    echo esc_html($fee->name);
    ?>
</th>
				<td><?php 
    wc_cart_totals_fee_html($fee);
    ?>
</td>
			</tr>
		<?php 
}
?>

		<?php 
if (wc_tax_enabled() && WC()->cart->tax_display_cart === 'excl') {
    ?>
			<?php 
    if (get_option('woocommerce_tax_total_display') === 'itemized') {
        ?>
				<?php 
        foreach (WC()->cart->get_tax_totals() as $code => $tax) {
コード例 #2
0
ファイル: cart-totals.php プロジェクト: simonsays88/costa
                <?php endforeach; ?>

                <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>

                    <?php do_action( 'woocommerce_cart_totals_before_shipping' ); ?>

                    <?php wc_cart_totals_shipping_html(); ?>

                    <?php do_action( 'woocommerce_cart_totals_after_shipping' ); ?>

                <?php endif; ?>

                <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
                    <tr class="fee fee-<?php echo $fee->id ?>">
                        <th><?php echo esc_html( $fee->name ); ?></th>
                        <td><?php wc_cart_totals_fee_html( $fee ); ?></td>
                    </tr>
                <?php endforeach; ?>

                <?php if ( WC()->cart->tax_display_cart == 'excl' ) : ?>
                    <?php if ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ) : ?>
                        <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
                            <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
                                <th><?php echo esc_html( $tax->label ); ?></th>
                                <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
                            </tr>
                        <?php endforeach; ?>
                    <?php else : ?>
                        <tr class="tax-total">
                            <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
                            <td><?php echo wc_price( WC()->cart->get_taxes_total() ); ?></td>
コード例 #3
0
ファイル: review-order.php プロジェクト: simonsays88/costa
            </tr>
        <?php endforeach; ?>

        <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>

            <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>

            <?php wc_cart_totals_shipping_html(); ?>

            <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
        <?php endif; ?>

        <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
            <tr class="fee fee-<?php echo $fee->id ?>">
                <th><?php echo esc_html( $fee->name ); ?></th>
                <td colspan="2"><?php wc_cart_totals_fee_html( $fee ); ?></td>
            </tr>
        <?php endforeach; ?>

        <?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
            <?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
                <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
                    <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
                        <th><?php echo esc_html( $tax->label ); ?></th>
                        <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
                    </tr>
                <?php endforeach; ?>
            <?php else : ?>
                <tr class="tax-total">
                    <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
                    <td colspan="2"><?php echo wc_price( WC()->cart->get_taxes_total() ); ?></td>
コード例 #4
0
/**
 * @deprecated
 */
function woocommerce_cart_totals_fee_html($fee)
{
    wc_cart_totals_fee_html($fee);
}
コード例 #5
0
 /**
  * Gets shipping options as formatted HTML.
  *
  * @since  2.0
  **/
 function klarna_checkout_get_fees_row_html()
 {
     global $woocommerce;
     ob_start();
     if (!defined('WOOCOMMERCE_CART')) {
         define('WOOCOMMERCE_CART', true);
     }
     $woocommerce->cart->calculate_shipping();
     $woocommerce->cart->calculate_fees();
     $woocommerce->cart->calculate_totals();
     // Fees
     foreach ($woocommerce->cart->get_fees() as $cart_fee) {
         echo '<tr class="kco-fee">';
         echo '<td class="kco-col-desc">';
         echo strip_tags($cart_fee->name);
         echo '</td>';
         echo '<td class="kco-col-number kco-rightalign"><span class="amount">';
         // echo wc_price( $cart_fee->amount + $cart_fee->tax );
         echo wc_cart_totals_fee_html($cart_fee);
         echo '</span></td>';
         echo '</tr>';
     }
     return ob_get_clean();
 }