<#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <#assign fixedAssetExist = shoppingCart.containAnyWorkEffortCartItems() /> <#-- change display format when rental items exist in the shoppingcart -->
<#if ((sessionAttributes.lastViewedProducts)?has_content && sessionAttributes.lastViewedProducts?size > 0)> <#assign continueLink = "/product?product_id=" + sessionAttributes.lastViewedProducts.get(0) /> <#else> <#assign continueLink = "/main" /> ${uiLabelMap.EcommerceContinueShopping} <#if (shoppingCartSize > 0)> ${uiLabelMap.OrderCheckout} <#else> ${uiLabelMap.OrderCheckout} ${uiLabelMap.CommonQuickAdd}
<#-- check if rental data present insert extra fields in Quick Add--> <#if (product?? && "ASSET_USAGE" == product.getString("productTypeId") ) || (product?? && "ASSET_USAGE_OUT_IN" == product.getString("productTypeId"))> ${uiLabelMap.EcommerceStartDate}: ${uiLabelMap.EcommerceLength}:
  ${uiLabelMap.OrderNbrPersons}:
${uiLabelMap.OrderShoppingCart} <#if (shoppingCartSize > 0)> ${uiLabelMap.OrderCheckout} <#else> ${uiLabelMap.OrderCheckout}
<#if (shoppingCartSize > 0)>
<#if asslGiftWraps?has_content && productStore.showCheckoutGiftOptions! != "N">> <#if fixedAssetExist == true> <#else> <#assign itemsFromList = false /> <#assign promoItems = false /> <#list shoppingCart.items() as cartLine> <#assign cartLineIndex = shoppingCart.getItemIndex(cartLine) /> <#assign lineOptionalFeatures = cartLine.getOptionalProductFeatures() /> <#-- gift wrap option --> <#assign showNoGiftWrapOptions = false /> <#-- end gift wrap option -->
${uiLabelMap.OrderProduct} <#else>  
- ${uiLabelMap.EcommerceStartDate} - - ${uiLabelMap.EcommerceNbrOfDays} -
- ${uiLabelMap.EcommerceNbrOfPersons} - - ${uiLabelMap.CommonQuantity} -
${uiLabelMap.CommonQuantity} ${uiLabelMap.EcommerceUnitPrice} ${uiLabelMap.EcommerceAdjustments} ${uiLabelMap.EcommerceItemTotal}
<#if cartLine.getShoppingListId()??> <#assign itemsFromList = true /> L   <#elseif cartLine.getIsPromo()> <#assign promoItems = true /> P <#else>  
<#if cartLine.getProductId()??> <#-- product item --> <#-- start code to display a small image of the product --> <#if cartLine.getParentProductId()??> <#assign parentProductId = cartLine.getParentProductId() /> <#else> <#assign parentProductId = cartLine.getProductId() /> <#assign smallImageUrl = Static["org.apache.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText( cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "html")! /> <#if !smallImageUrl?string?has_content> <#assign smallImageUrl = "/images/defaultImage.jpg" /> <#if smallImageUrl?string?has_content> Product Image <#-- end code to display a small image of the product --> <#-- ${cartLineIndex} - -->

${cartLine.getProductId()} - ${cartLine.getName(dispatcher)!}

${cartLine.getDescription(dispatcher)!} <#-- For configurable products, the selected options are shown --> <#if cartLine.getConfigWrapper()??> <#assign selectedOptions = cartLine.getConfigWrapper().getSelectedOptions()! /> <#if selectedOptions??>
 
<#list selectedOptions as option>
${option.getDescription()}
<#-- if inventory is not required check to see if it is out of stock and needs to have a message shown about that... --> <#assign itemProduct = cartLine.getProduct() /> <#assign isStoreInventoryNotRequiredAndNotAvailable = Static["org.apache.ofbiz.product.store.ProductStoreWorker"] .isStoreInventoryRequiredAndAvailable(request, itemProduct, cartLine.getQuantity(), false, false) /> <#if isStoreInventoryNotRequiredAndNotAvailable && itemProduct.inventoryMessage?has_content> (${itemProduct.inventoryMessage}) <#else> <#-- this is a non-product item --> ${cartLine.getItemTypeDescription()!}: ${cartLine.getName(dispatcher)!} <#assign attrs = cartLine.getOrderItemAttributes()/> <#if attrs?has_content> <#assign attrEntries = attrs.entrySet()/>
    <#list attrEntries as attrEntry>
  • ${attrEntry.getKey()} : ${attrEntry.getValue()}
