Subversion Repositories SmartDukaan

Rev

Rev 5920 | Rev 6936 | Go to most recent revision | 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 && $defaultStoreAddressId != 0)
                #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") + " Bus. Days")
                                        #end
                                        <tr>
                                                <td>
                                                        <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
                </tbody>
            </table>
                        <table class="right net-amount" cellspacing="0">
                                <tr>
                                        <td class="label">SHIPPING:</td>
                                        <td class="orange">FREE</td>
                                </tr>
                                #if($couponcode != "")
                                        #set($cssClass = "")
                                #else
                                        #set($cssClass = "payable")
                                #end
                                <tr class="total-amount $cssClass">
                                        <td class="label">Total Amount:</td>
                                        <td><img src="/images/rupee-symbol.png" alt="Rs." /> $totalamount</td>
                                </tr>
                                #if($couponcode != "")
                                <tr class="discounted-amount payable">
                                        <td class="label">Amount Payable:<br />(After Discount)</td>
                                        <td><img src="/images/rupee-symbol.png" alt="Rs." /> $discountedamount</td>
                                </tr>
                                #end
                        </table>
        </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: 198px; text-align: left; margin-top: 12px; border-top-width: 1px;">PICKUP IN STORE
                     <a id="pickupstoreInfo" href="#">                                  
                     <span id="whats-this" style="margin-left: 3px; width: 57px; cursor: pointer; color: blue; font-weight: bold; font-size: 9px; text-align: right;">What's this?</span>
                     </a>
                            <div style="width: 37px; top: -18px;" id="pickup-tab-new-icon-container"></div>
                                </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>
                <tr>
                                        <td class="label" align="right"><sup>*</sup>Name:</td>
                                        <td class="input">
                                                <input type="text" id="shipName" name="name" class="searchbox right" />
                                        </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 Address" class="new-button" />
                                                <a id="closeAddAddressForm">Clear</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-->