Beispiel #1
0
    function wd_print_header_body()
    {
        global $wd_data;
        $header_layout = 'v1';
        if (isset($wd_data['wd_header_layout'])) {
            $header_layout = $wd_data['wd_header_layout'];
        }
        ?>
	
			<div class="header-middle">
				<div class="wd_mobile_menu_content">
					<?php 
        if (has_nav_menu('mobile')) {
            wp_nav_menu(array('container_class' => 'mobile-menu', 'theme_location' => 'mobile'));
        } else {
            wp_nav_menu(array('container_class' => 'mobile-menu', 'theme_location' => 'primary'));
        }
        ?>
				</div>
				<div class="header-middle-content container <?php 
        echo $header_layout != 'v1' ? 'visible-xs' : '';
        ?>
">
					<?php 
        theme_logo();
        ?>
					
						<div class="header_woo_content">
							<?php 
        if ($header_layout == 'v1') {
            ?>
							<div class="shopping-cart shopping-cart-wrapper visible-phone">
								<?php 
            echo wd_tini_cart();
            ?>
							</div>
							<?php 
        }
        ?>
							<div class="phone_quick_menu_1 visible-xs">
								<div class="mobile_my_account">
									<?php 
        if (is_user_logged_in()) {
            ?>
										<a class="bold-upper-small" href="<?php 
            echo get_permalink(get_option('woocommerce_myaccount_page_id'));
            ?>
" title="<?php 
            _e('My Account', 'wpdance');
            ?>
"><?php 
            _e('My Account', 'wpdance');
            ?>
</a>
									<?php 
        } else {
            ?>
										<a class="bold-upper-small" href="<?php 
            echo get_permalink(get_option('woocommerce_myaccount_page_id'));
            ?>
" title="<?php 
            _e('Login / Register', 'wpdance');
            ?>
"><?php 
            _e('Login / Register', 'wpdance');
            ?>
</a>
									<?php 
        }
        ?>
								</div>
							</div>
							<?php 
        if ($header_layout == 'v1') {
            ?>
							<div class="mobile_cart_container visible-xs">
								<div class="mobile_cart">
								<?php 
            global $woocommerce;
            if (isset($woocommerce) && isset($woocommerce->cart)) {
                $cart_url = $woocommerce->cart->get_cart_url();
                echo "<a class='bold-upper-small' href='{$cart_url}' title='View Cart'>" . __('View Cart', 'wpdance') . "</a>";
            }
            ?>
								</div>
								<div class="mobile_cart_number">0</div>
							</div>
							<?php 
        }
        ?>
						</div>
					
					<div class="clear"></div>
				</div>
			</div><!-- end .header-middle -->			
		
	<?php 
    }
 function wd_update_tini_cart()
 {
     die($_tini_cart_html = wd_tini_cart());
 }
Beispiel #3
0
    function wd_print_header_body()
    {
        ?>
	
			<div class="header-middle">
				<div class="header-middle-content">
					<?php 
        theme_logo();
        ?>
					<div class="header_woo_content">
						<div class="header-bottom-wishlist">
							<?php 
        echo wd_tini_account();
        //TODO : account form goes here
        ?>
						</div>
						<div class="shopping-cart shopping-cart-wrapper">
							<?php 
        echo wd_tini_cart();
        ?>
						</div>
						<div class="phone_quick_menu_1 visible-phone">
							<div class="mobile_my_account">
								<?php 
        if (is_user_logged_in()) {
            ?>
									<a href="<?php 
            echo get_permalink(get_option('woocommerce_myaccount_page_id'));
            ?>
" title="<?php 
            _e('My Account', 'wpdance');
            ?>
"><?php 
            _e('My Account', 'wpdance');
            ?>
</a>
								<?php 
        } else {
            ?>
									<a href="<?php 
            echo get_permalink(get_option('woocommerce_myaccount_page_id'));
            ?>
" title="<?php 
            _e('Login / Register', 'wpdance');
            ?>
"><?php 
            _e('Login / Register', 'wpdance');
            ?>
</a>
								<?php 
        }
        ?>
							</div>
						</div>
						<div class="mobile_cart_container visible-phone">
							<div class="mobile_cart">
							<?php 
        global $woocommerce;
        if (isset($woocommerce) && isset($woocommerce->cart)) {
            $cart_url = $woocommerce->cart->get_cart_url();
            echo "<a href='{$cart_url}' title='View Cart'>View Cart</a>";
        }
        ?>
							</div>
							<div class="mobile_cart_number">0</div>
						</div>
					</div>
					<div class="header_search"><?php 
        wd_product_search_form();
        ?>
</div>
				</div>
			</div><!-- end .header-middle -->	
			<?php 
        wp_reset_query();
        ?>
			
		
	<?php 
    }