svn commit: r1819130 - in /ofbiz/ofbiz-plugins/trunk/ecommerce/template: cart/PromoUseDetailsInline.ftl customer/CreditCardFields.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1819130 - in /ofbiz/ofbiz-plugins/trunk/ecommerce/template: cart/PromoUseDetailsInline.ftl customer/CreditCardFields.ftl

Deepak Dixit-5
Author: deepak
Date: Sat Dec 23 10:22:57 2017
New Revision: 1819130

URL: http://svn.apache.org/viewvc?rev=1819130&view=rev
Log:
Improved: Added missing file related to profile UX improvement work done at r#r1819128

Added:
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl   (with props)
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl   (with props)

Added: ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl?rev=1819130&view=auto
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl (added)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl Sat Dec 23 10:22:57 2017
@@ -0,0 +1,80 @@
+<#--
+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.
+-->
+<h2>${uiLabelMap.OrderPromotionInformation}:</h2>
+<div class="row">
+  <div class="col-xl-6">
+    <h3>${uiLabelMap.OrderPromotionsApplied}:</h3>
+        <ul>
+            <#list shoppingCart.getProductPromoUseInfoIter() as productPromoUseInfo>
+                <li>
+                    <#-- TODO: when promo pretty print is done show promo short description here -->
+                    <a href="<@ofbizUrl>showPromotionDetails?productPromoId=${productPromoUseInfo.productPromoId!}</@ofbizUrl>">${uiLabelMap.OrderPromotion} ${uiLabelMap.CommonDetails}</a>
+                    <#if productPromoUseInfo.productPromoCodeId?has_content> - ${uiLabelMap.OrderWithPromoCode} [${productPromoUseInfo.productPromoCodeId}]</#if>
+                    <#if (productPromoUseInfo.totalDiscountAmount != 0)> - ${uiLabelMap.CommonTotalValue} <@ofbizCurrency amount=(-1*productPromoUseInfo.totalDiscountAmount) isoCode=shoppingCart.getCurrency()/></#if>
+                    <#if productPromoUseInfo.productPromoCodeId?has_content>
+                        <a href="<@ofbizUrl>removePromotion?promoCode=${productPromoUseInfo.productPromoCodeId!}</@ofbizUrl>">${uiLabelMap.OrderRemovePromotion}</a>
+                    </#if>
+                </li>
+                <#if (productPromoUseInfo.quantityLeftInActions > 0)>
+                    <li>- Could be used for ${productPromoUseInfo.quantityLeftInActions} more discounted item<#if (productPromoUseInfo.quantityLeftInActions > 1)>s</#if> if added to your cart.</li>
+                </#if>
+            </#list>
+        </ul>
+  </div>
+
+  <div class="col-xl-6">
+    <h3>${uiLabelMap.OrderCartItemUseinPromotions}:</h3>
+    <ul>
+        <#list shoppingCart.items() as cartLine>
+            <#assign cartLineIndex = shoppingCart.getItemIndex(cartLine)>
+            <#if cartLine.getIsPromo()>
+                <li>${uiLabelMap.OrderItemN} ${cartLineIndex+1} [${cartLine.getProductId()!}] - ${uiLabelMap.OrderIsAPromotionalItem}</li>
+            <#else>
+                <li>${uiLabelMap.OrderItemN} ${cartLineIndex+1} [${cartLine.getProductId()!}] - ${cartLine.getPromoQuantityUsed()?string.number}/${cartLine.getQuantity()?string.number} ${uiLabelMap.CommonUsed} - ${cartLine.getPromoQuantityAvailable()?string.number} ${uiLabelMap.CommonAvailable}
+                    <ul>
+                        <#list cartLine.getQuantityUsedPerPromoActualIter() as quantityUsedPerPromoActualEntry>
+                            <#assign productPromoActualPK = quantityUsedPerPromoActualEntry.getKey()>
+                            <#assign actualQuantityUsed = quantityUsedPerPromoActualEntry.getValue()>
+                            <#assign isQualifier = "ProductPromoCond" == productPromoActualPK.getEntityName()>
+                            <li>&nbsp;&nbsp;-&nbsp;${actualQuantityUsed} ${uiLabelMap.CommonUsedAs} <#if isQualifier>${uiLabelMap.CommonQualifier}<#else>${uiLabelMap.CommonBenefit}</#if> ${uiLabelMap.OrderOfPromotion} <a href="<@ofbizUrl>showPromotionDetails?productPromoId=${productPromoActualPK.productPromoId}</@ofbizUrl>">${uiLabelMap.CommonDetails}</a></li>
+                            <!-- productPromoActualPK ${productPromoActualPK.toString()} -->
+                        </#list>
+                    </ul>
+                    <ul>
+                        <#list cartLine.getQuantityUsedPerPromoFailedIter() as quantityUsedPerPromoFailedEntry>
+                            <#assign productPromoFailedPK = quantityUsedPerPromoFailedEntry.getKey()>
+                            <#assign failedQuantityUsed = quantityUsedPerPromoFailedEntry.getValue()>
+                            <#assign isQualifier = "ProductPromoCond" == productPromoFailedPK.getEntityName()>
+                            <li>&nbsp;&nbsp;-&nbsp;${uiLabelMap.CommonCouldBeUsedAs} <#if isQualifier>${uiLabelMap.CommonQualifier}<#else>${uiLabelMap.CommonBenefit}</#if> ${uiLabelMap.OrderOfPromotion} <a href="<@ofbizUrl>showPromotionDetails?productPromoId=${productPromoFailedPK.productPromoId}</@ofbizUrl>">${uiLabelMap.CommonDetails}</a></li>
+                            <!-- Total times checked but failed: ${failedQuantityUsed}, productPromoFailedPK ${productPromoFailedPK.toString()} -->
+                        </#list>
+                    </ul>
+                    <#list cartLine.getQuantityUsedPerPromoCandidateIter() as quantityUsedPerPromoCandidateEntry>
+                        <#assign productPromoCandidatePK = quantityUsedPerPromoCandidateEntry.getKey()>
+                        <#assign candidateQuantityUsed = quantityUsedPerPromoCandidateEntry.getValue()>
+                        <#assign isQualifier = "ProductPromoCond" == productPromoCandidatePK.getEntityName()>
+                        <!-- Left over not reset or confirmed, shouldn't happen: ${candidateQuantityUsed} Might be Used (Candidate) as <#if isQualifier>${uiLabelMap.CommonQualifier}<#else>${uiLabelMap.CommonBenefit}</#if> ${uiLabelMap.OrderOfPromotion} [${productPromoCandidatePK.productPromoId}] -->
+                        <!-- productPromoCandidatePK ${productPromoCandidatePK.toString()} -->
+                    </#list>
+                </li>
+            </#if>
+        </#list>
+    </ul>
+  </div>
+</div>
\ No newline at end of file

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/PromoUseDetailsInline.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl?rev=1819130&view=auto
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl (added)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl Sat Dec 23 10:22:57 2017
@@ -0,0 +1,170 @@
+<#--
+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.
+-->
+
+<#if !creditCard?has_content>
+  <#assign creditCard = requestParameters>
+</#if>
+
+<#if !paymentMethod?has_content>
+  <#assign paymentMethod = requestParameters>
+</#if>
+
+<label class="mt-2">${uiLabelMap.AccountingCompanyNameCard}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <input type="text" class="form-control" maxlength="60" name="companyNameOnCard" value="${creditCard.companyNameOnCard!}"/>
+  </div>
+</div>
+<label>${uiLabelMap.AccountingPrefixCard}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <select name="titleOnCard" class="form-control custom-select">
+      <option value="">${uiLabelMap.CommonSelectOne}</option>
+      <option<#if ("${uiLabelMap.CommonTitleMr}" == (creditCard.titleOnCard)?default(""))> selected="selected"</#if>>${uiLabelMap.CommonTitleMr}</option>
+      <option<#if ("Mrs." == (creditCard.titleOnCard)?default(""))> selected="selected"</#if>>${uiLabelMap.CommonTitleMrs}</option>
+      <option<#if ("Ms." == (creditCard.titleOnCard)?default(""))> selected="selected"</#if>>${uiLabelMap.CommonTitleMs}</option>
+      <option<#if ("Dr." == (creditCard.titleOnCard)?default(""))> selected="selected"</#if>>${uiLabelMap.CommonTitleDr}</option>
+    </select>
+  </div>
+</div>
+<label class="required">${uiLabelMap.AccountingFirstNameCard}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <input type="text" class="form-control" maxlength="60" name="firstNameOnCard" value="${(creditCard.firstNameOnCard)!}"/>
+  <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span></#if></td>
+  </div>
+</div>
+<label>${uiLabelMap.AccountingMiddleNameCard}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <input type="text" class="form-control" maxlength="60" name="middleNameOnCard" value="${(creditCard.middleNameOnCard)!}"/>
+  </div>
+</div>
+<label class="required">${uiLabelMap.AccountingLastNameCard}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <input type="text" class="form-control" maxlength="60" name="lastNameOnCard" value="${(creditCard.lastNameOnCard)!}"/>
+  <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span></#if>
+  </div>
+</div>
+<label>${uiLabelMap.AccountingSuffixCard}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <select name="suffixOnCard" class="form-control custom-select">
+      <option value="">${uiLabelMap.CommonSelectOne}</option>
+      <option<#if ("Jr." == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>Jr.</option>
+      <option<#if ("Sr." == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>Sr.</option>
+      <option<#if ("I" == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>I</option>
+      <option<#if ("II" == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>II</option>
+      <option<#if ("III" == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>III</option>
+      <option<#if ("IV" == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>IV</option>
+      <option<#if ("V" == (creditCard.suffixOnCard)?default(""))> selected="selected"</#if>>V</option>
+    </select>
+  </div>
+</div>
+<label class="required">${uiLabelMap.AccountingCardType}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <select name="cardType" class="custom-select form-control">
+    <#if creditCard.cardType??>
+      <option>${creditCard.cardType}</option>
+      <option value="${creditCard.cardType}">---</option>
+    </#if>
+    ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
+    </select>
+  <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span></#if>
+  </div>
+</div>
+<label class="required">${uiLabelMap.AccountingCardNumber}</label>
+<div class="row">
+  <div class="col-sm-6">
+  <#if creditCard?has_content>
+    <#if cardNumberMinDisplay?has_content>
+    <#-- create a display version of the card where all but the last four digits are * -->
+      <#assign cardNumberDisplay = "">
+      <#assign cardNumber = creditCard.cardNumber!>
+      <#if cardNumber?has_content>
+        <#assign size = cardNumber?length - 4>
+        <#if (size > 0)>
+          <#list 0 .. size-1 as foo>
+            <#assign cardNumberDisplay = cardNumberDisplay + "*">
+          </#list>
+          <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]>
+        <#else>
+        <#-- but if the card number has less than four digits (ie, it was entered incorrectly), display it in full -->
+          <#assign cardNumberDisplay = cardNumber>
+        </#if>
+      </#if>
+      <input type="text" class="required form-control"maxlength="30" name="cardNumber" onfocus="javascript:this.value = '';" value="${cardNumberDisplay!}" />
+    <#else>
+      <input type="text" class="form-control" maxlength="30" name="cardNumber" value="${creditCard.cardNumber!}"/>
+    </#if>
+  <#else>
+    <input type="text" class="form-control" maxlength="30" name="cardNumber" value="${creditCard.cardNumber!}"/>
+  </#if>
+  <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span></#if>
+  </div>
+</div>
+  <label class="required">${uiLabelMap.AccountingExpirationDate}</label>
+  <#assign expMonth = "">
+  <#assign expYear = "">
+  <#if creditCard?? && creditCard.expireDate??>
+    <#assign expDate = creditCard.expireDate>
+    <#if (expDate?? && expDate.indexOf("/") > 0)>
+      <#assign expMonth = expDate.substring(0,expDate.indexOf("/"))>
+      <#assign expYear = expDate.substring(expDate.indexOf("/")+1)>
+    </#if>
+  </#if>
+<div class="row">
+  <div class="col-sm-3">
+  <select name="expMonth" class="custom-select form-control">
+    <option>${uiLabelMap.CommonSelect}</option>
+    <#if creditCard?has_content && expMonth?has_content>
+      <#assign ccExprMonth = expMonth>
+    <#else>
+      <#assign ccExprMonth = requestParameters.expMonth!>
+    </#if>
+    <#if ccExprMonth?has_content>
+      <option value="${ccExprMonth!}">${ccExprMonth!}</option>
+    </#if>
+    ${screens.render("component://common/widget/CommonScreens.xml#ccmonths")}
+    </select>
+  </div>
+  <div class="col-sm-3">
+    <select name="expYear" class="custom-select form-control">
+      <option>${uiLabelMap.CommonSelect}</option>
+    <#if creditCard?has_content && expYear?has_content>
+      <#assign ccExprYear = expYear>
+    <#else>
+      <#assign ccExprYear = requestParameters.expYear!>
+    </#if>
+    <#if ccExprYear?has_content>
+      <option value="${ccExprYear!}">${ccExprYear!}</option>
+    </#if>
+    ${screens.render("component://common/widget/CommonScreens.xml#ccyears")}
+    </select>
+  <#if showToolTip?has_content><span class="tooltip">${uiLabelMap.CommonRequired}</span></#if>
+</div>
+</div>
+<label>${uiLabelMap.CommonDescription}</label>
+<div class="row">
+  <div class="col-sm-6">
+    <input type="text" size="20" class="form-control" name="description" value="${paymentMethod.description!}"/>
+  </div>
+</div>

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-plugins/trunk/ecommerce/template/customer/CreditCardFields.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain