📄 checkoutoptions.ftl
字号:
<#--
* Copyright (c) 2001, 2002 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 Andy Zeneski (jaz@ofbiz.org)
*@version $Revision: 1.16 $
*@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?preContactMechTypeId=POSTAL_ADDRESS&contactMechPurposeTypeId=SHIPPING_LOCATION</@ofbizUrl>";
form.submit();
} else if (mode == "EA") {
// edit address
form.action="<@ofbizUrl>/updateCheckoutOptions/editcontactmech?contactMechId="+value+"</@ofbizUrl>";
form.submit();
} else if (mode == "NC") {
// new credit card
form.action="<@ofbizUrl>/updateCheckoutOptions/editcreditcard</@ofbizUrl>";
form.submit();
} else if (mode == "EC") {
// edit credit card
form.action="<@ofbizUrl>/updateCheckoutOptions/editcreditcard?paymentMethodId="+value+"</@ofbizUrl>";
form.submit();
} else if (mode == "GC") {
// edit gift card
form.action="<@ofbizUrl>/updateCheckoutOptions/editgiftcard?paymentMethodId="+value+"</@ofbizUrl>";
form.submit();
} else if (mode == "NE") {
// new eft account
form.action="<@ofbizUrl>/updateCheckoutOptions/editeftaccount</@ofbizUrl>";
form.submit();
} else if (mode == "EE") {
// edit eft account
form.action="<@ofbizUrl>/updateCheckoutOptions/editeftaccount?paymentMethodId="+value+"</@ofbizUrl>";
form.submit();
} else if (mode == "SP") {
// split payment
form.action="<@ofbizUrl>/updateCheckoutOptions/checkoutpayment</@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 uiLabelMap = requestAttributes.uiLabelMap>
<#assign cart = context.shoppingCart?if_exists>
<form method="post" name="checkoutInfoForm" style='margin:0;'>
<input type="hidden" name="checkoutpage" value="quick">
<input type="hidden" name="DONE_PAGE" value="quickcheckout">
<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%'>
<table border=0 width='100%' cellspacing='0' cellpadding='0' class='boxoutside' style='height: 100%;'>
<tr>
<td width='100%'>
<table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxtop'>
<tr>
<td valign=middle align=left nowrap>
<div class="boxhead">1) ${uiLabelMap.OrderWhereShallWeShipIt}?</div>
</td>
</tr>
</table>
</td>
</tr>
<tr style='height: 100%;'>
<td width='100%' valign=top height='100%'>
<table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxbottom' style='height: 100%;'>
<tr>
<td valign='top'>
<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 context.shippingContactMechList?has_content>
<tr><td colspan="2"><hr class='sepbar'></td></tr>
<#list context.shippingContactMechList as shippingContactMech>
<#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress")>
<tr>
<td align="left" valign="top" width="1%" nowrap>
<input type="radio" name="shipping_contact_mech_id" value="${shippingAddress.contactMechId}" onclick="javascript:submitForm(document.checkoutInfoForm, 'SA', null);"<#if cart.getShippingContactMechId()?default("") == shippingAddress.contactMechId> checked</#if>>
</td>
<td align="left" valign="top" width="99%" nowrap>
<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>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td bgcolor="white" width="1"> </td>
<td height='100%'>
<table border=0 width='100%' cellspacing='0' cellpadding='0' class='boxoutside'>
<tr>
<td width='100%'>
<table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxtop'>
<tr>
<td valign=middle align=left nowrap>
<div class="boxhead">2) ${uiLabelMap.OrderHowShallWeShipIt}?</div>
</td>
</tr>
</table>
</td>
</tr>
<tr style='height: 100%;'>
<td width='100%' valign=top height='100%'>
<table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxbottom' style='height: 100%;'>
<tr>
<td>
<table width='100%' cellpadding='1' border='0' cellpadding='0' cellspacing='0'>
<#list context.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 == context.chosenShippingMethod?default("N@A")>checked</#if>>
</td>
<td valign="top">
<div class='tabletext'>
<#if cart.getShippingContactMechId()?exists>
<#assign shippingEstMap = Static["org.ofbiz.order.shoppingcart.shipping.ShippingEvents"].getShipEstimate(delegator, cart, shippingMethod)>
<#if shippingEstMap?has_content && shippingEstMap.shippingTotal?exists>
<#assign shippingEstimate = " - " + shippingEstMap.shippingTotal?string.currency>
<#else>
<#assign shippingEstimate = " - Calculated Offline">
</#if>
</#if>
<#if carrierShipmentMethod.partyId != "_NA_">${carrierShipmentMethod.partyId?if_exists} </#if>${carrierShipmentMethod.description?if_exists}${shippingEstimate?if_exists}
</div>
</td>
</tr>
</#list>
<#if !carrierShipmentMethodList?exists || carrierShipmentMethodList?size == 0>
<tr>
<td width='1%' valign="top">
<input type='radio' name='shipping_method' value="Default" checked>
</td>
<td valign="top">
<div class='tabletext'>${uiLabelMap.OrderUseDefault}.</div>
</td>
</tr>
</#if>
<tr><td colspan='2'><hr class='sepbar'></td></tr>
<tr>
<td colspan='2'>
<div class="head2"><b>${uiLabelMap.OrderShipAllAtOnce}?</b></div>
</td>
</tr>
<tr>
<td valign="top">
<input type='radio' <#if !cart.getMaySplit()?default(false)>checked</#if> name='may_split' value='false'>
</td>
<td valign="top">
<div class="tabletext">${uiLabelMap.OrderPleaseWaitUntilBeforeShipping}.</div>
</td>
</tr>
<tr>
<td valign="top">
<input <#if cart.getMaySplit()?default(false)>checked</#if> type='radio' name='may_split' value='true'>
</td>
<td valign="top">
<div class="tabletext">${uiLabelMap.OrderPleaseShipItemsBecomeAvailable}.</div>
</td>
</tr>
<tr><td colspan="2"><hr class='sepbar'></td></tr>
<tr>
<td colspan="2">
<div class="head2"><b>${uiLabelMap.OrderSpecialInstructions}</b></div>
</td>
</tr>
<tr>
<td colspan="2">
<textarea class='textAreaBox' cols="30" rows="3" wrap="hard" name="shipping_instructions">${cart.getShippingInstructions()?if_exists}</textarea>
</td>
</tr>
<tr><td colspan="2"><hr class='sepbar'></td></tr>
<tr>
<td colspan="2">
<span class="head2"><b>${uiLabelMap.OrderPoNumber}</b></span>
<#if cart.getPoNumber()?exists && cart.getPoNumber() != "(none)">
<#assign currentPoNumber = cart.getPoNumber()>
</#if>
<input type="text" class='inputBox' name="corresponding_po_id" size="15" value='${currentPoNumber?if_exists}'>
</td>
</tr>
<tr><td colspan="2"><hr class='sepbar'></td></tr>
<tr>
<td colspan="2">
<div>
<span class="head2"><b>${uiLabelMap.OrderIsThisGift}?</b></span>
<input type='radio' <#if cart.getIsGift()?default(false)>checked</#if> name='is_gift' value='true'><span class='tabletext'>${uiLabelMap.CommonYes}</span>
<input type='radio' <#if !cart.getIsGift()?default(false)>checked</#if> name='is_gift' value='false'><span class='tabletext'>${uiLabelMap.CommonNo}</span>
</div>
</td>
</tr>
<tr><td colspan="2"><hr class='sepbar'></td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -