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; }
?> "> <?php esc_html_e('Shipping:', 'wpsc'); ?> <br /> </th> <td> <?php echo wpsc_format_currency($this->get_total_shipping()); ?> </td> </tr> <?php } if (wpsc_is_tax_enabled()) { ?> <tr <?php $this->show_tax_style(); ?> class="wpsc-cart-aggregate wpsc-cart-tax-row"> <th scope="row" colspan="<?php echo count($this->columns) - 1; ?> "> <?php esc_html_e('Tax:', 'wpsc'); ?> <br /> </th> <td>