<#if (cartLine.getIsPromo() && cartLine.getAlternativeOptionProductIds()?has_content)> <#-- Show alternate gifts if there are any... -->
${uiLabelMap.OrderChooseFollowingForGift}:
<#-- this is the old way, it lists out the options and is not as nice as the drop-down -->
<#assign giftWrapOption = lineOptionalFeatures.GIFT_WRAP! /> <#assign selectedOption = cartLine.getAdditionalProductFeatureAndAppl("GIFT_WRAP")! /> <#if giftWrapOption?has_content> <#elseif showNoGiftWrapOptions> <#else>   <#if cartLine.getIsPromo() || cartLine.getShoppingListId()??> <#if fixedAssetExist == true> <#if cartLine.getReservStart()??>
  ${cartLine.getReservStart()?string("yyyy-mm-dd")} ${cartLine.getReservLength()?string.number}
  ${cartLine.getReservPersons()?string.number} <#else>
-- --
-- ${cartLine.getQuantity()?string.number}
<#else><#-- fixedAssetExist --> ${cartLine.getQuantity()?string.number} <#else><#-- Is Promo or Shoppinglist --> <#if fixedAssetExist == true> <#if cartLine.getReservStart()??> <#if shoppingCart.getAdjustments()?has_content> <#if (shoppingCart.getDisplayTaxIncluded() > 0.0)> <#list shoppingCart.getAdjustments() as cartAdjustment> <#assign adjustmentType = cartAdjustment.getRelatedOne("OrderAdjustmentType", true) /> <#if itemsFromList> <#if promoItems> <#if !itemsFromList && !promoItems>
 
  <#else>
-- --
--
<#else><#-- fixedAssetExist -->
<@ofbizCurrency amount=cartLine.getDisplayPrice() isoCode=shoppingCart.getCurrency()/> <@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency()/> <@ofbizCurrency amount=cartLine.getDisplayItemSubTotal() isoCode=shoppingCart.getCurrency()/> <#if !cartLine.getIsPromo()> <#else>  
Summary:
${uiLabelMap.CommonSubTotal}: <@ofbizCurrency amount=shoppingCart.getDisplaySubTotal() isoCode=shoppingCart.getCurrency()/>
${uiLabelMap.OrderSalesTaxIncluded}: <@ofbizCurrency amount=shoppingCart.getDisplayTaxIncluded() isoCode=shoppingCart.getCurrency()/>
${uiLabelMap.EcommerceAdjustment} - ${adjustmentType.get("description",locale)!} <#if cartAdjustment.productPromoId?has_content> ${uiLabelMap.CommonDetails} : <@ofbizCurrency amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"] .calcOrderAdjustment(cartAdjustment, shoppingCart.getSubTotal()) isoCode=shoppingCart.getCurrency()/>
${uiLabelMap.EcommerceCartTotal}: <@ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()/>
L - ${uiLabelMap.EcommerceItemsfromShopingList}.
P - ${uiLabelMap.EcommercePromotionalItems}.
 
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous">
${uiLabelMap.EcommerceAddSelectedtoList}
<#else> ${uiLabelMap.OrderYouMust} ${uiLabelMap.CommonBeLogged} ${uiLabelMap.OrderToAddSelectedItemsToShoppingList}. 
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous"> ${uiLabelMap.OrderCreateCustRequestFromCart} <#else> ${uiLabelMap.OrderYouMust} ${uiLabelMap.CommonBeLogged} ${uiLabelMap.EcommerceToOrderCreateCustRequestFromCart}. 
checked="checked"/>
<#else>

${uiLabelMap.EcommerceYourShoppingCartEmpty}.

<#-- Copy link bar to bottom to include a link bar at the bottom too -->

${uiLabelMap.ProductPromoCodes}

<#assign productPromoCodeIds = (shoppingCart.getProductPromoCodesEntered())! /> <#if productPromoCodeIds?has_content> ${uiLabelMap.ProductPromoCodesEntered}
    <#list productPromoCodeIds as productPromoCodeId>
  • ${productPromoCodeId}
<#if showPromoText?? && showPromoText>

${uiLabelMap.OrderSpecialOffers}

<#-- show promotions text -->
<#if associatedProducts?has_content>

${uiLabelMap.EcommerceYouMightAlsoIntrested}:

<#-- random complementary products -->
<#list associatedProducts as assocProduct> ${setRequestAttribute("optProduct", assocProduct)} ${setRequestAttribute("listIndex", assocProduct_index)} ${screens.render("component://ecommerce/widget/CatalogScreens.xml#productsummary")}
<#if (shoppingCartSize?default(0) > 0)> ${screens.render("component://ecommerce/widget/CartScreens.xml#promoUseDetailsInline")}