📄 checkoutoptions.ftl
字号:
<#-- * Copyright (c) 2001-2005 The Open For Business Project - www.ofbiz.org * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@author David E. Jones (jonesde@ofbiz.org) *@author Andy Zeneski (jaz@ofbiz.org) *@version $Rev: 7294 $ *@since 2.1--><script language="javascript" type="text/javascript">function submitForm(form, mode, value) { if (mode == "DN") { // done action; checkout form.action="<@ofbizUrl>checkout</@ofbizUrl>"; form.submit(); } else if (mode == "CS") { // continue shopping form.action="<@ofbizUrl>updateCheckoutOptions/showcart</@ofbizUrl>"; form.submit(); } else if (mode == "NA") { // new address form.action="<@ofbizUrl>updateCheckoutOptions/editcontactmech?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}&preContactMechTypeId=POSTAL_ADDRESS&contactMechPurposeTypeId=SHIPPING_LOCATION</@ofbizUrl>"; form.submit(); } else if (mode == "EA") { // edit address form.action="<@ofbizUrl>updateCheckoutOptions/editcontactmech?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}&contactMechId="+value+"</@ofbizUrl>"; form.submit(); } else if (mode == "NC") { // new credit card form.action="<@ofbizUrl>updateCheckoutOptions/editcreditcard?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}</@ofbizUrl>"; form.submit(); } else if (mode == "EC") { // edit credit card form.action="<@ofbizUrl>updateCheckoutOptions/editcreditcard?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}&paymentMethodId="+value+"</@ofbizUrl>"; form.submit(); } else if (mode == "GC") { // edit gift card form.action="<@ofbizUrl>updateCheckoutOptions/editgiftcard?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}&paymentMethodId="+value+"</@ofbizUrl>"; form.submit(); } else if (mode == "NE") { // new eft account form.action="<@ofbizUrl>updateCheckoutOptions/editeftaccount?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}</@ofbizUrl>"; form.submit(); } else if (mode == "EE") { // edit eft account form.action="<@ofbizUrl>updateCheckoutOptions/editeftaccount?DONE_PAGE=quickcheckout&partyId=${shoppingCart.getPartyId()}&paymentMethodId="+value+"</@ofbizUrl>"; form.submit(); } else if (mode == "SP") { // split payment form.action="<@ofbizUrl>updateCheckoutOptions/checkoutpayment?partyId=${shoppingCart.getPartyId()}</@ofbizUrl>"; form.submit(); } else if (mode == "SA") { // selected shipping address form.action="<@ofbizUrl>updateCheckoutOptions/quickcheckout</@ofbizUrl>"; form.submit(); }}function toggleBillingAccount(box) { var amountName = "amount_" + box.value; box.checked = true; box.form.elements[amountName].disabled = false; for (var i = 0; i < box.form.elements[box.name].length; i++) { if (!box.form.elements[box.name][i].checked) { box.form.elements["amount_" + box.form.elements[box.name][i].value].disabled = true; } }}</script><#assign shipping = !shoppingCart.containAllWorkEffortCartItems()> <#-- contains items which need shipping? --><form method="post" name="checkoutInfoForm" style="margin:0;"> <input type="hidden" name="checkoutpage" value="quick"/> <input type="hidden" name="BACK_PAGE" value="quickcheckout"/> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr valign="top" align="left"> <td height="100%"> <div class="screenlet" style="height: 100%;"> <div class="screenlet-header"> <#if shipping == true> <div class="boxhead">1) ${uiLabelMap.OrderWhereShallWeShipIt}?</div> <#else> <div class="boxhead">1) ${uiLabelMap.OrderInformationAboutYou}</div> </#if> </div> <div class="screenlet-body" style="height: 100%;"> <table width="100%" border="0" cellpadding="1" cellspacing="0"> <tr> <td colspan="2"> <span class="tabletext">${uiLabelMap.CommonAdd}:</span> <a href="javascript:submitForm(document.checkoutInfoForm, 'NA', '');" class="buttontext">${uiLabelMap.PartyAddNewAddress}</a> </td> </tr> <#if (shoppingCart.getTotalQuantity() > 1) && !shoppingCart.containAllWorkEffortCartItems()> <#-- no splitting when only rental items --> <tr><td colspan="2"><hr class="sepbar"/></td></tr> <tr> <td colspan="2" align="center"> <a href="<@ofbizUrl>splitship</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderSplitIntoMultipleShipments}</a> <#if (shoppingCart.getShipGroupSize() > 1)> <div class="tabletext" style="color: red;">${uiLabelMap.OrderNOTEMultipleShipmentsExist}.</div> </#if> </td> </tr> </#if> <#if shippingContactMechList?has_content> <tr><td colspan="2"><hr class="sepbar"/></td></tr> <#list shippingContactMechList as shippingContactMech> <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress")> <tr> <td align="left" valign="top" width="1%"> <input type="radio" name="shipping_contact_mech_id" value="${shippingAddress.contactMechId}" onclick="javascript:submitForm(document.checkoutInfoForm, 'SA', null);"<#if shoppingCart.getShippingContactMechId()?default("") == shippingAddress.contactMechId> checked="checked"</#if>/> </td> <td align="left" valign="top" width="99%"> <div class="tabletext"> <#if shippingAddress.toName?has_content><b>${uiLabelMap.CommonTo}:</b> ${shippingAddress.toName}<br/></#if> <#if shippingAddress.attnName?has_content><b>${uiLabelMap.PartyAddrAttnName}:</b> ${shippingAddress.attnName}<br/></#if> <#if shippingAddress.address1?has_content>${shippingAddress.address1}<br/></#if> <#if shippingAddress.address2?has_content>${shippingAddress.address2}<br/></#if> <#if shippingAddress.city?has_content>${shippingAddress.city}</#if> <#if shippingAddress.stateProvinceGeoId?has_content><br/>${shippingAddress.stateProvinceGeoId}</#if> <#if shippingAddress.postalCode?has_content><br/>${shippingAddress.postalCode}</#if> <#if shippingAddress.countryGeoId?has_content><br/>${shippingAddress.countryGeoId}</#if> <a href="javascript:submitForm(document.checkoutInfoForm, 'EA', '${shippingAddress.contactMechId}');" class="buttontext">${uiLabelMap.CommonUpdate}</a> </div> </td> </tr> <#if shippingContactMech_has_next> <tr><td colspan="2"><hr class="sepbar"/></td></tr> </#if> </#list> </#if> </table> <#-- Party Tax Info --> <#-- commented out by default because the TaxAuthority drop-down is just too wide... <hr class="sepbar"/> <div class="tableheadtext"> ${uiLabelMap.PartyTaxIdentification}</div> ${screens.render("component://ecommerce/widget/CustomerScreens.xml#customertaxinfo")} --> </div> </div> </td> <td bgcolor="white" width="1"> </td> <td height="100%"> <div class="screenlet" style="height: 100%;"> <div class="screenlet-header"> <#if shipping == true> <div class="boxhead">2) ${uiLabelMap.OrderHowShallWeShipIt}?</div> <#else> <div class="boxhead">2) ${uiLabelMap.OrderOptions}?</div> </#if> </div> <div class="screenlet-body" style="height: 100%;"> <table width="100%" cellpadding="1" border="0" cellpadding="0" cellspacing="0"> <#if shipping == true> <#list carrierShipmentMethodList as carrierShipmentMethod> <#assign shippingMethod = carrierShipmentMethod.shipmentMethodTypeId + "@" + carrierShipmentMethod.partyId> <tr> <td width="1%" valign="top"> <input type="radio" name="shipping_method" value="${shippingMethod}" <#if shippingMethod == chosenShippingMethod?default("N@A")>checked="checked"</#if>/> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -