?> "></a> </h1> <?php if ($mango_settings['show-searchform']) { ?> <div class="header-search-container header-simple-search"> <?php get_search_form(); ?> </div> <?php } ?> <?php mango_cart_total(); ?> <?php if (has_nav_menu('main_menu')) { wp_nav_menu(array('theme_location' => 'main_menu', 'menu_id' => 'menu-main-navigation', 'menu_class' => 'menu btt-dropdown', "depth" => 5, 'container' => 'nav', 'walker' => new mango_top_navwalker())); } ?> <div id="side-menu-footer"> <?php get_template_part("inc/social-icons"); ?> <p class="copyright"><?php echo htmlspecialchars_decode(esc_textarea($mango_settings['mango_copyright'])); ?> </p> </div>
function mango_mini_cart_ajax_load($fragments) { global $woocommerce; ob_start(); echo '<span class="cart-text-price">'; if (sizeof(WC()->cart->get_cart()) > 0) { echo WC()->cart->get_cart_total(); } else { echo get_woocommerce_currency_symbol() . "0"; } echo '</span>'; $fragments['#mango_minicart_container > #cart-dropdown .cart-text-price'] = ob_get_clean(); ob_start(); echo '<span class="cart-text-count">(' . WC()->cart->get_cart_contents_count() . ')</span>'; $fragments['#mango_minicart_container > #cart-dropdown .cart-text-count'] = ob_get_clean(); ob_start(); echo '<div class="dropdown-menu pull-right" id="mango_minicart_container_content" role="menu">'; if (sizeof(WC()->cart->get_cart()) > 0) { foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) { $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key); $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key); if ($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key)) { $product_name = apply_filters('woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key); $thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image("shop-widget"), $cart_item, $cart_item_key); $product_price = apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key); echo '<div class="product clearfix">'; echo apply_filters('woocommerce_cart_item_remove_link', sprintf('<a href="%s" class="remove-btn remove" title="%s"><i class="fa fa-close"></i></a>', esc_url(WC()->cart->get_remove_url($cart_item_key)), __('Remove this item', 'woocommerce')), $cart_item_key); echo '<figure><a href="' . esc_url($_product->get_permalink($cart_item)) . '" title="Product Name">' . $thumbnail . '</a></figure>'; echo '<div class="product-meta">'; echo '<h4 class="product-title"><a href="' . esc_url($_product->get_permalink($cart_item)) . '">' . $product_name . '</a></h4>'; echo '<div class="product-quantity"><span>' . __("Quantity", 'mango') . ':</span>' . $cart_item['quantity'] . '</div>'; echo '<div class="product-price-container">'; echo '<span class="product-price">' . $product_price . '</span>'; echo '</div>'; echo '</div>'; echo '</div>'; } } echo '<div class="cart-total">'; echo '<div class="dropdown-subtotal">'; echo '<span>' . __("Subtotal", 'mango') . ':</span>' . WC()->cart->get_cart_subtotal(); echo '</div>'; echo '<div class="dropdown-total">'; echo '<span>' . __("Grand Total", 'mango') . ':</span>' . WC()->cart->get_cart_total(); echo '</div>'; echo '</div>'; echo '<div class="cart-action clearfix">'; echo '<a href="' . get_permalink(get_option('woocommerce_cart_page_id')) . '" class="btn btn-custom4">' . __("View Cart", 'woocommerce') . '</a> <a href="' . get_permalink(get_option('woocommerce_checkout_page_id')) . '" class="btn btn-custom">' . __("Checkout", 'woocommerce') . '</a>'; echo '</div>'; } else { echo '<div class="cart-total">'; echo __('No products in the cart.', 'woocommerce'); echo '</div>'; } echo '</div>'; $fragments['#mango_minicart_container_content'] = ob_get_clean(); ob_start(); mango_cart_total(); $fragments['#mango_minicart_price'] = ob_get_clean(); return $fragments; }