steveosoule
12/28/2016 - 8:54 PM

Miva WordPress Hybrid Sample

Miva WordPress Hybrid Sample

WP-HEADER

Template

<mvt:do file="g.Module_Library_Utilities" name="g.datetime" value="Format_SOAP_DateTime( s.dyn_time_t )" />
<!-- !@! datetime: &mvt:global:datetime; -->

<div id="site-container">
    <div id="global-header"><mvt:item name="hdft" param="global_header" /></div>
    <div id="navigation-bar"><mvt:item name="navbar" /></div>
    <table id="content-container">
        <tr>
            <td id="left-navigation"><mvt:item name="category_tree" /></td>
            <td id="main-content">

Items

CodeModule
affiliatelinkCSSUI Affiliate Sign-in Link
buttonsCSSUI Buttons
category_treeCSSUI Category Tree
cssui_linksCSSUI Links
customerlinkCSSUI Customer Sign-in Link
hdftCSSUI Headers & Footers
navbarCSSUI Navigation Bar
readythemeReadyTheme
storeStandard Store Fields
tokenlistToken List
urlsCSSUI URLs

WP-FOOTER

Template

            </td>
        </tr>
    </table>
    <div id="bottom-wrap"></div>
    <div id="global-footer"><mvt:item name="hdft" param="global_footer" /></div>
</div>

<mvt:do file="g.Module_Library_Utilities" name="g.datetime" value="Format_SOAP_DateTime( s.dyn_time_t )" />
<!-- !@! datetime: &mvt:global:datetime; -->

</body>
</html>

Items

CodeModule
ga_jsencodeGoogle Analytics
ga_trackingGoogle Analytics
hdftCSSUI Headers & Footers
urlsCSSUI URLs

header.php

<?php
/**
 * The template for displaying the header
 *
 * Displays all of the head element and everything up until the "site-content" div.
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */
?>
<?php $hostname = $_SERVER['SERVER_NAME']; ?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width">
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <base href="//<?php echo $hostname; ?>/mm5/" />
    <!--[if lt IE 9]>
    <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
    <![endif]-->

    <!-- <link rel='stylesheet' id='miva-css' href='//<?php echo $hostname; ?>/css/css.php' type='text/css' media='all' /> -->
    <link type="text/css" rel="stylesheet" href="css/00000001/cssui.css" media="all" />
    <link type="text/css" rel="stylesheet" href="css/00000001/minibasket.css" media="all" />
    <link type="text/css" rel="stylesheet" href="css/00000001/readytheme.css" media="all" />

    <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php

    $wp_header = get_transient( 'wp_header' );

    if( $wp_header === FALSE )
    {
        $wp_header = file_get_contents("http://" . $hostname . "/mm5/merchant.mvc?Screen=WP-HEADER");
        set_transient( 'wp_header', $wp_header, 12*HOUR_IN_SECONDS );
    }

    echo $wp_header;
?>

footer.php

<?php
/**
 * The template for displaying the footer
 *
 * Contains the closing of the "site-content" div and all content after.
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */
?>
</div>
</div>
<?php
    echo '<div class="column-left column large-show large-one-fourth large-pull-three-fourths x-large-one-fifth x-large-pull-four-fifths">';
        get_sidebar();
    echo '</div>';
?>
<div><div>
<?php
    $wp_footer = get_transient( 'wp_footer' );

    if( $wp_footer === FALSE )
    {
        $hostname = $_SERVER['SERVER_NAME'];
        $wp_footer = file_get_contents("http://" . $hostname . "/mm5/merchant.mvc?Screen=WP-FOOTER");
        set_transient( 'wp_footer', $wp_footer, 12*HOUR_IN_SECONDS );
    }

    echo $wp_footer;
?>
<script type="text/javascript">
    $(document).ready(function(){
        var randomNo = Math.ceil(Math.random() * 1000000);
        var url = '//' + window.location.hostname + '/mm5/merchant.mvc?Screen=WP-BASKET&v=' + randomNo;
        $.get(url, function(xml) {
            $('#js-mini-basket-count, #js-mobile-basket-count, #js-mobile-footer-basket-count, #js-mobile-menu-basket-count, .top-mobile-menu-num, .bottom-mobile-menu-num, .mobile-menu-num').html( $(xml).find('basket_count').html() );
            $('#js-mini-basket-container').html( $(xml).find('mini_basket').find('#js-mini-basket-container').html() );
            var minibasket=new MiniBasket;
        });
    });
</script>
<?php wp_footer(); ?>

</body>
</html>