Author: mor
Date: Tue Jul 1 02:25:25 2008 New Revision: 673034 URL: http://svn.apache.org/viewvc?rev=673034&view=rev Log: Added Shipping Options and Billing part Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=673034&r1=673033&r2=673034&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Tue Jul 1 02:25:25 2008 @@ -18,6 +18,7 @@ --> <div class="screenlet"> + <#assign shoppingCart = sessionAttributes.shoppingCart?if_exists> <div class="screenlet-header"> <div class="boxhead">${uiLabelMap.OrderCheckout}</div> </div> @@ -44,9 +45,11 @@ <div class="screenlet-header"><div class="boxhead" align="left">Step 2: Shipping</div></div> <div id="shippingSummaryPanel"> <div align="left" style="width: auto; padding: 10px 40px 30px 40px;"><a href="javascript:void(0);" id="openShippingPanel"><h3>Click here to edit</h3></a></div> - <div id="shippingSummary"><a href="javascript:void(0);" id="openShippingAndPersonlDetail"> - <h3>Shipping Summary</h3></a> + <div id="shippingSummary"> <div class="completed" style="display:none" id="shippingCompleted"> + <a href="javascript:void(0);" id="openShippingAndPersonlDetail"> + <h3>Shipping Summary</h3> + </a> <table cellpadding="0" cellspacing="0"> <tbody> <tr> @@ -74,7 +77,7 @@ </div> </div> <div id="editShippingPanel" style="display: none;"> - <form name="shippingForm" id="shippingForm" action="<@ofbizUrl>createUpdateCustomerAndShippingContact</@ofbizUrl>" method="post"> + <form name="shippingForm" id="shippingForm" action="<@ofbizUrl>createUpdateShippingAddress</@ofbizUrl>" method="post"> <input type="hidden" id="shippingContactMechId" name="shippingContactMechId" value="${parameters.shippingContactMechId?if_exists}"/> <input type="hidden" name="contactMechPurposeTypeId" value="SHIPPING_LOCATION"/> <input type="hidden" id="shippingPartyId" name="partyId" value="${parameters.partyId?if_exists}"/> @@ -208,14 +211,70 @@ <div class="screenlet-header"><div class="boxhead" align="left">Step 3: Shipping Options</div></div> <div id="shippingOptionSummaryPanel"> <div align="left" style="width: auto; padding: 10px 40px 30px 40px;"><a href="javascript:void(0);" id="openShippingOptionPanel"><h3>Click here to edit</h3></a></div> - <div id="shippingOptionSummary" style="display: none;"> - Shipping Methods summary. + <div id="shippingOptionSummary"> + <div class="completed" style="display:none" id="shippingOptionCompleted"> + <a href="javascript:void(0);" id="openShippingOption"> + <h3>Shipping Option Summary</h3> + </a> + <table cellpadding="0" cellspacing="0"> + <tbody> + <tr> + <td style=" padding: 6px; width: 60px;" valign="top">Shipment Option:</td> + <td style="padding: 6px; width: 60px;" valign="top"> + <div id="selectedShipmentOption"></div> + </td> + </tr> + <tr><td colspan="10"><hr class="sepbar"/></td></tr> + </tbody> + </table> + </div> </div> </div> + <div id="editShippingOptionPanel" style="display: none;"> + <#if shoppingCart.getPartyId()?exists> <form name="shippingOptionForm" id="shippingOptionForm" action="<@ofbizUrl></@ofbizUrl>" method="post"> - Shipping Methods. + <table id="shippingTable"> + <tr><td> + <fieldset class="center"> + <div class="form-row"> + <div class="field-label"> + <label for="shipmethod">${uiLabelMap.FormFieldTitleShippingMethod}<span class="requiredLabel"> *</span><span id="advice-required-shipping_method" class="custom-advice" style="display:none">(required)</span></label> + </div> + <#if shoppingCart?exists> + <#assign shippingEstWpr = Static["org.ofbiz.order.shoppingcart.shipping.ShippingEstimateWrapper"].getWrapper(dispatcher, shoppingCart, 0)> + <#assign carrierShipmentMethodList = shippingEstWpr.getShippingMethods()> + <#if shoppingCart.getShipmentMethodTypeId()?exists && shoppingCart.getCarrierPartyId()?exists> + <#assign chosenShippingMethod = shoppingCart.getShipmentMethodTypeId() + '@' + shoppingCart.getCarrierPartyId()> + </#if> + </#if> + <div class="field-widget"> + <select id="shipMethod" name="shipMethod" class="required"> + <#list carrierShipmentMethodList as carrierShipmentMethod> + <#assign shippingEst = shippingEstWpr.getShippingEstimate(carrierShipmentMethod)?default(-1)> + <#if (shippingEst > -1)> + <#assign shippingMethod = carrierShipmentMethod.shipmentMethodTypeId + "@" + carrierShipmentMethod.partyId> + <option value="${shippingMethod}" + <#if ((chosenShippingMethod)?exists && chosenShippingMethod == shippingMethod)>SELECTED</#if>> + ${carrierShipmentMethod.description?if_exists} + <#if shippingEst?has_content> - + <#if (shippingEst > -1)?exists> + <@ofbizCurrency amount=shippingEst isoCode=shoppingCart.getCurrency()/> + <#else> + ${uiLabelMap.OrderCalculatedOffline} + </#if> + </#if> + </option> + </#if> + </#list> + </select> + </div> + </div> + </fieldset> + </td></tr> + </table> </form> + </#if> <div><h3><span class="editStep"><a href="javascript:void(0);" id="editBilling"><h3>Continue for step 4</h3></a></span></h3></div> </div> </div> @@ -231,6 +290,172 @@ <div id="editBillingPanel" style="display: none;"> <form name="billingForm" id="billingForm" class="theform" action="<@ofbizUrl></@ofbizUrl>" method="post"> Billing and Payment Detail. + <input type="hidden" id ="billToContactMechId" name="billToContactMechId" value="${parameters.billToContactMechId?if_exists}"/> + <input type="hidden" id="shippingContactMechIdInBillingForm" name="shippingContactMechId" value="${parameters.shippingContactMechId?if_exists}"/> + <input type="hidden" id="paymentMethodId" name="paymentMethodId" value="${parameters.paymentMethodId?if_exists}"/> + <input type="hidden" name="singleUsePayment" value="Y"/> + <input type="hidden" name="appendPayment" value="Y"/> + <input type="hidden" id="paymentMethodTypeId" name="paymentMethodTypeId" value="CREDIT_CARD"/> + <input type="hidden" id="billingPartyId" name="partyId" value="${parameters.partyId?if_exists}"/> + <input type="hidden" name="userLogin" value="${parameters.userLogin?if_exists}"/> + <input type="hidden" name="expireDate" value="${parameters.expireDate?if_exists}"/> + <input type="hidden" id="billToPhoneContactMechId" name="phoneContactMechId" value="${parameters.billToPhoneContactMechId?if_exists}"/> + <input type="hidden" id="cardType" name="cardType" value="Visa"/> + <div class="panelBody" id="billingId"> + <table id="billingTable"> + <tr><td> + <div style="clear:both"></div> + <fieldset class="left"> + <span style="float:left; margin-top:10px; width:300px"></span> + <div class="form-row"> + <span> + <label for="cardname">First Name<span class="requiredLabel"> *</span><span id="advice-required-firstNameOnCard" class="custom-advice" style="display:none">(req)</span></label> + <input id="firstNameOnCard" name="firstNameOnCard" class="required" type="text" value="${parameters.firstNameOnCard?if_exists}" /> + </span> + <span> + <label for="cardname">Last Name<span class="requiredLabel"> *</span><span id="advice-required-lastNameOnCard" class="custom-advice" style="display:none">(req)</span></label> + <input id="lastNameOnCard" name="lastNameOnCard" class="required" type="text" value="${parameters.lastNameOnCard?if_exists}" /> + </span> + </div> + <div class="form-row"> + <div class="field-label"> + <label for="cardNumber">${uiLabelMap.AccountingCardNumber} (no spaces)<span class="requiredLabel"> *</span><span id="advice-required-cardNumber" class="custom-advice" style="display:none">(req)</span><span id="advice-validate-creditcard-cardNumber" class="custom-advice" style="display:none">(req)</span></label> + </div> + <div class="field-widget"> + <input id="cardNumber" autocomplete="off" name="cardNumber" class="validate-creditcard" type="text" value="${parameters.cardNumber?if_exists}" size=30 maxlength=16 /> + </div> + </div> + <div class="form-row"> + <div class="field-label"> + <label for="CVV2">CVV2 (no spaces)<span class="requiredLabel"> *</span><span id="advice-required-cardNumber" class="custom-advice" style="display:none">(req)</span><span id="advice-validate-creditcard-cardNumber" class="custom-advice" style="display:none">(req)</span></label> + </div> + <div class="field-widget"> + <input id="CVV2" autocomplete="off" name="cardSecurityCode" class="required validate-cvv2" size="4" type="text" maxlength="4" value=""/> + </div> + </div> + <div class="form-row"> + <div class="field-label"> + <label for="expirationdate">${uiLabelMap.AccountingExpirationDate}<span class="requiredLabel"> *</span><span id="advice-validate-creditcard-expiration-expMonth" class="custom-advice" style="display:none">(required)</span></label> + </div> + <div class="form-field"> + <div> + <span> + Month: <select id="expMonth" name="expMonth" class="validate-creditcard-expiration"> + <#if parameters.expMonth?has_content> + <option label="${parameters.expMonth?if_exists}" value="${parameters.expMonth?if_exists}">${parameters.expMonth?if_exists}</option> + </#if> + ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")} + </select> + </span> + <span> + Year: <select id="expYear" name="expYear"> + <#if parameters.expYear?has_content> + <option value="${parameters.expYear?if_exists}">${parameters.expYear?if_exists}</option> + </#if> + ${screens.render("component://common/widget/CommonScreens.xml#ccyears")} + </select> + </span> + </div> + </div> + </div> + </fieldset> + <fieldset class="right"> + <div class="form-row"> + <span> + <input class="checkbox" id="sameAsShipping" name="sameAsShipping" type="checkbox" value="Y" <#if parameters.sameAsShipping?has_content && parameters.sameAsShipping?default("")=="Y">checked</#if>> + <span style="font-size:10px; float:left; padding:0px 0px 0px 6px; margin-top:10px; width:300px">${uiLabelMap.FacilityBillingAddressSameShipping}</span> + </span> + </div> + <div style="clear: both"></div> + <div id="billingAddress" <#if parameters.sameAsShipping?has_content && parameters.sameAsShipping?default("")=="Y">style="display:none"</#if>> + <div class="form-row"> + <div class="field-label"> + <label for="address1">${uiLabelMap.PartyAddressLine1}<span class="requiredLabel"> *</span><span id="advice-required-billToAddress1" class="custom-advice" style="display:none">(required)</span></label> + </div> + <div class="field-widget"> + <input id="billToAddress1" name="billToAddress1" class="required" size=30 type="text" value="${parameters.billToAddress1?if_exists}" /> + </div> + <div class="field-label"> + <label for="address2" style="margin-top: 9px;">${uiLabelMap.PartyAddressLine2}</label> + </div> + <div class="field-widget"> + <input id="billToAddress2" name="billToAddress2" type="text" value="${parameters.billToAddress2?if_exists}" size=30/> + </div> + </div> + <div class="form-row"> + <div class="field-label"> + <label for="city">${uiLabelMap.CommonCity}<span class="requiredLabel"> *</span><span id="advice-required-billToCity" class="custom-advice" style="display:none">(required)</span></label> + </div> + <div class="field-widget"> + <input id="billToCity" name="billToCity" class="required" type="text" value="${parameters.billToCity?if_exists}" /> + </div> + </div> + <div class="form-row"> + <div> + <span> + <div class="field-label"> + <label for="state">${uiLabelMap.CommonState}<span class="requiredLabel"> *</span></label> + </div> + </span> + </div> + <div class="field-label" style="clear:both;"> + <span style="margin-top:-8px;"> + <select class="required" id="billToStateProvinceGeoId" name="billToStateProvinceGeoId"> + <#if parameters.billToStateProvinceGeoId?has_content> + <option>${parameters.billToStateProvinceGeoId}</option> + <option value="${parameters.billToStateProvinceGeoId}">---</option> + <#else> + <option value="CA">CA - California</option> + </#if> + ${screens.render("component://common/widget/CommonScreens.xml#states")} + </select> + </span> + </div> + + <div class="form-row"> + <div class="field-label"> + <label for="billingContactPhoneNumber">${uiLabelMap.PartyZipCode}<span class="requiredLabel"> *</span><span id="advice-required-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span><span id="advice-validate-phone-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span></label> + </div> + <div class="field-widget"> + <input id="billToPostalCode" name="billToPostalCode" class="required validate-zip input_mask mask_zip" type="text" value="${parameters.billToPostalCode?if_exists}" /> + </div> + </div> + <div class="form-row"> + <div class="field-label"> + <label for="countryCode">Country Code<span class="requiredLabel"> *</span><span id="advice-required-shippingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span><span id="advice-validate-phone-shippingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span></label> + <input name="countryCode" class="input_mask mask_phone required validate-phone" id="billingCountryCode" value="${parameters.countryCode?if_exists}" size="3" maxlength=3> + </div> + <div class="field-label"> + <label for="areaCode">Area Code<span class="requiredLabel"> *</span><span id="advice-required-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span><span id="advice-validate-phone-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span></label> + <input name="areaCode" class="input_mask mask_phone required validate-phone" id="billingAreaCode" value="${parameters.areaCode?if_exists}" size="3" maxlength=4> + </div> + <div class="field-label"> + <label for="contactNumber">Contact Number<span class="requiredLabel"> *</span><span id="advice-required-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span><span id="advice-validate-phone-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span></label> + <input name="contactNumber" class="input_mask mask_phone required validate-phone" id="billingContactNumber" value="${parameters.contactNumber?if_exists}" size="5" maxlength=6> + </div> + <div class="field-label"> + <label for="extension">Extention<span class="requiredLabel"> *</span><span id="advice-required-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span><span id="advice-validate-phone-billingContactPhoneNumber" class="custom-advice" style="display:none">(required)</span></label> + <input name="extension" class="input_mask mask_phone required validate-phone" id="billingExtension" value="${parameters.extension?if_exists}" size="3" maxlength=3> + </div> + </div> + <div class="form-row"> + <div class="form-label">${uiLabelMap.PartyCountry}</div> + <div class="form-field"> + <select name="billToCountryGeoId" id="billToCountryGeoId" class="selectBox"> + <#if (parameters.billToCountryGeoId)?exists> + <option>${parameters.billToCountryGeoId}</option> + <option value="${parameters.billToCountryGeoId}">---</option> + </#if> + ${screens.render("component://common/widget/CommonScreens.xml#countries")} + </select>* + </div> + </div> + </div> + </div> + </fieldset> + </td></tr> + </table> + </div> </form> <div><h3><span class="editStep"><a href="javascript:void(0);" id="openOrderSubmitPanel"><h3>Continue for step 5</h3></a></span></h3></div> </div> |
Free forum by Nabble | Edit this page |