function kt_display_mini_cart_on_top() { $check_out_url = WC()->cart->get_cart_url(); kt_get_cart_content(esc_url($check_out_url)); }
function kt_cart_button() { if (kt_is_wc()) { ob_start(); $cart_count = WC()->cart->cart_contents_count; $cart_total = WC()->cart->get_cart_total(); $check_out_url = WC()->cart->get_cart_url(); $cart_content = WC()->cart->cart_contents; global $kt_used_header; ?> <?php if ($kt_used_header == 6) { ?> <div class="btn-cart" id="cart-block"> <a href="<?php echo $check_out_url; ?> " title="<?php _e('My cart', THEME_LANG); ?> " ><?php _e('Cart', THEME_LANG); ?> </a> <span class="notify notify-right"><?php echo $cart_count; ?> </span> <?php echo kt_get_cart_content($cart_content, $cart_total, $check_out_url); ?> </div> <?php } else { ?> <div id="cart-block" class="shopping-cart-box col-xs-5 col-sm-2"> <a class="cart-link" href="<?php echo $check_out_url; ?> "> <span class="title"><?php _e('Shopping cart', THEME_LANG); ?> </span> <span class="total"><?php echo sprintf(_n('%d item', '%d items', $cart_count), $cart_count); ?> <?php _e('-', THEME_LANG); ?> <?php echo $cart_total; ?> </span> <span class="notify notify-left"><?php echo $cart_count; ?> </span> </a> <?php echo kt_get_cart_content($cart_content, $cart_total, $check_out_url); ?> </div> <?php } ?> <?php } $result = ob_get_contents(); ob_clean(); return $result; }