Subversion Repositories SmartDukaan

Rev

Rev 7791 | Blame | Compare with Previous | Last modification | View Log | RSS feed

        #set($Integer = 0)
        #if($defaultAddressId)
                #set($defaultid = $Integer.parseInt($defaultAddressId))
        #else
                #set($defaultid = 0)
        #end
        
        #if($defaultStoreAddressId)
                #set($defaultStoreId = $Integer.parseInt($defaultStoreAddressId))
        #else
                #set($defaultStoreId = 0)
        #end
        
        #if(!$errorMsg.isEmpty())
                <div id="messageError">
                        <span></span>
                        <p>$errorMsg <br/></p>
                </div>
        #end
        <div id="proceedToPayContainer" style="float:left; width:100%">
                <div class="free-shipping left">
                        <div class="label">Shipping to your area is <span class="orange">FREE</span>.</div>
                        <div class="payment-modes-msg">
                                We accept all <b>credit / debit cards</b> and <b>netbanking facilities</b>. You can also pay <b>Cash on Delivery</b>.
                        </div>
                        #if($selectedTab == "HotSpot")
                                #set($visibility = "")
                        #else
                                #set($visibility = "invisibleDiv")
                        #end
                        <div id="inStoreLocationMsg" style="color:red; font-size:15px" class="$visibility">
                                Pickup in store is currently available only for Delhi/NCR
                        </div>
                </div>
                <form id="formProceedToPay" action="/proceed-to-pay" method="post">
                        <input type="hidden" value="$defaultid" name="addressid" id="addressid">
                        <input type="hidden" name="deliveryLocation" value="$selectedTab" id="tabSelector">
                        <input type="hidden" name="hotSpotAddressId" value="$defaultStoreId" id="hotSpotAddressId">
                </form>
                <div id="proceedToPay" class="cartflow-main-action-button right">PROCEED TO PAYMENT &gt;</div>
        </div>  
                #if($items)
                <div class="cart-container left">
                        <table id="cartDetail" cellpadding="0" cellspacing="0" class="left">
                                <thead>
                                        <tr>
                                                <th width="212" class="first">Item &amp; Color</th>
                                                <th width="117">Delivery Time</th>
                                                <th width="99">Total Price </th>
                    </tr>
                </thead>
                                <tbody>
                                #foreach($item in $items)
                                        #if($item.get("SHIPPING_TIME") == -1)
                                                #set($locationServiceable = 0)
                                                #set($messageShippingTime = "Location not serviceable")
                                        #else
                                                #set($locationServiceable = 1)
                                                #set($messageShippingTime = $item.get("SHIPPING_TIME"))
                                        #end
                                        <tr>
                                                #set($style='')
                                                #if(!$item.get("INSURER").equals("0"))
                                                        #set($style = 'background: white url("/images/insuredStamp.png") no-repeat right;background-size: 76px;')
                                                #end
                                                <td style='$style'>
                                                        <div class="cart-item-name-div padding5">
                                <span class="cart-item-name">$item.get("ITEM_NAME")</span><br/>
                                                                <span class="cart-item-color">$item.get("ITEM_COLOR")</span>
                                                #if($item.get("BEST_DEAL_TEXT"))
                                                                <div class="cart-item-best-deal-text">$item.get("BEST_DEAL_TEXT")</div>
                                                #end
                            </div>
                        </td>
                                                <td id="shipping_time_$item.get("ITEM_ID")">$messageShippingTime</td>
                                                <td>
                                                        <img src="/images/rupee-symbol.png" alt="Rs." /> 
                                                        $item.get("TOTAL_PRICE")<br />(for $item.get("ITEM_QUANTITY") pcs)
                                                </td>
                    </tr>
                                #end
                                #if($couponcode != "")
                                        #set($cssClass = "")
                                #else
                                        #set($cssClass = "payable")
                                #end
                                #if($totalInsurance != "0.00")
                                        <tr>
                                                <td colspan ='2' class='label' style='border:none;'>1 Year WorldWide Theft Insurance</td>
                                                <td style='border:none;'><img src="/images/rupee-symbol.png" alt="Rs." /> $totalInsurance</td>
                                        </tr>
                                #end
                                #if($isAnyItemDataProtected=="true")
                                        <tr>
                                                <td colspan ='2' class='label' style='border:none;'>3 Months Data Protection</td>
                                                #if($oneAssistAmount != "0.00")
                                                        <td style='border:none;'><img src="/images/rupee-symbol.png" alt="Rs." /> $oneAssistAmount</td>
                                                #else
                                                        <td class="orange" style="border: medium none;">FREE</td>
                                                #end
                                        </tr>
                                #end
                                #if($couponcode == "")
                                <tr>
                                        <td colspan='2' class="label">SHIPPING</td>
                                        <td class="orange">FREE</td>
                                </tr>
                                <tr class="total-amount payable" style='background-color:#FFFFCC;font-size:14px;font-weight:bold;'>
                                        <td colspan='2' class="label">Total Amount</td>
                                        <td><img src="/images/rupee-symbol.png" alt="Rs." /> $totalamount</td>
                                </tr>
                                #else
                                <tr class="total-amount">
                                <td colspan='2' class="label" style='border:none;'>Coupon <span style='font-weight:bold;color:#2789C1;font-size:14px;'>$couponcode</span></td>
                                <td style='border:none;'><img src="/images/rupee-symbol.png" alt="Rs." /> $discount</td>
                                </tr>
                                <tr>
                                        <td colspan='2' class="label">SHIPPING</td>
                                        <td class="orange">FREE</td>
                                </tr>
                                <tr class="discounted-amount payable" style='background-color:#FFFFCC;font-size:14px;font-weight:bold;'>
                                        <td colspan='2' class="label">Total Amount</td>
                                        <td id="discountedAmount"><img src="/images/rupee-symbol.png" alt="Rs." /> $discountedamount</td>
                                </tr>
                                #end
                </tbody>
            </table>
        </div>
                #end
                #if($insuranceDetailsRequired.equals("standAlone"))
                <div id="insuranceDetailDiv" style="margin-bottom:10px;box-shadow: 0 0 5px 0px #AAA inset;padding:10px;border: 1px solid #AAA;float:right;width: 472px;">
                        <div id='thanks' style='display:none;color:#2789c1;font-size:14px;text-align:center;'>Thank you!</div>
                <h3>Please enter the following details</h3>
                <form id="insuranceDetailsForm" style="padding:7px 7px 0 7px;">
                           <div style="margin-bottom:7px;">
                                <span style="font-size:13px;color:#444;display:inline-block;width: 42%;text-align: right;padding-right: 5px;">Father's/Husband's Name : </span>
                                <span style="display:inline-block;width:55%;">
                                        <input id='guardianName' class='insuranceDetailField' name="guardianName" type="text">
                                </span>
                        </div>
                        <div style="margin-bottom:7px;">
                                <span style="font-size:13px;color:#444;display:inline-block;width: 42%;text-align: right;padding-right: 5px;">Date of Birth (dd/mm/yyyy) : </span>
                                <span style="display:inline-block;width:55%;">
                                        <input id='dob' name="dob" class='insuranceDetailField' type="text" style='color:#999;' value='Example: 18/08/1986'>
                                </span>
                                <input id="insuranceType" type="hidden" name="insuranceType" value="">
                        </div>
                                        <div id='insDetErr' style="display:none;border: 1px solid red;padding: 7px;text-align: center;color: red;font-size: 14px;margin: 0 -5px 0 -5px;background-color: lightyellow;box-shadow: 0 0 3px 0 red inset;">
                                        </div>
                        <div style="margin:13px 5px 13px 0;text-align: right;">
                                <input id='submitInsuranceDetails' type="button" value="Submit" style="height: 25px;width: 125px;background-color: skyblue;color: black;font-weight: bold;">
                        </div>
                        <div id="insuranceHelpInfo" style="border-top:1px solid #999;color:#777;font-size:13px;padding:5px;">
                                        We need these details for the purpose of insurance.<br>
                                        If you do not wish to take insurance <a id="cancelInsurance" style="cursor:pointer">click here</a><br>
                                        If this product is being billed in the name of an institution <a id="companyInsurance" style="cursor:pointer">click here</a>
                        </div>
                </form>
            </div>
                #end
                <div id="main-right-container">
                        #set($myLocation-tab-status = "selected-tab")
                        #set($hotSpot-tab-status = "unselected-tab")
                        #set($shipping-div-status = "")
                        
                        #set($billing-and-store-div-status = "hidden-div")
                        #if($selectedTab == "HotSpot")
                                #set($myLocation-tab-status = "unselected-tab")
                                #set($hotSpot-tab-status = "selected-tab")
                                #set($shipping-div-status = "hidden-div")
                                #set($billing-and-store-div-status = "")
                        #end
                        <div id="tab-container">
                        <div id="tab-left" class=$myLocation-tab-status>DELIVER TO MY ADDRESS</div>
                        <div class=$hotSpot-tab-status id="tab-right" style="padding: 5px 9px 3px 39px; margin-right: 0px; width: 190px; text-align: left; margin-top: 13px; border-top-width: 1px;">PICKUP IN STORE
                     <a style="padding-left:2px" href="javascript:void(0)" id="pickupstoreInfo">
                                                <img id="whats-this" style="vertical-align:middle" src="/images/quesmark.png">
                                        </a>
                                </div>
                        </div>
                        
                        <div id="store-address-div" class=$billing-and-store-div-status>
                        <div id="hotspot-address-heading" class="label">
                                        <div id="store-address-header-text" class="address-header-text">&nbsp;Select a pickup point (<b>$storeAddresses.size()</b> stores available)</div>
                                        <div id="zone-selector-div">
                                                <select id="zone-selector">
                                                        #foreach($zone in $allZones)
                                                                #if($zone == "All")
                                                                        <option id="$zone" value="$zone" >Select Zone</option>
                                                                #else
                                                                #set($stringWithoutSpace = $zone.replace(" ", "_"))
                                                                <option id="$stringWithoutSpace" value="$stringWithoutSpace" >$zone</option>
                                                                #end
                                                        #end
                                                </select>
                                        </div>
                                </div>
                        <div id="store-address-container">
                        <table id="store-addresses" class="shipping-page-addresses right">
                                <tbody>
                                #foreach($storeAddress in $storeAddresses)
                                        #set($storeAddressId = $storeAddress.getId())
                                        
                                        #if($defaultStoreId == $storeAddressId)
                                                #set($cssClassDefault = "default-address")
                                        #else
                                                #set($cssClassDefault = "")
                                        #end
                                                <tr id="tr_$storeAddress.getId()" class="address $cssClassDefault" zone="$storeAddress.getZone().replace(" ", "_")">
                                                        <td align="center" valign="top" class="radio">
                                        #if($defaultStoreId == $storeAddressId)
                                                        <img src="/images/RadioButton_Selected.png" />
                                                        <input type="hidden" id="selectedPincode" value="$storeAddress.getPin()" />
                                                        #else
                                                <img id="selectStoreAddress_$storeAddressId" class="store-address-selector-button" src="/images/RadioButton_Unselected.png" title="Select this Store for Shipment" />
                                                                <form id="formChangeStoreAddressTo_$storeAddressId" method="post" action="/shipping">
                                                                                                <input type="hidden" name="selectedTab" value="HotSpot" />
                                                                                                <input type="hidden" name="addressid" value="$storeAddressId" />
                                                                                                <input type="hidden" name="action" value="change" />
                                                                                </form>
                                        #end
                                        </td>
                                                        <td class="detail">
                                                                #if($storeAddress.getName())
                                                                        <b>$storeAddress.getName()</b><br />
                                                        #end
                                                        #if($storeAddress.getLine1())
                                                                        <label>$storeAddress.getLine1() </label><br />
                                                        #end    
                                                        #if($storeAddress.getLine2() != "")
                                                                        <label>$storeAddress.getLine2()</label><br />
                                                        #end
                                                        #if($storeAddress.getCity())    
                                                                        <label>$storeAddress.getCity()</label><br />
                                                        #end
                                                        #if($storeAddress.getState())
                                                                        <label>$storeAddress.getState()</label><br />
                                                        #end
                                                        #if($storeAddress.getPin())     
                                                                        <label>Pin: $storeAddress.getPin()</label>
                                                                #end
                                            </p>
                                                        #if($storeAddress.getPhone())
                                            <b>Phone: $storeAddress.getPhone() </b>
                                                        #end
                                        </td>
                                    </tr>
                                #end
                        </tbody>
                    </table>
                        </div><!--End of store address container-->
                        </div>
                        <div id="billing-address-div" class=$billing-and-store-div-status>
                        <div id="billing-address-header" class="address-header label left">
                                <div id="billing-address-header-text" class="address-header-text">Select Billing Address</div>
                                <button id="addAddress" class="right">+ Add New Address</button>
                        </div>
                        <div id="billing-address-container">
                                <table id="billing-addresses" class="shipping-page-addresses right">
                                <thead></thead>
                                <tbody>
                        #set($shipAddressEmpty = 1)
                        #foreach($address in $addresses)
                                #set($shipAddressEmpty = 0)
                                #set($addressId = $address.getId())
                                
                                #if($defaultid == $addressId)
                                        #set($cssClassDefault = "default-address")
                                #else
                                        #set($cssClassDefault = "")
                                #end
                                        <tr id="tr_$address.getId()" class="address $cssClassDefault">
                                                <td align="center" valign="top" class="radio">
                                #if($defaultid == $addressId)
                                        #set($shipAddressEmpty = 0)
                                                        <img id="selectAddress_$addressId" class="dummy-class" src="/images/RadioButton_Selected.png" title="Select this Address for Shipment" />
                                                        <!--<input type="hidden" id="selectedPincode" value="$address.getPin()" />-->
                                #else
                                                    <img id="selectAddress_$addressId" class="billing-address-selector-button" src="/images/RadioButton_Unselected.png" title="Select this Address for Shipment" />
                                                        <!--<form id="formChangeAddressTo_$addressId" method="post" action="/shipping?action=change&selectedTab=HotSpot&addressid=$addressId">
                                                                        </form>-->
                                #end
                                </td>
                                                <td class="detail">
                                                        #if($address.getName())
                                                                <b>$address.getName()</b><br />
                                                #end
                                                #if($address.getLine1())
                                                                <label>$address.getLine1() </label><br />
                                                #end    
                                                #if($address.getLine2() != "")
                                                                <label>$address.getLine2()</label><br />
                                                #end
                                                #if($address.getCity()) 
                                                                <label>$address.getCity()</label><br />
                                                #end
                                                #if($address.getState())
                                                                <label>$address.getState()</label><br />
                                                #end
                                                #if($address.getPin())  
                                                                <label>Pin: $address.getPin()</label>
                                                        #end
                                    </p>
                                                #if($address.getPhone())
                                    <b>Phone: $address.getPhone() </b>
                                                #end
                                </td>
                                                <!--<td class="delete">
                                                        <img id="delete_$addressId" class="delete-address" src="/images/Cross_DeleteRow_DEF.png" title="Delete this Address"/>
                                                                </td>-->
                            </tr>
                        #end
                        #if($shipAddressEmpty!=0)
                            <tr><td colspan="2">You do not have an address linked to your profile. Please add one.</td></tr>
                        #end
                                <input type="hidden" id="addressEmpty" value="$shipAddressEmpty">
                        </tbody>
                    </table>
                        </div>
                        </div>
                        <div id="shipping-address-div" class=$shipping-div-status>
                        <div id="shipping-address-header" class="address-header label left">
                                <div id="shipping-address-header-text" class="address-header-text">Select Shipping Address</div>
                                <button id="addAddress" class="right">+ Add New Address</button>
                        </div>
                        <div id="shipping-address-container">
                                <table id="shipping-addresses" class="shipping-page-addresses right">
                                <thead></thead>
                                <tbody>
                        #set($shipAddressEmpty = 1)
                        #foreach($address in $addresses)
                                #set($shipAddressEmpty = 0)
                                #set($addressId = $address.getId())
                                
                                #if($defaultid == $addressId)
                                        #set($cssClassDefault = "default-address")
                                #else
                                        #set($cssClassDefault = "")
                                #end
                                        <tr id="tr_$address.getId()" class="address $cssClassDefault">
                                                <td align="center" valign="top" class="radio">
                                #if($defaultid == $addressId)
                                        #set($shipAddressEmpty = 0)
                                                        <img src="/images/RadioButton_Selected.png" />
                                                        <input type="hidden" id="selectedPincode" value="$address.getPin()" />
                                #else
                                                    <img id="selectAddress_$addressId" class="button-address-select" src="/images/RadioButton_Unselected.png" title="Select this Address for Shipment" />
                                                        <form id="formChangeAddressTo_$addressId" method="post" action="/shipping?action=change&selectedTab=myLocation&addressid=$addressId">
                                                                        </form>
                                #end
                                </td>
                                                <td class="detail">
                                                        #if($address.getName())
                                                                <b>$address.getName()</b><br />
                                                #end
                                                #if($address.getLine1())
                                                                <label>$address.getLine1() </label><br />
                                                #end    
                                                #if($address.getLine2() != "")
                                                                <label>$address.getLine2()</label><br />
                                                #end
                                                #if($address.getCity()) 
                                                                <label>$address.getCity()</label><br />
                                                #end
                                                #if($address.getState())
                                                                <label>$address.getState()</label><br />
                                                #end
                                                #if($address.getPin())  
                                                                <label>Pin: $address.getPin()</label>
                                                        #end
                                    </p>
                                                #if($address.getPhone())
                                    <b>Phone: $address.getPhone() </b>
                                                #end
                                </td>
                            </tr>
                        #end
                        #if($shipAddressEmpty!=0)
                            <tr><td colspan="2">You do not an shipping address linked to your profile. Please add one.</td></tr>
                        #end
                                <input type="hidden" id="addressEmpty" value="$shipAddressEmpty">
                        </tbody>
                    </table>
                        </div>
                        </div>
                
                #if($shipAddressEmpty == 1)
                        <input type="hidden" id="canProceedToPay" value="0" />
                        <input type="hidden" id="reasonActionDisability" value="No address selected" />
                #elseif($locationServiceable == 0)
                        <input type="hidden" id="canProceedToPay" value="0" />
                        <input type="hidden" id="reasonActionDisability" value="Location not serviceable. Please specify a different address" />
                #else
                        <input type="hidden" id="canProceedToPay" value="1" />
                #end
                <!-- Add Shipping Detail Start-->
        <form name="frmShippingAddress" id="frmShippingAddress" method="post" action="/shipping" class="right">
                        <table cellpadding="0" cellspacing="0">
                                <thead>
                                        <tr class="header">
                                                #if($selectedTab == "HotSpot")
                                                        <td id="newAddressFormHeading" colspan="2">Enter the address which you want printed on the bill</td>
                                                #else
                                                        <td id="newAddressFormHeading" colspan="2">Enter the address where you want the items to be delivered</td>
                                                #end
                                        </tr>
                </thead>
                                <tbody>
                                        <tr>
                                                <td>&nbsp;</td>
                                                <td class="instruction">All Fields are required</td>
                    </tr>
                                        #if($insuranceDetailsRequired.equals("inForm"))
                                                <tr>
                                                <td class="label" align="right"><sup>*</sup>Father's/Husband's Name:</td>
                                                <td class="input">
                                                        <input type="text" id="guardianName" name="guardianName" class="searchbox right" >
                                                        </input>
                                                </td>
                                        </tr>
                                                <tr>
                                                <td class="label" align="right"><sup>*</sup>Date of Birth (dd/mm/yyyy):</td>
                                                <td class="input">
                                                        <input type="text" id="dob" name="dob" style='color:#999;' value='Example: 18/08/1986' class="searchbox right" >
                                                        </input>
                                                </td>
                                        </tr>
                                                <tr >
                                                        <td colspan="2">
                                                                <div id="insDetErr" style="display:none;border: 1px solid red;padding: 7px;text-align: center;color: red;font-size: 14px;margin: 0 -5px 0 -5px;background-color: lightyellow;box-shadow: 0 0 3px 0 red inset;">
                                                                </div>
                                                        </td>
                                                </tr>
                                                <tr id="insuranceHelpInfo">
                                                        <td colspan="2" style="color:#777;font-size:13px;padding:5px;">
                                                We need the above details for the purpose of insurance.<br>
                                                If you do not wish to take insurance <a id="cancelInsurance" style="cursor:pointer">click here</a><br>
                                                                <hr>
                                                        </td>   
                                                </tr>
                                        #end
                                        <tr>
                                        <td class="label" align="right"><sup>*</sup>Name:</td>
                                        <td class="input">
                                                <input type="text" id="shipName" name="name" class="searchbox right" >
                                                        </input>
                                        </td>
                                </tr>
                    <tr>
                                        <td class="label" align="right"><sup>*</sup>Address Line 1:</td>
                                        <td class="input">
                                                <input type="text" id="shipAddress1" name="line1" class="searchbox right" />
                                        </td>
                                </tr>
                    <tr>
                                        <td class="label" align="right">Address Line 2:</td>
                                        <td class="input">
                                                <input type="text" id="shipAddress2" name="line2" class="searchbox right" />
                                        </td>
                                </tr>
                    <tr>
                                        <td class="label" align="right"><sup>*</sup>State</td>
                                        <td class="input">
                                                <select class="select_state" name="state" id="shipState">
                                                #include("templates/stateslist.vm")
                                                </select>
                                        </td>
                                </tr>
                    <tr>
                                        <td class="label" align="right"><sup>*</sup>City:</td>
                                        <td class="input">
                                                <input type="text" id="shipCity" name="city" class="searchbox"/>
                                        </td>
                                </tr>
                    <tr>
                                        <td class="label" align="right"><sup>*</sup>Pin Code:</td>
                                        <td class="input">
                                                <input type="text" id="shipPin" name="pincode" value="" class="searchbox textbox-pincode" />
                                        </td>
                                </tr>
                    <tr>
                                        <td class="label" align="right"><sup>*</sup>Phone:</td>
                                        <td class="input">
                                                <input type="text" id="shipPhone" name="phone" value="" class="searchbox right" />
                                        </td>
                                </tr>
                    <tr>
                                        <td colspan="2" align="center">
                                                <input type="hidden" name="action" value="add" />
                                                <input type="submit"  id="submitAddress" value="Save" class="new-button" />
                                                <a id="closeAddAddressForm">Close</a>
                                        </td>
                                </tr>
                                <tr>
                                        <td>&nbsp;</td>
                                        <td class="instruction">This will be added to your list of addresses</td>
                                </tr>
                </tbody>
                        </table>
                        #if($selectedTab == "HotSpot")
                                <input id="tabSelectorForAddAddressForm" type="hidden" name="selectedTab" value="HotSpot" />
                        #else
                                <input id="tabSelectorForAddAddressForm" type="hidden" name="selectedTab" value="myLocation" />
                        #end
                </form>
        </div><!--End of main-right- Container-->