<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblAdmin} : {$language.lblOrderDetails}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
{include file='CommonCustomStyles.tpl'}
<style>
#colorbox, #cboxOverlay, #cboxWrapper 
{
	z-index: 10000 !important;
}
</style>
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/product-details.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/chosen.css" />
<link href="{$view_styles}/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="{$view_javascript}/chosen.pluggin.js" type="text/javascript"></script> 
<script type="text/javascript" >
	
        var lblAddFreeProduct   = '{$language.lblAddFreeProduct}';
        var lblUpdate           = '{$language.lblUpdate}';
</script>
</head><body>
<div class="outer_container"> 
	{include file='CommonTop.tpl'} 
	<!--End:Header Container--> 
	<!--***********************************************************************END HEADER CONTAINER******************************************************-->
	<div class="content_container">
		<div class="content_wrapper">
			<div class="product-basic-info"> 
				{form->start name="formOrder" action="" method="post" enctype="multipart/form-data"} 
							{html->anchor href="/order/edit/id/$orderID/	" 
							caption="{$language.lblListAll}" 
							title="{$language.lblListAll}" 
							class="back-link fixing_right top-space"
							id="cancel"}
							{html->anchor href="/order/index/" caption="{$language.lblCancelBack}" 
							title="{$language.lblCancelBack}" 
							class="back-link fixing_right top-space"
							id="cancel"
							}
                            {form->submit name="saveAddressShipment" id="saveAddressShipment" value="{$language.lblSaveAndCancelShipment}" class="button03 fixing_right "}
                            {form->submit name="save" id="save" value="{$language.lblSaveAndRecreateOrder}" class="button03 fixing_right "}
						{if $resOrderDetails.orderTotalAmount}
						{form->submit name="savePayment" id="savePayment" value="{$language.lblSaveProcessPayment}" class="button03 fixing_right mr-right"}
						{/if}
				<h2>Editing Order #{$resOrderDetails.orderNumber}</h2>
				<div id="common_message"></div>
				<div class="content-tab-block">
					<div class="content-block clearfix"> 
						<!--order_details :: Starts-->
						<div class="product-info-details">
							<div class="order_details clearfix padding-b-15">
								<div class="pane02 width-31per fixing_left">
									<ul class="listing-03">
										<li class="clearfix"> <span class="col-frst">{$language.lblOrderID}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderNumber}</span> </li>
										<li class="clearfix"> <span class="col-frst">{$language.lblUserName}</span> <span class="col-septr">:</span> <span class="col-lst">{if $resOrderDetails.userID > 0 && $userPrivilege}{html->anchor href="user/show/id/{$resOrderDetails.userID}/" caption="{$resOrderDetails.fullName}"}{else}{$resOrderDetails.fullName}{/if}</span> </li>
										<li class="clearfix"> <span class="col-frst">{$language.lblEmailID}</span> <span class="col-septr">:</span> <span class="col-lst"><a href="mailto:{$resOrderDetails.customerEmail}">{$resOrderDetails.customerEmail}</a></span> </li>
										<li class="clearfix"> <span class="col-frst">{$language.lblOrderedAt} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderCreatedDate|date_format:$date_format}</span> </li>
										<li class="clearfix"> <span class="col-frst">{$language.lblOrderStatus}</span> <span class="col-septr">:</span> <span class="col-lst">{$getDynOrderStatusByKey[$resOrderDetails.dynamicOrderStatus]}</span> </li>
										<li class="clearfix"> <span class="col-frst">{$language.lblPaymentStatus} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.paymentStatus}</span> </li>
										{if $resOrderDetails.orderPaymentMethodName}
										<li class="clearfix"> <span class="col-frst">{$language.lblPaymentMethod} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderPaymentMethodName}</span> </li>
										{/if}
										{assign var="linkedOrderID" value=$unserializedExtraData['linkedOrder']['orderID']|default:0}
										{assign var="linkedOrderNumber" value=$unserializedExtraData['linkedOrder']['orderNumber']|default:''}
										{if $linkedOrderID >0}
										<li class="clearfix"> 
											<span class="col-frst">Link to the Previous Order </span> 
											<span class="col-septr">:</span> 
											<span class="col-lst">
												{if $showPrivilege}
													{html->anchor href="/order/show/id/{$linkedOrderID}/" 
													caption=$linkedOrderNumber 
													title=$linkedOrderNumber}
												{else}
													{$linkedOrderNumber}
												{/if}	
											</span> 
										</li>
										{/if}
									</ul>
								</div>
								<!--End:Order Details-->
								<div class="details">
									<div class="left-pane">
                                    {html->anchor href="" class="fixing_right product-preview icon-set edit03" id="edit_billing"}
										<h3 class="padding-b-8">{$language.lblBillinginfo}</h3>
										
										<address>
											{assign var="currentLangID" value=$currentLangID|default:''}
											{$billingAddress|address_format:$languageIDs:'':'':$currentLangID}
											<br />
											<a href="mailto:{$unserializedBillingAddress['billingEmail']|default:''}">{$unserializedBillingAddress['billingEmail']|default:''}</a> 
											{if $unserializedBillingAddress['billingPhone']|default:''} <br />
											<span> {$language.lblPhone}:</span>{$unserializedBillingAddress['billingPhone']|default:''|escape} {/if}
										</address>
									</div>
									<!--End:BILLING information--> 
									<!-- shipping Information-->
									<div class="right-pane">
                                    {html->anchor href="" class="fixing_right product-preview icon-set edit03" id="edit_shipping"}
										<h3 class="padding-b-8">{$language.lblShippinginfo}</h3>
											
										<address>
											{$resOrderDetails.shippingAddress|address_format:$languageIDs:'':'':$currentLangID}
                                                                                        {if $shippingPhone|default:''} <br />
											<span> {$language.lblPhone}:</span>{$shippingPhone|default:''|escape} {/if}
										</address>
									</div>
								  <!-- End shipping Information--> 
								</div>
							</div>
							<div class="clear"></div>
							
							<!-- Start Order Information--> 
							<div class="products_ordered clearfix padding-b-15">
								
								<h3><span>{$language.lblProductsOrdered}</span> </h3>
                                <div class="tab-block clearfix textto_right">
											{form->submit name="recalculate" id="recalculate" value="{$language.lblRecalculate}" class="button-link01 fixing_right top-mspc"}
                                            {html->anchor href="" content="<strong><span class='add'></span>{$language.lblAddProduct}</strong>" 
											default=$language.lblAddProduct 
											title="{$language.lblAddProduct}" 
											class="custom-btnt add click addItem fixing_right"
											id="addItem"
											}
								</div>
								
								<div class="grid_table00">
									<table width="100%" border="0" cellspacing="0" cellpadding="0" >
										<tr>
											<th  width="10%"  align="left" valign="middle"> {$language.lblBusiness} - {$language.lblSKU}</th>
											<th align="left" valign="middle"  >{$language.lblProductTitle}</th>
											<th align="left" valign="middle" width="100" >
												{$language.lblPrice}
											</th>
											<th width="70" align="left" valign="middle" >
												{$language.lblQuantity}
											</th>
											<th align="left" valign="middle" width="5%">{$language.lblTotal}</th>
											<th align="left" valign="middle" width="10%">{$language.lblCurrentShipmentStatus}</th>
											<th align="left" valign="middle" width="20"></th>
										</tr>
										{assign var="prevElement" value=''}
										{assign var="flag" value=0}
										{if $resProductOrderDetails|count >0}
										{foreach from=$resProductOrderDetails item="product" key="key1"}
										{if $prevElement!='' && $prevElement!=$product.shipmentStatus}
											{assign var="flag" value=1}
										{/if}
										{assign var="prevElement" value=$product.shipmentStatus}					
										<tr>
											<td align="left" valign="top">
												{$product.businessName} - {$product.optionSKU}{if $product.orderGiveAsGift eq 'Yes'} &nbsp;(Gift){/if}</td>
											<td align="left" valign="top"> 
												{$product.productTitle}
												{if $product.orderGiveAsGift eq 'Yes'} &nbsp;(Gift){/if} <br />
												{if $product.productOptionName != $product.productTitle}
													(option : {$product.productOptionName})<br/>
												{/if}
												{assign var="unserialize" value=$product.extra|unserialize}
												{if $unserialize.combinationValues.customOption|count|default:0 >0}
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td colspan="2"><b>{$language.lblCombination}</b></td>
													</tr>
													<tr>
														<td width="30%">{$language.lblSKU} </td>
														<td>{$unserialize.combinationValues.cimbinationSKU}</td>
													</tr>
													{foreach from=$unserialize.combinationValues.customOption item="combination" key="key"}
													<tr>
														<td>{$combination.customOptionName} </td>
														<td>{$combination.variantValue}</td>
													</tr>
													{/foreach}
												</table>
												{/if}
                        
												{if $unserialize.customOptionValues|count >0}
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td colspan="2"><b>{$language.Options}</b></td>
													</tr>
													{foreach from=$unserialize.customOptionValues item="customOptionValues"}
													<tr>
														<td width="25%">{$customOptionValues.0.customOptionName} </td>
														{foreach from=$customOptionValues item="customOption" key="key"}
														<td> {if $customOption.inputType=='file'}
														{html->anchor href="/order/getFile/id/{$customOption.variantValue}/" 
														caption=$customOption.variantValue 
														title=$customOption.customOptionName}
														{if $key >0},{/if}
														{else}
														{$customOption.variantValue}{if $key >0},{/if}
														{/if} 
														</td>
														{/foreach} 
													</tr>
													{/foreach}
												</table>
												{/if} 
                                                                                                	{if $product.freeProductGifts|default:'' >0}<br>
                                                                                        {html->anchor href="" content="<strong><span class='add'></span>{$language.lblAddFreeProduct}</strong>" 
											default=$language.lblAddFreeProduct 
											title="{$language.lblAddFreeProduct}" 
											class="add click addItemFree free-gift-product"
											id="addItemFree"
                                                                                        rel="{$product.productID}-{$product.orderItemID}"
											}
                                                                                        {/if}
											</td>
											<td align="left" valign="top">
											
												<span id="orderItemPrice_dispaly_{$product.orderItemID}">
												{$product.orderItemPrice|price:'':$product.purchasedCurrency:$product.purchasedCurrency}
												</span>
												{if $product.shipmentStatus !='Delivered' &&  $product.freeProduct=='No'}
												<span style="display:none;" id="orderItemPrice_textbox_{$product.orderItemID}">
													{form->textbox name="orderItemPrice_"|cat:$product.orderItemID 
													class="textbox " 
													validate="required" 
													error=$language.errEnterPrice maxlength="50"
													value=$product.orderItemPrice
													}

												</span>
                                                                                               
												<br>
												{form->checkbox name="item_use_custom_price_"|cat:$product.orderItemID
												onclick="itemUseCustomPrice(this.checked,{$product.orderItemID})"}
												&nbsp;Custom Price
												{/if}
                                                                                                 {if $product.freeProduct=='Yes'}
                                                                                                        <span class="heading"> ({$language.lblFree}) </span>
                                                                                                {/if}
												
											</td>
											<td align="left" valign="top">
												
													{if $product.shipmentStatus !='Delivered' &&  $product.freeProduct=='No'}
													{form->textbox name="orderItemQuantity_"|cat:$product.orderItemID 
													class="textbox quantity" 
													validate="required" 
													error=$language.errEnterQuantity maxlength="50"
													value=$product.orderItemQuantity
													}
													{else}
													{$product.orderItemQuantity}
													{/if}
												
											</td>
											<td align="left" valign="top"> {$product.orderItemSubtotal|price:'':$product.purchasedCurrency:$product.purchasedCurrency} </td>
											<td  align="left" valign="top"> 
											
												{if $product.shipmentStatus== 'Delivered'}
							{$language.lblDelivered}
						{else if $product.shipmentStatus== 'Shipment'}
							{$language.lblShipmentcreated}
						{else if $product.shipmentStatus== 'Dispatched'}
							{$language.lblDispatched}
						{else if $product.shipmentStatus== 'Pickup'}
							{$language.lblPickupCreated}
						{else if $product.shipmentStatus== 'Pending'}
							{$language.lblPending}
                                                {else if $product.shipmentStatus== 'Cancelled'}
							{$language.lblCancelled}        
						{/if}
												{if $product.shipmentStatus !='Pending'} <br>
												({$product.shipmentDate|date_format:$date_format} 
												{$product.shipmentDate|date_format:$time_format})
												{/if} 
											</td>
											 <td  align="left" valign="top">
												 {if $product.shipmentStatus !='Delivered'}
													 {html->anchor href="" 
													 default=$language.lblRemove 
													 title=$language.lblRemove 
													 class="delete02 icon-set click removeItem"
													 id="removeItem_"|cat:$product.orderItemID
													 rel=$product.orderItemID}
												 {/if}
											 </td>
										</tr>
										{/foreach}
										{/if}
									</table>
								</div>
								<div class="clearfix">
									<table width="47%" align="right">
										<tr>
											<td align="right">
												<div class="order_amount pane02">
													<ul class="listing-03">
														<li class="clearfix"> <span class="col-frst">{$language.lblSubtotal} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderSubtotal|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
														
														{if $resOrderDetails.shippingAmount>0}
														<li class="clearfix"> <span class="col-frst">{$language.lblShippingAmount}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.shippingAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
														{/if}
														{if $resOrderDetails.orderOtherServiceCharge>0}
														<li class="clearfix"> <span class="col-frst">{$language.lblServiceCharge} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderOtherServiceCharge|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
														{/if}
														{if $resOrderDetails.orderConvenientFee>0}
														<li class="clearfix"> <span class="col-frst">{$language.lblConvenientFee} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderConvenientFee|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
														{/if}
														{if $resOrderDetails.orderPromoDiscountAmount>0 || $resOrderDetails.orderTotalAmount >0}
															<li class="clearfix"> <span class="col-frst">{$language.lblDiscount} </span><span class="col-septr">:</span> 
                                                                                                                            <input type="hidden" name="tempOrderPromoDiscountAmount" id="tempOrderPromoDiscountAmount" value="{$resOrderDetails.tempOrderPromoDiscountAmount}">
                                                                                                                        <input type="hidden" name="tempPromoDiscountAmount" id="tempPromoDiscountAmount" value="{$resOrderDetails.tempPromoDiscountAmount}"> 
																<span class="col-lst">
																	{if $resOrderDetails.orderPromoDiscountAmount>0}
																		-
																		{$resOrderDetails.orderPromoDiscountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency} 
																		{if $resOrderDetails.orderPromoCode}
																			({$resOrderDetails.orderPromoCode})
																		{/if}

																			{html->anchor href="" class="product-preview icon-set edit03" id="edit_orderPromoCode"}
																			<span style="display:none;" id="orderPromoCodeTextBox">
																				{form->textbox name="orderPromoDiscountAmount"
																				class="textbox" 
																				value=$resOrderDetails.orderPromoDiscountAmount
																				style="width:5	0%;"
																				}
																			</span>
																	{else}
																		{if $resOrderDetails.orderTotalAmount >0}
																			{html->anchor href="" class="product-preview" caption="Add Promo" id="edit_orderPromoCode"}
																			<span style="display:none;" id="orderPromoCodeTextBox">
																				{form->textbox name="orderPromoDiscountAmount"
																				class="textbox" 
																				value=$resOrderDetails.orderPromoDiscountAmount
																				style="width:5	0%;"}
																			</span>
																		{/if}
																	{/if}
																</span> 
															</li>
														{/if}
														
														{if $resOrderDetails.orderTotalAmount >0}
															<li class="clearfix"> <span class="col-frst">{$language.lblGiveGiftCoupon} </span><span class="col-septr">:</span> 
																<span class="col-lst">
																	{form->textbox name="giftCouponAmount"
																	class="textbox" 
																	style="width:5	0%;"}
																</span>
															</li>	
														{/if}
														
														{if $resOrderDetails.orderUserCreditAmount>0}
														<li class="clearfix"> <span class="col-frst">{$language.lblCreditAmount}</span><span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.orderUserCreditAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
														{/if}
														{if $resOrderDetails.orderTaxAmount>0}
														<li class="clearfix"> <span class="col-frst">{$language.lblTaxAmount}</span><span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderTaxAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
														{/if}
														<li class="clearfix"> <span class="col-frst">{$language.lblTotal}</span><span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderTotalAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
													</ul>
												</div>
											</td>
										</tr>
									</table>
								</div>
							</div>
						</div>
						<!--End:Table Listing--> 
			
						<!--Start:Order management and shipping management--> 
						{form->hidden name="paymentSettingsGroupID" value=$resOrderDetails.paymentSettingsGroupID}
						<div class="manage_order_status padding-b-15 clearfix">
							<div id="common_message_error"></div>
							<!--Start:Order management--> 
                            <div class="width-47per fixing_left">
                            <h3 ><span>{$language.lblManageOrderStatus}</span></h3>
							<div class="pane02">
								<ul class="listing-03">
									<li class="clearfix"> 
										<span class="col-frst">{$language.lblPaymentMethod}</span> <span class="col-septr">:</span>
										<div class="col-lst"><strong> {$resOrderDetails.orderPaymentMethodName}</strong> </div>
									</li>
									<li class="clearfix"> <span class="col-frst">
										{if $flag==0 && $prevElement=='Delivered'} 
										{assign var="statusOption" value="Pending~*Process~*Completed~*Cancelled~*Error~*Backordered"}
										{else}
										{assign var="statusOption" value="Pending~*Process~*Cancelled~*Error~*Backordered"}
										{/if}
										{$language.lblCurrentOrderStatus}</span> <span class="col-septr">:</span>
										<div class="col-lst">{* {form->select name="orderStatus" caption="->Do not change" options=$statusOption onchange="manageOrderStatus();" class="width-auto fixing_right select-box" style="width:100% !important" value=$resOrderDetails.orderStatus}  *}                 
										    {form->select name="dynamicOrderStatus" caption="->Do not change" options=$dynamicOrdersStatus onchange="manageOrderStatus();" class="width-auto fixing_right select-box" style="width:100% !important" value=$resOrderDetails.dynamicOrderStatus}                   
                                                                                    {form->hidden name="currOrderStatus" value=$resOrderDetails.orderStatus} </div>
									</li>
									<li class="clearfix"> 
										<span class="col-frst">{$language.lblCurrentPaymentStatus}</span> <span class="col-septr">:</span>
										<div class="col-lst">{form->select name="paymentStatus" caption="->Do not change" options="Pending~*Denied~*Received~*Refunded~*Error" onchange="manageOrderStatus();" class="width-auto select-box" style="width:100% !important" value=$resOrderDetails.paymentStatus}
										{form->hidden name="currPaymentStatus" value=$resOrderDetails.paymentStatus} </div>
									</li>
									<li class="clearfix"> 
										<span class="col-frst">{$language.lblPaymentNotes}</span> <span class="col-septr">:</span>
										<div class="col-lst"><strong> {form->textarea name="PaymentNotes" id="PaymentNotes" class="textbox"  maxlength="175" value=$resOrderDetails.paymentNotes}</strong> </div>
									</li>
								</ul>
							</div>
                            </div>
							<!--End:Order management--> 
							<!--Start:Shipping management-->
                            <div class="width-47per fixing_right">
                            <h3 ><span>Shipping method</span></h3>
							<div  class="pane02 ">
								<ul class="content">
									{if $shippingMethods|@count>0 && $resProductOrderDetails|count >0}
                                                                        {assign var="shippingMethodCounter" value="1"}
									{foreach $shippingMethods as $items key="key"}
                                                                         {if $group_shipping_cost=='Yes'}	
				                                              {assign var="key" value=$items['businessID']} 
			                                                 {/if}
									<li class="clearfix ajaxCartItems" id="ajaxCartItems{$key}">
										<br><b>{$items.itemName}</b><br><br>
										<ul id="ajaxShippingMethods" class="">
											{if $items.methods|@count|default:0	>0}
											{foreach $items.methods as $method}
                                                                                        {assign var="methodName" value="{$method.methodName}"}
                                                                                        {assign var="showShippingFee" value="Yes"}
                                                                                        {if $items.free_shipping=='true'}
                                                                                            {assign var="methodName" value="{$language.lblFreeShippingPromotion}"}
                                                                                            {assign var="showShippingFee" value="No"}
                                                                                        {/if}
											<li class="clearfix">
												{if $items.shippingMethodID==$method.methodID}
													{assign var="checked" value="checked='checked'"}
												{else}
													{assign var="checked" value=''}
												{/if}
                                                                                                 {if $group_shipping_cost=='Yes'}	
				                                                                   {assign var="checked" value="checked='checked'"}
			                                                                         {/if} 
												<input type="radio" name="shippingMethod_{$key}" 
												class="shippingMethodSelect" 
												id="shippingMethod_{$key}" value="{$method.methodID}" {$checked}>
												{$methodName}	
                                                                                                {if $showShippingFee|default:''=='Yes'}
                                                                                                    {$method.shippingCharge|price:'Full':$cartData.currencyID|default:'':$cartData.currencyID|default:''}
                                                                                                {/if}
												{if $method.settingsGroupKey !='free_shipping' && $method.settingsGroupParent!=1}
												{if $method.shippingtype=='Free'}
													( Free )
												{/if}	
												{/if}
												{if $method.shippingTax|default:0 >0}
													(Tax Inc.)
												{/if}
                                                                                                {*{if $items.free_shipping=='true'}
                                                                                                        <strong>[ {$language.lblFreeShippingPromotion} ]</strong>
                                                                                                {/if}*}
											</li>
											{/foreach}
                                                                                       {if $group_shipping_cost!='Yes'}
											<li>
												{form->validate 
												name="shippingMethodValidate_"|cat:$key|default:0 
												validate="shippingMethod_"|cat:$key|default:0|cat:"->required" 
												error=$language.lblSelectShippingMethod
												}
											</li>
                                                                                          {/if}
											{else}
											<li>
												{$language.lblNoShippingMethodAvilable}
											</li>
											<li>
												{form->validate 
												name="shippingMethod_"|cat:$key|default:0 
												validate="shippingMethod_"|cat:$key|default:0|cat:"->required" 
												error=$language.lblNoShippingMethodAvilable
												}
											</li>
											{/if}
										</ul>
									</li>	
									{/foreach}	
									{else}
									{assign var="key" value=$key|default:0}
                                                                       {if $group_shipping_cost!='Yes'}
									<li>
										{$language.lblNoShippingMethodAvilable}
										{form->validate 
										name="shippingMethod_"|cat:$key|default:0 
										validate="shippingMethod_"|cat:$key|default:0|cat:"->required" 
										error=$language.lblNoShippingMethodAvilable
										}
									</li>
									{/if}
                                                                         {/if}
								</ul>
							</div>
                            </div>
							<!--End:Shipping management-->
							<div class="clear"></div>
						</div>
						<!--End:Order management and shipping management--> 
						
						{if $resOrderDetails.orderTotalAmount>0 && $resOldOrder.orderTotalAmount!=$resOrderDetails.orderTotalAmount}
						<!--Start: Payment Block--> 
						<div class="manage_order_status padding-b-15 clearfix">
							<div class="width-47per">
								<h3><span>{$language.lblPayment}</span></h3>
							<div id="common_message_error"></div>
							<div class=" pane02 ">
								<ul class="levl-00">
									<li class="clearfix">
										{form->hidden name="imgFullPath" value=$view_images}
										{form->hidden name="siteHosted" value=0}
										{form->hidden name="userCardType"}
										{form->hidden name="paymentGatewaysCount" value=$paymentGatewaysCount}
										<div class="left_box">
											<ul class="level00">
												{if $paymentGatewaysCount >0}
												<li class="clearfix">
													<div class="left01 mandatory">
														{$language.lblPaymentMethod}
													</div>
													<div class="right01 ">
														{if $paymentGatewaysCount eq 1}
														{form->hidden name="paymentSettingsGroupKey" value=$resPaymentGateways[0].paySetGroupKey} 
														<strong>{$resPaymentGateways[0].label}</strong> 	
														{else}
														{/if}
														{if $paymentGatewaysCount >1}
														{form->select name="paymentSettingsGroupKey" options=$resPaymentGateways caption="->{$language.lblSelect}"
														class="listbox"}
														{/if}
													</div>
												</li>
												{/if}
												<li class="clearfix payment-div">
													<div class="left01    mandatory">
														{$language.lblCardholderFirstName} 
													</div>
													<div class="right01 ">
														{form->textbox name="creditCardFirstName"  autocomplete="Off" class="textbox width-92per " validate="siteHosted->isequal->1~*required" error=$language.errCardholderFirstName maxlength="50"}
													</div>
												</li>
												<li class="clearfix payment-div">
													<div class="left01    mandatory">
														{$language.lblCardholderLastName}
													</div>
													<div class="right01 ">
														{form->textbox name="creditCardLastName" autocomplete="Off" class="textbox width-92per "  validate="siteHosted->isequal->1~*required" error=$language.errCardholderLastName maxlength="50"}
													</div>
												</li>
												<li class="clearfix payment-div">
													<div class="left01    mandatory">
														{$language.lblCardType} 
													</div>
													<div class="right01 ">
														{form->select name="creditCardType" class="listbox"
														validate="siteHosted->isequal->1~*required" error=$language.errCardType}
													</div>
												</li>
											</ul>
										</div>
										<div class="right_box">
											<ul class="levl-01">
											<li class="clearfix payment-div">
												<div class="left01    mandatory">
													{$language.lblCardNumber} 
												</div>
												<div class="right01 ">
													{form->textbox name="creditCardNumber" autocomplete="Off" class="textbox width-92per "  
													validate="siteHosted->isequal->1~*required" error=$language.errInvalidcc maxlength="20"}
												</div>
											</li>
											<li class="clearfix payment-div">
												<div class="left01    mandatory flt-right">
													{$language.lblSecurityCode}
												</div>
												<div class="right01 ">
													{form->textbox name="securityCode" autocomplete="Off" class="textbox width-50per"  validate="siteHosted->isequal->1~*required~*isNumber" error=$language.errInvalidcvv maxlength="5"}
												</div>
											</li>
											<li class="clearfix payment-div">
												<div class="left01    mandatory">
													{$language.lblExpiryDate} 
												</div>
												<div class="right01 ">
													{form->select name="expMonth" options="01->Jan~*02->Feb~*03->Mar~*04->Apr~*05->May~*06->Jun~*07->Jul~*08->Aug~*09->Sep~*10->Oct~*11->Nov~*12->Dec" class="listbox width-auto"}
													{form->select name="expYear" options=$years class="listbox width-auto"}
												</div>
											</li>
											</ul>
										</div>
									</li>
									<li class="clearfix  ">
										<div class="right1 AjaxOfflinePaymentDesc">
										</div>
                                                                                <div class="codFee margin-top bsfc"></div>
									</li>
								</ul>
							</div>
							</div>
						</div>
						<!--End: Payment Block-->
						{/if}
						{form->close} 
					</div>
					<!--End: left Block-->
					<div class="clear"></div>
				</div>
			</div>
		</div>
  </div>
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'} </div>
{include file='freeGiftProduct.tpl'}
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'} 
<!--End:Outer Container--> 
{html->messages_script id="common_message"}
{form->rootpath_script}
{form->basepath_script} 
</div>
<script type="text/javascript" src="{$view_javascript}/bootstrap.min.js"></script> 
<script type="text/javascript" src="{$view_javascript}/slick.js"></script> 
<script type="text/javascript" src="{$view_javascript}/orderEdit.page.js"></script>
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/tab.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript"  src="{$view_javascript}/jquery.colorbox.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="{$common_js}/jquery.form.js"></script>
{form->validate_script form="formOrder"} 
<script type="text/javascript">
var msgConfirmDelete="{$language.msgConfirmDelete}";
var lblSelectItems	=	"{$language.lblSelectItems}";
var lblNoDataDefault = "{$language.lblNoDataDefault}";
var msgShipMismatch = "{$language.msgShipMismatch}";
var msgDeliveredStatus = "{$language.msgDeliveredStatus}";
var msgPendingStatus = "{$language.msgPendingStatus}"
var lblAddressUpdated = "{$language.lblAddressUpdated}"
var lblAddProduct = "{$language.lblAddProduct}"
var noResults="{$language.lblNoResults}";
var lblBillinginfo="{$language.lblBillinginfo}";
var lblShippinginfo="{$language.lblShippinginfo}";

var confirmation="{$language.lblConfirmation}";
var lblMsgConfirmOrderItemDelete="{$language.lblMsgConfirmOrderItemDelete}";
var lblEntervalidquantity="{$language.lblEntervalidquantity}";
var lblerrRequired="{$language.errEnterValidEmailID}";
var lblerrInvalidEmail="{$language.errEnterValidEmailID}";
var selecttext="{$language.lblSelect}";

var currencyForJS = {$currencyForJS};

$('#newRedeemDiscountAmount').blur(function(){
    if($('#newRedeemDiscountAmount').val()=='' || parseFloat($('#newRedeemDiscountAmount').val())<=parseFloat($('#userRedeemTotalBalance').val())){
        $('#pointsValidateFlag').val('No')
    }else{
        $('#pointsValidateFlag').val('Yes')
    }
})
</script>
</body>
</html>
