ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shrilesh Korgaonkar <shrilesh.korgaon...@udyogmandir.in>
Subject e-commerce
Date Mon, 27 Aug 2018 09:58:04 GMT
came anyone explains this code

<div class="row">

          <#list productCategoryList as childCategoryList>

            <#assign cateCount = 0/>

            <#list childCategoryList as productCategory>
              <div class="products-card col-md-3">
            <#if (cateCount > 2)>
            <#assign cateCount = 0/>
            </#if>
            <#assign productCategoryId = productCategory.productCategoryId/>
            <#assign categoryImageUrl = "/images/defaultImage.jpg"/>
            <#assign productCategoryMembers = delegator
                    .findByAnd("ProductCategoryAndMember",
Static["org.apache.ofbiz.base.util.UtilMisc"]
                    .toMap("productCategoryId", productCategoryId),

Static["org.apache.ofbiz.base.util.UtilMisc"].toList("-quantity"), false)/>
            <#if productCategory.categoryImageUrl?has_content>
              <#assign categoryImageUrl = productCategory.categoryImageUrl/>
              <#elseif productCategoryMembers?has_content>
                <#assign productCategoryMember =

Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(productCategoryMembers)/>
                <#assign product = delegator.findOne("Product",
                        Static["org.apache.ofbiz.base.util.UtilMisc"]
                        .toMap("productId",
productCategoryMember.productId), false)/>
                <#if product.smallImageUrl?has_content>
                  <#assign categoryImageUrl = product.smallImageUrl/>
                </#if>
            </#if>



              <div class="card">
                <a href="<@ofbizCatalogAltUrl
productCategoryId=productCategoryId/>" class="text-center">
                  <img class="card-img-top" src="${categoryImageUrl}"
alt="Card image cap"/>
                </a>
                <div class="card-body">
                  <h4 class="card-title">
                    <a style="font-size:12px" href="<@ofbizCatalogAltUrl
productCategoryId=productCategoryId/>">
                      ${productCategory.categoryName!productCategoryId}
                    </a>
                  </h4>
                  <p class="card-text">
                    <ul class="">
                      <#if productCategoryMembers??>
                        <#assign i = 0/>
                        <#list productCategoryMembers as
productCategoryMember>
                          <#if (i > 2)>
                            <#if productCategoryMembers[i]?has_content>
                              <li><a class="linktext"
href="<@ofbizCatalogAltUrl productCategoryId=productCategoryId/>">
                                <span>More...</span>
                              </a></li>
                            </#if>
                            <#break>
                          </#if>
                          <#if productCategoryMember?has_content>
                            <#assign product = delegator.findOne("Product",

Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productId",
                                    productCategoryMember.productId),
false)>
                              <li>
                                <a class="linktext"
                                   href="<@ofbizCatalogAltUrl
productCategoryId="PROMOTIONS"
                                productId="${product.productId}"/>">
                                ${product.productName!product.productId}
                                </a>
                              </li>
                          </#if>
                          <#assign i = i+1/>
                        </#list>
                      </#if>
                    </ul>
                  </p>
                </div>
              </div>
            <#assign cateCount = cateCount + 1/>
          </div>
          </#list>
          </div>
        </#list>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message