<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js" ng-app="myapp" lang="{$SelCurrLanguage}">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$language.lblAccountinfo} - {$language.lblViewSubscription}</title>
    <meta name="viewport" content="width=device-width">
    <meta name="Description" content="{$commonMetaDescription}" />
    <meta name="Keywords" content="{$commonMetaKeywords}" />
    {include file='CommonStyles.tpl'}
    <link href="{$view_styles}/myaccount.css" rel="stylesheet" type="text/css" media="screen" />
    {include file='CommonJavaScript.tpl'}
    <script type="text/javascript">
      var orderCount = {$getSubscription|@count};
      var lblRecordsFound	=	"{$language.lblRecordfound}"
      var lblPages	=	'{$language.lblPages}'
      	{literal}
      		$(document).ready(function(){
      			$('.pane01 a[rel=purchases]').parent().addClass('active');
                  $('#smart-paginator').smartpaginator({ totalrecords: orderCount, recordsperpage: 10, 
      			onchange:function onChange(){ $('html, body').animate({scrollTop: $(".pane01").offset().top},500);},
      			datacontainer: 'myTable',dataelement: 'li.list', initval:0 , controlsalways:true,display:'single',recordsfoundlabel:lblRecordsFound,pageslabel:lblPages
               	});													
      	});	
      	{/literal}
    </script>	
    
    <script type="text/javascript">
      {literal}
      	$(document).ready(function()
      	{
      		$('.panelmenu a[rel=purchases]').parent().addClass('active');
      		
      	});	
      {/literal}
    </script>
   
  
  </head>
  <body ng-controller="SearchCtrl">
    <div id="outer">
        {*<!-- Begin : Header Pane--> *}
      {include file='CommonTop.tpl'} 
      {*<!-- End : Header -->*}
      <div id="content-wrapper" ng-show="!query" >
        {*<!-- Begin : Content Pane -->*}
        <div class="container">
        <div class="row">
            {include file='account/CommonAccountRightMenu.tpl'}
            <div class="col-xs-12 col-md-9 pull-right details-sec">
            <h2 class="acc-title">{$language.lblMyOrderDetails}</h2>
              <div class="right-panel light-bg">          
                {html->anchor name="back" class="back pull-right" caption=$language.lblBackOrder href="/user/invoice/id/{$resOrderDetails.masterOrderID}/type/{$resOrderDetails.orderType}/"}
                {assign var="masterOrderID" value=$resOrderDetails.masterOrderID}  
                <h3>{$language.lblInvoiceDetials}  
                  
                  </h3>
                <div id="common_message" ></div>
               
                {if !empty($resOrderDetails)} 
                <div class="row invs-block1">
                  
                    {* <!-- Begin : Status Box -->*}
                  <div class="statusBx margin-bottom col-md-6 col-xs-12 pull-left">
                    <ul>
                      {assign var="orderPlacedDate" value=$resOrderDetails.orderCreatedDate}
                      <li class="clearfix"> {$language.lblOrderID} <span>: <strong>{$resOrderDetails.orderNumber}</strong></span> </li>                      
                      <li class="clearfix"> {$language.lblOrderedAt}<span>: {$resOrderDetails.orderCreatedDate|date_format:$settingsDateFormat}&nbsp;{$resOrderDetails.orderCreatedDate|date_format:$settingsTimeFormat} </span> </li>
                      <li class="clearfix"> {$language.lblOrderStatus} <span class="staus">: {$resOrderDetails.orderStatus}</span> </li>
                      <li class="clearfix"> {$language.lblPaymentStatus} <span class="payment-status">: {$resOrderDetails.paymentStatus}</span> </li>
                    </ul>
                  </div>
                  {*<!-- End : Status Box --> *}
                  {*<!-- Begin : Address -->*}
                  <div class="address-wraper col-xs-12 col-md-6 pull-right">
                    {*<!-- Begin : Shipping Address -->*}
                   
                    {*<!-- End : Shipping Address --> *}
                    {*<!-- Begin : Billing Address -->*}
               {*     <div class="TopAddress">
                      <h6>{$language.lblBillinginfo}</h6>
                      <div>
                        <address>
                          {$resOrderDetails.billingAddress|address_format:$languageIDs|strip_tags} <a href="mailto:{$resBillAddress['billingEmail']}">{$resBillAddress['billingEmail']}</a> {if $resBillAddress['billingPhone']} <span> {$language.lblPhone}:  {$resBillAddress['billingPhone']|escape}</span> {/if}
                        </address>
                      </div>
                    </div>*}
                    {*<!-- End : Billing Address --> *}
                  </div>
                  {*<!-- End : Address -->*}
                </div>

                
                {else}
                <div class="warning "> {$language.msgNoRecords}</div>
                {/if} 
                </div>
                       
                  <div class="invoice-detail right-panel light-bg clearfix rmv-padding">
                  <ul class="clearfix" id="myTable">
                              
                     
                      {assign var="unserialize" value=$getSubscription[0].extra|unserialize}
                      <li class="margin-horizontal">
                      <div class="item-list clearfix">
                          <div class="col-sm-5 padding-bottom">
                            <div class="row">
                                <div class="col-sm-3 hidden-xs">
                                    <div class="img-tag">
                                      <img src="{$view_public_path}/uploads/catalog/product/small/{$unserialize.productImage}" class="img-responsive"  />
                                    </div>
                                </div>
                                  
                                <div class="col-xs-12 col-sm-9">
                                    <span>{$unserialize.itemDetails.user.productTitle}</span>
                                     <div class="fade-text font-small">
                                        {if $unserialize.itemDetails.user.productTitle!=$unserialize.itemDetails.user.productOptionName}
                                          <span class="custom-option">
                                            {$unserialize.itemDetails.user.productOptionName}
                                          </span>
                                          {/if} 
                                          {if $unserialize.combinationValues.customOption|default:array()|count >0}
                                          <span>
                                            {$language.lblCombinationSKU}: {$unserialize.combinationValues.cimbinationSKU}
                                            {assign var="count" value=0}
                                            {foreach from=$unserialize.combinationValues.customOption item="combination" key="key"}
                                            {assign var="count" value=$count+1}
                                            {if $count >1} X {/if}
                                              <br>
                                            {$combination.customOptionName} : 
                                            <span>{$combination.variantValue}</span>
                                            {/foreach} 
                                          </span>
                                          {/if}
                                          {if $unserialize.customOptionValues|count >0}
                                          <span>
                                            {assign var="count" value=0}
                                            {foreach from=$unserialize.customOptionValues item="customOptionValues" key="key1"} 
                                            {assign var="count" value=$count+1}
                                            {if $count >1} X {/if}
                                            {$customOptionValues.0.customOptionName}: 
                                            {foreach from=$customOptionValues item="customOption" key="key"}
                                            {if $customOption.inputType != 'file'}
                                            <strong>{$customOption.variantValue}</strong>
                                            {if $key >0},{/if}
                                            {else if $customOption.inputType == 'file' && $customOption.variantValue!=''}
                                            {html->anchor href="/cart/getFile/id/{$customOption.variantValue}/" 
                                            caption="<strong>{$customOption.variantValue }</strong>"
                                            title=$customOption.customOptionName}

                                            {/if}
                                            {/foreach}  
                                            {/foreach} 
                                          </span>
                                          {/if} 
                                            
                                        </div>
                                </div>
                            </div>
                          </div>
                          
                      </div>
                      </li>
                     
                  
                  </ul>
                </div>

                <div class="invoice-detail right-panel light-bg clearfix rmv-padding">
                {if $getSubscription|count > 0}
                  <ul class="clearfix" id="myTable">
                   <li>#</li>           
                   <li>{$language.lblDelivertDate}</li>           
                    <li>{$language.lblStatus}</li>           
                   {foreach from=$getSubscription item="product" key="key1"}
                      
                      <li class="margin-horizontal">
                      <div class="item-list clearfix">
                          <div class="col-sm-5 padding-bottom">
                            <div class="row">
                             
                                <div class="col-xs-12 col-sm-9">
                                    <span>{$key1+(($currPage*10-10)+1)}</span>
                                    
                                </div>
                                <div class="col-xs-12 col-sm-9">
                                    <span>{$product.deliveryDate}</span>
                                    
                                </div>
                                <div class="col-xs-12 col-sm-9">
                                    <span>{$product.deliveryStatus}</span>
                                    
                                </div>
                            </div>
                          </div>
                          
                      </div>
                      </li>
                      {/foreach}
                  
                  </ul>
                   <div id="smart-paginator" > </div>
                   {else}
                  <div class="warning curve-6"> {$language.msgNoRecords}</div>
                  {/if}
                </div>
            
               {* <!-- Starts : Shipping His -->*}
            
               
          
           {* <!-- Ends :Shipping His -->*}
 
          {*<!-- End : Content Pane --> *}
          </div>
        </div>
        </div>
          {*<!-- End : Cart Block -->*} 
          {*<!-- Begin : Rating -->*}
          {*<!-- End : Rating --> *}
        </div>
      </div>
    </div>
   {* <!-- End : Content Pane --> *}
    {*<!-- Begin : Footer	Pane --> *}
    {include file='CommonBottom.tpl'} 
    {*<!-- End : Footer Pane --> *}
    </div>
   {* <!-- End : Outer Pane --> *}
    <script type="text/javascript">
      var COOKIE_PREFIX	=	'{$cookiePrefix|default:''}';
    </script> 
    {form->hidden name="AjaxLoadID" class="fancy-popup" value=''}   
    {html->messages_script id="common_message"}
    {include file='CommonJavaScriptBottom.tpl'} 
   {html->script src="{$common_frontend_js}/smartpaginator.js"}
    {html->script src="{$common_frontend_js}/tab.plugin.js"}  
  {html->script_group_end} 
  </body>

</html>