svn commit: r1858265 - in /ofbiz/ofbiz-plugins/trunk/ecommerce/template: cart/ShowCart.ftl catalog/MiniLastViewedCategories.ftl survey/MiniSurvey.ftl

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

svn commit: r1858265 - in /ofbiz/ofbiz-plugins/trunk/ecommerce/template: cart/ShowCart.ftl catalog/MiniLastViewedCategories.ftl survey/MiniSurvey.ftl

Deepak Dixit-5
Author: deepak
Date: Sat Apr 27 11:42:32 2019
New Revision: 1858265

URL: http://svn.apache.org/viewvc?rev=1858265&view=rev
Log:
Improved: UI issue on ecommerce main page
(OFBIZ-10849)
1. Navigate to demo-trunk ecom
2. Scroll the page and see the last category section in the right column of the screen.
3. The last category section seems to be distorted because of the empty list Screenshot attached for the same.

The patch contains the following:
- Fixed the category section rendering.

- Improved the markup of survey section of the main page.
- Improved the UI/UX of view cart screen

Thanks  Garima jain  and Nitish Mishra for  your contribution

Modified:
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/ShowCart.ftl
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/MiniLastViewedCategories.ftl
    ofbiz/ofbiz-plugins/trunk/ecommerce/template/survey/MiniSurvey.ftl

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/ShowCart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/ShowCart.ftl?rev=1858265&r1=1858264&r2=1858265&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/ShowCart.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/cart/ShowCart.ftl Sat Apr 27 11:42:32 2019
@@ -72,26 +72,28 @@ under the License.
 </script>
 <#assign fixedAssetExist = shoppingCart.containAnyWorkEffortCartItems() />
 <#-- change display format when rental items exist in the shoppingcart -->
-<div>
-    <#if ((sessionAttributes.lastViewedProducts)?has_content && sessionAttributes.lastViewedProducts?size > 0)>
-      <#assign continueLink = "/product?product_id=" + sessionAttributes.lastViewedProducts.get(0) />
-    <#else>
-      <#assign continueLink = "/main" />
-    </#if>
-    <a href="<@ofbizUrl>${continueLink}</@ofbizUrl>" class="submenutext">
-      ${uiLabelMap.EcommerceContinueShopping}
-    </a>
-    <#if (shoppingCartSize > 0)>
-      <a href="<@ofbizUrl>checkoutoptions</@ofbizUrl>" class="submenutext">
-        ${uiLabelMap.OrderCheckout}
+<div class="card">
+    <div class="card-header">
+      <#if ((sessionAttributes.lastViewedProducts)?has_content && sessionAttributes.lastViewedProducts?size > 0)>
+        <#assign continueLink = "/product?product_id=" + sessionAttributes.lastViewedProducts.get(0) />
+      <#else>
+        <#assign continueLink = "/main" />
+      </#if>
+      <a href="<@ofbizUrl>${continueLink}</@ofbizUrl>" class="submenutext">
+        ${uiLabelMap.EcommerceContinueShopping}
       </a>
-    <#else>
-      <span class="submenutextrightdisabled">
-        ${uiLabelMap.OrderCheckout}
-      </span>
-    </#if>
-    ${uiLabelMap.CommonQuickAdd}
-  <div>
+      <#if (shoppingCartSize > 0)>
+        <a href="<@ofbizUrl>checkoutoptions</@ofbizUrl>" class="submenutext">
+          ${uiLabelMap.OrderCheckout}
+        </a>
+      <#else>
+        <span class="submenutextrightdisabled">
+          ${uiLabelMap.OrderCheckout}
+        </span>
+      </#if>
+      ${uiLabelMap.CommonQuickAdd}
+    </div>
+  <div class="card-body">
     <div>
       <form method="post"
           action="<@ofbizUrl>additem<#if requestAttributes._CURRENT_VIEW_?has_content>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" class="form-inline"

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/MiniLastViewedCategories.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/MiniLastViewedCategories.ftl?rev=1858265&r1=1858264&r2=1858265&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/MiniLastViewedCategories.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/catalog/MiniLastViewedCategories.ftl Sat Apr 27 11:42:32 2019
@@ -52,7 +52,7 @@ under the License.
               <#else>
                 <a href="<@ofbizCatalogAltUrl productCategoryId=categoryId/>"
                     class="browsecategorybutton">
-                  ${category.description!}
+                  ${category.description?default(categoryId)!}
                 </a>
               </#if>
             </li>

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/survey/MiniSurvey.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/survey/MiniSurvey.ftl?rev=1858265&r1=1858264&r2=1858265&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/survey/MiniSurvey.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/survey/MiniSurvey.ftl Sat Apr 27 11:42:32 2019
@@ -17,6 +17,7 @@ specific language governing permissions
 under the License.
 -->
 
+
 <#if additionalFields?has_content>
   <#list additionalFields.keySet() as field>
     <input type="hidden" name="${field}" value="${additionalFields.get(field)}"/>
@@ -54,10 +55,10 @@ under the License.
     </tr>
 
       <tr>
-        <td align="center">
+        <td>
           <#if "BOOLEAN" == surveyQuestionAndAppl.surveyQuestionTypeId>
             <#assign selectedOption = (answer.booleanResponse)?default("Y")>
-            <select class="selectBox" name="answers_${surveyQuestionAndAppl.surveyQuestionId}">
+            <select class="form-control form-control-sm" name="answers_${surveyQuestionAndAppl.surveyQuestionId}">
               <#if surveyQuestionAndAppl.requiredField?default("N") != "Y">
                 <option value=""></option>
               </#if>
@@ -91,7 +92,7 @@ under the License.
           <#elseif "OPTION" == surveyQuestionAndAppl.surveyQuestionTypeId>
             <#assign options = surveyQuestionAndAppl.getRelated("SurveyQuestionOption", null, sequenceSort, false)!>
             <#assign selectedOption = (answer.surveyOptionSeqId)?default("_NA_")>
-            <select class="selectBox" name="answers_${surveyQuestionAndAppl.surveyQuestionId}">
+            <select class="form-control form-control-sm" name="answers_${surveyQuestionAndAppl.surveyQuestionId}">
               <#if surveyQuestionAndAppl.requiredField?default("N") != "Y">
                 <option value=""></option>
               </#if>
@@ -116,6 +117,6 @@ under the License.
     </tr>
   </#list>
   <tr>
-    <td align="center"><input type="submit" value="<#if survey.submitCaption?has_content>${survey.submitCaption}<#else>Submit</#if>" class="smallSubmit"/></td>
+    <td><input type="submit" value="<#if survey.submitCaption?has_content>${survey.submitCaption}<#else>Submit</#if>" class="btn btn-outline-secondary"/></td>
   </tr>
 </table>