svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

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

svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

hansbak-2
Author: hansbak
Date: Tue Sep 18 00:23:41 2007
New Revision: 576743

URL: http://svn.apache.org/viewvc?rev=576743&view=rev
Log:
list all features of a product in the product summary and not only a specific one.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh?rev=576743&r1=576742&r2=576743&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh Tue Sep 18 00:23:41 2007
@@ -137,12 +137,41 @@
     }
 }
 
-// an example of getting features of a certain type to show
-sizeProductFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "SIZE"), UtilMisc.toList("sequenceNum", "defaultSequenceNum"));
+// Show all features and their values:
+List productFeatures = new LinkedList();
+productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl",
+        UtilMisc.toMap("productId", productId),
+        UtilMisc.toList("productFeatureTypeId","sequenceNum", "defaultSequenceNum"));
+pfIter = productFeatureAndAppls.iterator();
+oldProductFeatureTypeId = null;
+values = new LinkedList();
+while (pfIter.hasNext()) {
+    productFeatureAppl = pfIter.next();
+    Debug.logInfo("processing product: " + productId + "  " + productFeatureAppl.getString("productFeatureTypeId") + "--" + productFeatureAppl.getString("description"), "");
+    if (oldProductFeatureTypeId != null && !oldProductFeatureTypeId.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
+        productFeatures.add(
+            UtilMisc.toMap("description",
+                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
+                "abbreviation",oldProductFeatureTypeId,
+                "types", values));
+        values = new LinkedList();
+    }
+    values.add(productFeatureAppl.getString("description"));
+    oldProductFeatureTypeId = productFeatureAppl.getString("productFeatureTypeId");
+}
+if (values.size() != 0) {
+    productFeatures.add(
+            UtilMisc.toMap("description",
+                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
+                "abbreviation",oldProductFeatureTypeId,
+                "types", values));
+    context.put("productFeatures", productFeatures);
+} else {
+    context.remove("productFeatures");
+}
 
 context.put("product", product);
 context.put("productStoreId", productStoreId);
 context.put("categoryId", categoryId);
 context.put("productReviews", reviews);
-context.put("sizeProductFeatureAndAppls", sizeProductFeatureAndAppls);
     

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=576743&r1=576742&r2=576743&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Tue Sep 18 00:23:41 2007
@@ -93,17 +93,15 @@
           <div class="tabletext">${prodCatMem.comments}</div>
           </#if>
           
-          <#-- example of showing a certain type of feature with the product -->
-          <#if sizeProductFeatureAndAppls?has_content>
+          <#-- list all feature types and values with the product -->
+          <#if productFeatures?has_content>
             <div class="tabletext">
-              <#if (sizeProductFeatureAndAppls?size == 1)>
-                Size:
-              <#else>
-                Sizes Available:
-              </#if>
-              <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
-                ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if>
-              </#list>
+            <#list productFeatures as productFeature>
+                <b>${productFeature.description?default(productFeature.abbreviation)}(s):</b>
+                <#list productFeature.types as type>
+                  ${type}<#if type_has_next>,</#if>
+                </#list>
+            </#list>
             </div>
           </#if>
           <div class="tabletext">


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

David E Jones-2

Hans,

What was the intent of this change?

It seems a little funny to me because:

1. many features are not meant to EVER be shown a customer
2. a product could have dozens or hundreds of features, which doesn't fit so well in a productsummary

-David


[hidden email] wrote:

> Author: hansbak
> Date: Tue Sep 18 00:23:41 2007
> New Revision: 576743
>
> URL: http://svn.apache.org/viewvc?rev=576743&view=rev
> Log:
> list all features of a product in the product summary and not only a specific one.
>
> Modified:
>     ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
>     ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
>
> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh?rev=576743&r1=576742&r2=576743&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh (original)
> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh Tue Sep 18 00:23:41 2007
> @@ -137,12 +137,41 @@
>      }
>  }
>  
> -// an example of getting features of a certain type to show
> -sizeProductFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "SIZE"), UtilMisc.toList("sequenceNum", "defaultSequenceNum"));
> +// Show all features and their values:
> +List productFeatures = new LinkedList();
> +productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl",
> +        UtilMisc.toMap("productId", productId),
> +        UtilMisc.toList("productFeatureTypeId","sequenceNum", "defaultSequenceNum"));
> +pfIter = productFeatureAndAppls.iterator();
> +oldProductFeatureTypeId = null;
> +values = new LinkedList();
> +while (pfIter.hasNext()) {
> +    productFeatureAppl = pfIter.next();
> +    Debug.logInfo("processing product: " + productId + "  " + productFeatureAppl.getString("productFeatureTypeId") + "--" + productFeatureAppl.getString("description"), "");
> +    if (oldProductFeatureTypeId != null && !oldProductFeatureTypeId.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
> +        productFeatures.add(
> +            UtilMisc.toMap("description",
> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
> +                "abbreviation",oldProductFeatureTypeId,
> +                "types", values));
> +        values = new LinkedList();
> +    }
> +    values.add(productFeatureAppl.getString("description"));
> +    oldProductFeatureTypeId = productFeatureAppl.getString("productFeatureTypeId");
> +}
> +if (values.size() != 0) {
> +    productFeatures.add(
> +            UtilMisc.toMap("description",
> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
> +                "abbreviation",oldProductFeatureTypeId,
> +                "types", values));
> +    context.put("productFeatures", productFeatures);
> +} else {
> +    context.remove("productFeatures");
> +}
>  
>  context.put("product", product);
>  context.put("productStoreId", productStoreId);
>  context.put("categoryId", categoryId);
>  context.put("productReviews", reviews);
> -context.put("sizeProductFeatureAndAppls", sizeProductFeatureAndAppls);
>      
>
> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=576743&r1=576742&r2=576743&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Tue Sep 18 00:23:41 2007
> @@ -93,17 +93,15 @@
>            <div class="tabletext">${prodCatMem.comments}</div>
>            </#if>
>            
> -          <#-- example of showing a certain type of feature with the product -->
> -          <#if sizeProductFeatureAndAppls?has_content>
> +          <#-- list all feature types and values with the product -->
> +          <#if productFeatures?has_content>
>              <div class="tabletext">
> -              <#if (sizeProductFeatureAndAppls?size == 1)>
> -                Size:
> -              <#else>
> -                Sizes Available:
> -              </#if>
> -              <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
> -                ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if>
> -              </#list>
> +            <#list productFeatures as productFeature>
> +                <b>${productFeature.description?default(productFeature.abbreviation)}(s):</b>
> +                <#list productFeature.types as type>
> +                  ${type}<#if type_has_next>,</#if>
> +                </#list>
> +            </#list>
>              </div>
>            </#if>
>            <div class="tabletext">
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

hans_bakker
David,
I think it is usefull that features show up automatically without manual
intervention, and when not desired can easily be supressed.

Can you explain to me in which cases you have hundreds of features you
do not want to show a customer? I can not even imagine that. Also the
Demo data does not have these cases.

Regards,
Hans

On Tue, 2007-09-18 at 01:54 -0600, David E Jones wrote:

> Hans,
>
> What was the intent of this change?
>
> It seems a little funny to me because:
>
> 1. many features are not meant to EVER be shown a customer
> 2. a product could have dozens or hundreds of features, which doesn't fit so well in a productsummary
>
> -David
>
>
> [hidden email] wrote:
> > Author: hansbak
> > Date: Tue Sep 18 00:23:41 2007
> > New Revision: 576743
> >
> > URL: http://svn.apache.org/viewvc?rev=576743&view=rev
> > Log:
> > list all features of a product in the product summary and not only a specific one.
> >
> > Modified:
> >     ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
> >     ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
> >
> > Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh?rev=576743&r1=576742&r2=576743&view=diff
> > ==============================================================================
> > --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh (original)
> > +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh Tue Sep 18 00:23:41 2007
> > @@ -137,12 +137,41 @@
> >      }
> >  }
> >  
> > -// an example of getting features of a certain type to show
> > -sizeProductFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "SIZE"), UtilMisc.toList("sequenceNum", "defaultSequenceNum"));
> > +// Show all features and their values:
> > +List productFeatures = new LinkedList();
> > +productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl",
> > +        UtilMisc.toMap("productId", productId),
> > +        UtilMisc.toList("productFeatureTypeId","sequenceNum", "defaultSequenceNum"));
> > +pfIter = productFeatureAndAppls.iterator();
> > +oldProductFeatureTypeId = null;
> > +values = new LinkedList();
> > +while (pfIter.hasNext()) {
> > +    productFeatureAppl = pfIter.next();
> > +    Debug.logInfo("processing product: " + productId + "  " + productFeatureAppl.getString("productFeatureTypeId") + "--" + productFeatureAppl.getString("description"), "");
> > +    if (oldProductFeatureTypeId != null && !oldProductFeatureTypeId.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
> > +        productFeatures.add(
> > +            UtilMisc.toMap("description",
> > +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
> > +                "abbreviation",oldProductFeatureTypeId,
> > +                "types", values));
> > +        values = new LinkedList();
> > +    }
> > +    values.add(productFeatureAppl.getString("description"));
> > +    oldProductFeatureTypeId = productFeatureAppl.getString("productFeatureTypeId");
> > +}
> > +if (values.size() != 0) {
> > +    productFeatures.add(
> > +            UtilMisc.toMap("description",
> > +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
> > +                "abbreviation",oldProductFeatureTypeId,
> > +                "types", values));
> > +    context.put("productFeatures", productFeatures);
> > +} else {
> > +    context.remove("productFeatures");
> > +}
> >  
> >  context.put("product", product);
> >  context.put("productStoreId", productStoreId);
> >  context.put("categoryId", categoryId);
> >  context.put("productReviews", reviews);
> > -context.put("sizeProductFeatureAndAppls", sizeProductFeatureAndAppls);
> >      
> >
> > Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=576743&r1=576742&r2=576743&view=diff
> > ==============================================================================
> > --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
> > +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Tue Sep 18 00:23:41 2007
> > @@ -93,17 +93,15 @@
> >            <div class="tabletext">${prodCatMem.comments}</div>
> >            </#if>
> >            
> > -          <#-- example of showing a certain type of feature with the product -->
> > -          <#if sizeProductFeatureAndAppls?has_content>
> > +          <#-- list all feature types and values with the product -->
> > +          <#if productFeatures?has_content>
> >              <div class="tabletext">
> > -              <#if (sizeProductFeatureAndAppls?size == 1)>
> > -                Size:
> > -              <#else>
> > -                Sizes Available:
> > -              </#if>
> > -              <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
> > -                ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if>
> > -              </#list>
> > +            <#list productFeatures as productFeature>
> > +                <b>${productFeature.description?default(productFeature.abbreviation)}(s):</b>
> > +                <#list productFeature.types as type>
> > +                  ${type}<#if type_has_next>,</#if>
> > +                </#list>
> > +            </#list>
> >              </div>
> >            </#if>
> >            <div class="tabletext">
> >
> >
>
--
http://Antwebsystems.com : OFBiz Quality support for competitive rates.



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

David E Jones-2

Hans,

So the intention is that it's useful to have all features show up? Could be more specific, what exactly are you trying to have show?

Features are used for a lot of different things. Here is a list of the OOTB types, and many companies add additional types as needed. We do have a couple of clients (one in the metal mesh industry and one in the jewelry industry) with dozens of features on each Product in order to enable parametric searches, configuration and UI options, and lots of other stuff.

Here is a list of types from the ProductTypeData.xml file:

    <ProductFeatureType description="Accessory" hasTable="N" parentTypeId="" productFeatureTypeId="ACCESSORY"/>
    <ProductFeatureType description="Amount" hasTable="N" parentTypeId="" productFeatureTypeId="AMOUNT"/>
    <ProductFeatureType description="Net Weight" hasTable="N" parentTypeId="AMOUNT" productFeatureTypeId="NET_WEIGHT"/>
    <ProductFeatureType description="Artist" hasTable="N" parentTypeId="" productFeatureTypeId="ARTIST"/>
    <ProductFeatureType description="Billing Feature" hasTable="N" parentTypeId="" productFeatureTypeId="BILLING_FEATURE"/>
    <ProductFeatureType description="Brand" hasTable="N" parentTypeId="" productFeatureTypeId="BRAND"/>
    <ProductFeatureType description="Care" hasTable="N" parentTypeId="" productFeatureTypeId="CARE"/>
    <ProductFeatureType description="Color" hasTable="N" parentTypeId="" productFeatureTypeId="COLOR"/>
    <ProductFeatureType description="Dimension" hasTable="N" parentTypeId="" productFeatureTypeId="DIMENSION"/>
    <ProductFeatureType description="Equipment Class" hasTable="N" parentTypeId="" productFeatureTypeId="EQUIP_CLASS"/>
    <ProductFeatureType description="Fabric" hasTable="N" parentTypeId="" productFeatureTypeId="FABRIC"/>
    <ProductFeatureType description="Genre" hasTable="N" parentTypeId="" productFeatureTypeId="GENRE"/>
    <ProductFeatureType description="Gift Wrap" hasTable="N" parentTypeId="" productFeatureTypeId="GIFT_WRAP"/>
    <ProductFeatureType description="Hardware Feature" hasTable="N" parentTypeId="" productFeatureTypeId="HARDWARE_FEATURE"/>
    <ProductFeatureType description="Hazmat" hasTable="N" parentTypeId="" productFeatureTypeId="HAZMAT"/>
    <ProductFeatureType description="License" hasTable="N" parentTypeId="" productFeatureTypeId="LICENSE"/>
    <ProductFeatureType description="Origin" hasTable="N" parentTypeId="" productFeatureTypeId="ORIGIN"/>
    <ProductFeatureType description="Other Feature" hasTable="N" parentTypeId="" productFeatureTypeId="OTHER_FEATURE"/>
    <ProductFeatureType description="Product Quality" hasTable="N" parentTypeId="" productFeatureTypeId="PRODUCT_QUALITY"/>
    <ProductFeatureType description="Size" hasTable="N" parentTypeId="" productFeatureTypeId="SIZE"/>
    <ProductFeatureType description="Software Feature" hasTable="N" parentTypeId="" productFeatureTypeId="SOFTWARE_FEATURE"/>
    <ProductFeatureType description="Style" hasTable="N" parentTypeId="" productFeatureTypeId="STYLE"/>
    <ProductFeatureType description="Symptom" hasTable="N" parentTypeId="" productFeatureTypeId="SYMPTOM"/>
    <ProductFeatureType description="Topic" hasTable="N" parentTypeId="" productFeatureTypeId="TOPIC"/>
    <ProductFeatureType description="Type" hasTable="N" parentTypeId="" productFeatureTypeId="TYPE"/>
    <ProductFeatureType description="Warranty" hasTable="N" parentTypeId="" productFeatureTypeId="WARRANTY"/>
    <ProductFeatureType description="Model Year" hasTable="N" parentTypeId="" productFeatureTypeId="MODEL_YEAR"/>
    <ProductFeatureType description="Year Made" hasTable="N" parentTypeId="" productFeatureTypeId="YEAR_MADE"/>

Do we REALLY want to automatically show these to the customer?

-David



Hans Bakker wrote:

> David,
> I think it is usefull that features show up automatically without manual
> intervention, and when not desired can easily be supressed.
>
> Can you explain to me in which cases you have hundreds of features you
> do not want to show a customer? I can not even imagine that. Also the
> Demo data does not have these cases.
>
> Regards,
> Hans
>
> On Tue, 2007-09-18 at 01:54 -0600, David E Jones wrote:
>> Hans,
>>
>> What was the intent of this change?
>>
>> It seems a little funny to me because:
>>
>> 1. many features are not meant to EVER be shown a customer
>> 2. a product could have dozens or hundreds of features, which doesn't fit so well in a productsummary
>>
>> -David
>>
>>
>> [hidden email] wrote:
>>> Author: hansbak
>>> Date: Tue Sep 18 00:23:41 2007
>>> New Revision: 576743
>>>
>>> URL: http://svn.apache.org/viewvc?rev=576743&view=rev
>>> Log:
>>> list all features of a product in the product summary and not only a specific one.
>>>
>>> Modified:
>>>     ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
>>>     ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
>>>
>>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh?rev=576743&r1=576742&r2=576743&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh (original)
>>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh Tue Sep 18 00:23:41 2007
>>> @@ -137,12 +137,41 @@
>>>      }
>>>  }
>>>  
>>> -// an example of getting features of a certain type to show
>>> -sizeProductFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "SIZE"), UtilMisc.toList("sequenceNum", "defaultSequenceNum"));
>>> +// Show all features and their values:
>>> +List productFeatures = new LinkedList();
>>> +productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl",
>>> +        UtilMisc.toMap("productId", productId),
>>> +        UtilMisc.toList("productFeatureTypeId","sequenceNum", "defaultSequenceNum"));
>>> +pfIter = productFeatureAndAppls.iterator();
>>> +oldProductFeatureTypeId = null;
>>> +values = new LinkedList();
>>> +while (pfIter.hasNext()) {
>>> +    productFeatureAppl = pfIter.next();
>>> +    Debug.logInfo("processing product: " + productId + "  " + productFeatureAppl.getString("productFeatureTypeId") + "--" + productFeatureAppl.getString("description"), "");
>>> +    if (oldProductFeatureTypeId != null && !oldProductFeatureTypeId.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
>>> +        productFeatures.add(
>>> +            UtilMisc.toMap("description",
>>> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
>>> +                "abbreviation",oldProductFeatureTypeId,
>>> +                "types", values));
>>> +        values = new LinkedList();
>>> +    }
>>> +    values.add(productFeatureAppl.getString("description"));
>>> +    oldProductFeatureTypeId = productFeatureAppl.getString("productFeatureTypeId");
>>> +}
>>> +if (values.size() != 0) {
>>> +    productFeatures.add(
>>> +            UtilMisc.toMap("description",
>>> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
>>> +                "abbreviation",oldProductFeatureTypeId,
>>> +                "types", values));
>>> +    context.put("productFeatures", productFeatures);
>>> +} else {
>>> +    context.remove("productFeatures");
>>> +}
>>>  
>>>  context.put("product", product);
>>>  context.put("productStoreId", productStoreId);
>>>  context.put("categoryId", categoryId);
>>>  context.put("productReviews", reviews);
>>> -context.put("sizeProductFeatureAndAppls", sizeProductFeatureAndAppls);
>>>      
>>>
>>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=576743&r1=576742&r2=576743&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
>>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Tue Sep 18 00:23:41 2007
>>> @@ -93,17 +93,15 @@
>>>            <div class="tabletext">${prodCatMem.comments}</div>
>>>            </#if>
>>>            
>>> -          <#-- example of showing a certain type of feature with the product -->
>>> -          <#if sizeProductFeatureAndAppls?has_content>
>>> +          <#-- list all feature types and values with the product -->
>>> +          <#if productFeatures?has_content>
>>>              <div class="tabletext">
>>> -              <#if (sizeProductFeatureAndAppls?size == 1)>
>>> -                Size:
>>> -              <#else>
>>> -                Sizes Available:
>>> -              </#if>
>>> -              <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
>>> -                ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if>
>>> -              </#list>
>>> +            <#list productFeatures as productFeature>
>>> +                <b>${productFeature.description?default(productFeature.abbreviation)}(s):</b>
>>> +                <#list productFeature.types as type>
>>> +                  ${type}<#if type_has_next>,</#if>
>>> +                </#list>
>>> +            </#list>
>>>              </div>
>>>            </#if>
>>>            <div class="tabletext">
>>>
>>>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

hans_bakker
David,
The only areas i see, where the allocated features should not show up is
in the usage of features in manufacturing and searching. Most of my
customers do not use the features there.

What they want however is that we are not involved when they add a
feature to a product and want to use that in e-commerce.

Is modification of this new code not much easier then to add the new
code in the old situation? In the old situation you ALWAYS have to
modify when people are using features, in the new situation sometimes.

Ok, to make people happy in both situations, let's add a flag to the
feature entity where can be indicated that the feature should not show
up in e-commerce.

regards,
Hans

On Tue, 2007-09-18 at 04:41 -0600, David E Jones wrote:

> Hans,
>
> So the intention is that it's useful to have all features show up? Could be more specific, what exactly are you trying to have show?
>
> Features are used for a lot of different things. Here is a list of the OOTB types, and many companies add additional types as needed. We do have a couple of clients (one in the metal mesh industry and one in the jewelry industry) with dozens of features on each Product in order to enable parametric searches, configuration and UI options, and lots of other stuff.
>
> Here is a list of types from the ProductTypeData.xml file:
>
>     <ProductFeatureType description="Accessory" hasTable="N" parentTypeId="" productFeatureTypeId="ACCESSORY"/>
>     <ProductFeatureType description="Amount" hasTable="N" parentTypeId="" productFeatureTypeId="AMOUNT"/>
>     <ProductFeatureType description="Net Weight" hasTable="N" parentTypeId="AMOUNT" productFeatureTypeId="NET_WEIGHT"/>
>     <ProductFeatureType description="Artist" hasTable="N" parentTypeId="" productFeatureTypeId="ARTIST"/>
>     <ProductFeatureType description="Billing Feature" hasTable="N" parentTypeId="" productFeatureTypeId="BILLING_FEATURE"/>
>     <ProductFeatureType description="Brand" hasTable="N" parentTypeId="" productFeatureTypeId="BRAND"/>
>     <ProductFeatureType description="Care" hasTable="N" parentTypeId="" productFeatureTypeId="CARE"/>
>     <ProductFeatureType description="Color" hasTable="N" parentTypeId="" productFeatureTypeId="COLOR"/>
>     <ProductFeatureType description="Dimension" hasTable="N" parentTypeId="" productFeatureTypeId="DIMENSION"/>
>     <ProductFeatureType description="Equipment Class" hasTable="N" parentTypeId="" productFeatureTypeId="EQUIP_CLASS"/>
>     <ProductFeatureType description="Fabric" hasTable="N" parentTypeId="" productFeatureTypeId="FABRIC"/>
>     <ProductFeatureType description="Genre" hasTable="N" parentTypeId="" productFeatureTypeId="GENRE"/>
>     <ProductFeatureType description="Gift Wrap" hasTable="N" parentTypeId="" productFeatureTypeId="GIFT_WRAP"/>
>     <ProductFeatureType description="Hardware Feature" hasTable="N" parentTypeId="" productFeatureTypeId="HARDWARE_FEATURE"/>
>     <ProductFeatureType description="Hazmat" hasTable="N" parentTypeId="" productFeatureTypeId="HAZMAT"/>
>     <ProductFeatureType description="License" hasTable="N" parentTypeId="" productFeatureTypeId="LICENSE"/>
>     <ProductFeatureType description="Origin" hasTable="N" parentTypeId="" productFeatureTypeId="ORIGIN"/>
>     <ProductFeatureType description="Other Feature" hasTable="N" parentTypeId="" productFeatureTypeId="OTHER_FEATURE"/>
>     <ProductFeatureType description="Product Quality" hasTable="N" parentTypeId="" productFeatureTypeId="PRODUCT_QUALITY"/>
>     <ProductFeatureType description="Size" hasTable="N" parentTypeId="" productFeatureTypeId="SIZE"/>
>     <ProductFeatureType description="Software Feature" hasTable="N" parentTypeId="" productFeatureTypeId="SOFTWARE_FEATURE"/>
>     <ProductFeatureType description="Style" hasTable="N" parentTypeId="" productFeatureTypeId="STYLE"/>
>     <ProductFeatureType description="Symptom" hasTable="N" parentTypeId="" productFeatureTypeId="SYMPTOM"/>
>     <ProductFeatureType description="Topic" hasTable="N" parentTypeId="" productFeatureTypeId="TOPIC"/>
>     <ProductFeatureType description="Type" hasTable="N" parentTypeId="" productFeatureTypeId="TYPE"/>
>     <ProductFeatureType description="Warranty" hasTable="N" parentTypeId="" productFeatureTypeId="WARRANTY"/>
>     <ProductFeatureType description="Model Year" hasTable="N" parentTypeId="" productFeatureTypeId="MODEL_YEAR"/>
>     <ProductFeatureType description="Year Made" hasTable="N" parentTypeId="" productFeatureTypeId="YEAR_MADE"/>
>
> Do we REALLY want to automatically show these to the customer?
>
> -David
>
>
>
> Hans Bakker wrote:
> > David,
> > I think it is usefull that features show up automatically without manual
> > intervention, and when not desired can easily be supressed.
> >
> > Can you explain to me in which cases you have hundreds of features you
> > do not want to show a customer? I can not even imagine that. Also the
> > Demo data does not have these cases.
> >
> > Regards,
> > Hans
> >
> > On Tue, 2007-09-18 at 01:54 -0600, David E Jones wrote:
> >> Hans,
> >>
> >> What was the intent of this change?
> >>
> >> It seems a little funny to me because:
> >>
> >> 1. many features are not meant to EVER be shown a customer
> >> 2. a product could have dozens or hundreds of features, which doesn't fit so well in a productsummary
> >>
> >> -David
> >>
> >>
> >> [hidden email] wrote:
> >>> Author: hansbak
> >>> Date: Tue Sep 18 00:23:41 2007
> >>> New Revision: 576743
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=576743&view=rev
> >>> Log:
> >>> list all features of a product in the product summary and not only a specific one.
> >>>
> >>> Modified:
> >>>     ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
> >>>     ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
> >>>
> >>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
> >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh?rev=576743&r1=576742&r2=576743&view=diff
> >>> ==============================================================================
> >>> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh (original)
> >>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh Tue Sep 18 00:23:41 2007
> >>> @@ -137,12 +137,41 @@
> >>>      }
> >>>  }
> >>>  
> >>> -// an example of getting features of a certain type to show
> >>> -sizeProductFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "SIZE"), UtilMisc.toList("sequenceNum", "defaultSequenceNum"));
> >>> +// Show all features and their values:
> >>> +List productFeatures = new LinkedList();
> >>> +productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl",
> >>> +        UtilMisc.toMap("productId", productId),
> >>> +        UtilMisc.toList("productFeatureTypeId","sequenceNum", "defaultSequenceNum"));
> >>> +pfIter = productFeatureAndAppls.iterator();
> >>> +oldProductFeatureTypeId = null;
> >>> +values = new LinkedList();
> >>> +while (pfIter.hasNext()) {
> >>> +    productFeatureAppl = pfIter.next();
> >>> +    Debug.logInfo("processing product: " + productId + "  " + productFeatureAppl.getString("productFeatureTypeId") + "--" + productFeatureAppl.getString("description"), "");
> >>> +    if (oldProductFeatureTypeId != null && !oldProductFeatureTypeId.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
> >>> +        productFeatures.add(
> >>> +            UtilMisc.toMap("description",
> >>> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
> >>> +                "abbreviation",oldProductFeatureTypeId,
> >>> +                "types", values));
> >>> +        values = new LinkedList();
> >>> +    }
> >>> +    values.add(productFeatureAppl.getString("description"));
> >>> +    oldProductFeatureTypeId = productFeatureAppl.getString("productFeatureTypeId");
> >>> +}
> >>> +if (values.size() != 0) {
> >>> +    productFeatures.add(
> >>> +            UtilMisc.toMap("description",
> >>> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
> >>> +                "abbreviation",oldProductFeatureTypeId,
> >>> +                "types", values));
> >>> +    context.put("productFeatures", productFeatures);
> >>> +} else {
> >>> +    context.remove("productFeatures");
> >>> +}
> >>>  
> >>>  context.put("product", product);
> >>>  context.put("productStoreId", productStoreId);
> >>>  context.put("categoryId", categoryId);
> >>>  context.put("productReviews", reviews);
> >>> -context.put("sizeProductFeatureAndAppls", sizeProductFeatureAndAppls);
> >>>      
> >>>
> >>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
> >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=576743&r1=576742&r2=576743&view=diff
> >>> ==============================================================================
> >>> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
> >>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Tue Sep 18 00:23:41 2007
> >>> @@ -93,17 +93,15 @@
> >>>            <div class="tabletext">${prodCatMem.comments}</div>
> >>>            </#if>
> >>>            
> >>> -          <#-- example of showing a certain type of feature with the product -->
> >>> -          <#if sizeProductFeatureAndAppls?has_content>
> >>> +          <#-- list all feature types and values with the product -->
> >>> +          <#if productFeatures?has_content>
> >>>              <div class="tabletext">
> >>> -              <#if (sizeProductFeatureAndAppls?size == 1)>
> >>> -                Size:
> >>> -              <#else>
> >>> -                Sizes Available:
> >>> -              </#if>
> >>> -              <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
> >>> -                ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if>
> >>> -              </#list>
> >>> +            <#list productFeatures as productFeature>
> >>> +                <b>${productFeature.description?default(productFeature.abbreviation)}(s):</b>
> >>> +                <#list productFeature.types as type>
> >>> +                  ${type}<#if type_has_next>,</#if>
> >>> +                </#list>
> >>> +            </#list>
> >>>              </div>
> >>>            </#if>
> >>>            <div class="tabletext">
> >>>
> >>>
>
--
http://Antwebsystems.com : OFBiz Quality support for competitive rates.



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r576743 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/catalog/productsummary.bsh entry/catalog/productsummary.ftl

David E Jones

Yeah, the point is that this doesn't belong in the main project, it doesn't fit with the intent of that data structure.

Are you not using a custom template for this for your client? When you have something that is good for your client but not for the project, that's what should be done, it shouldn't go back into the project.

-David


Hans Bakker wrote:

> David,
> The only areas i see, where the allocated features should not show up is
> in the usage of features in manufacturing and searching. Most of my
> customers do not use the features there.
>
> What they want however is that we are not involved when they add a
> feature to a product and want to use that in e-commerce.
>
> Is modification of this new code not much easier then to add the new
> code in the old situation? In the old situation you ALWAYS have to
> modify when people are using features, in the new situation sometimes.
>
> Ok, to make people happy in both situations, let's add a flag to the
> feature entity where can be indicated that the feature should not show
> up in e-commerce.
>
> regards,
> Hans
>
> On Tue, 2007-09-18 at 04:41 -0600, David E Jones wrote:
>> Hans,
>>
>> So the intention is that it's useful to have all features show up? Could be more specific, what exactly are you trying to have show?
>>
>> Features are used for a lot of different things. Here is a list of the OOTB types, and many companies add additional types as needed. We do have a couple of clients (one in the metal mesh industry and one in the jewelry industry) with dozens of features on each Product in order to enable parametric searches, configuration and UI options, and lots of other stuff.
>>
>> Here is a list of types from the ProductTypeData.xml file:
>>
>>     <ProductFeatureType description="Accessory" hasTable="N" parentTypeId="" productFeatureTypeId="ACCESSORY"/>
>>     <ProductFeatureType description="Amount" hasTable="N" parentTypeId="" productFeatureTypeId="AMOUNT"/>
>>     <ProductFeatureType description="Net Weight" hasTable="N" parentTypeId="AMOUNT" productFeatureTypeId="NET_WEIGHT"/>
>>     <ProductFeatureType description="Artist" hasTable="N" parentTypeId="" productFeatureTypeId="ARTIST"/>
>>     <ProductFeatureType description="Billing Feature" hasTable="N" parentTypeId="" productFeatureTypeId="BILLING_FEATURE"/>
>>     <ProductFeatureType description="Brand" hasTable="N" parentTypeId="" productFeatureTypeId="BRAND"/>
>>     <ProductFeatureType description="Care" hasTable="N" parentTypeId="" productFeatureTypeId="CARE"/>
>>     <ProductFeatureType description="Color" hasTable="N" parentTypeId="" productFeatureTypeId="COLOR"/>
>>     <ProductFeatureType description="Dimension" hasTable="N" parentTypeId="" productFeatureTypeId="DIMENSION"/>
>>     <ProductFeatureType description="Equipment Class" hasTable="N" parentTypeId="" productFeatureTypeId="EQUIP_CLASS"/>
>>     <ProductFeatureType description="Fabric" hasTable="N" parentTypeId="" productFeatureTypeId="FABRIC"/>
>>     <ProductFeatureType description="Genre" hasTable="N" parentTypeId="" productFeatureTypeId="GENRE"/>
>>     <ProductFeatureType description="Gift Wrap" hasTable="N" parentTypeId="" productFeatureTypeId="GIFT_WRAP"/>
>>     <ProductFeatureType description="Hardware Feature" hasTable="N" parentTypeId="" productFeatureTypeId="HARDWARE_FEATURE"/>
>>     <ProductFeatureType description="Hazmat" hasTable="N" parentTypeId="" productFeatureTypeId="HAZMAT"/>
>>     <ProductFeatureType description="License" hasTable="N" parentTypeId="" productFeatureTypeId="LICENSE"/>
>>     <ProductFeatureType description="Origin" hasTable="N" parentTypeId="" productFeatureTypeId="ORIGIN"/>
>>     <ProductFeatureType description="Other Feature" hasTable="N" parentTypeId="" productFeatureTypeId="OTHER_FEATURE"/>
>>     <ProductFeatureType description="Product Quality" hasTable="N" parentTypeId="" productFeatureTypeId="PRODUCT_QUALITY"/>
>>     <ProductFeatureType description="Size" hasTable="N" parentTypeId="" productFeatureTypeId="SIZE"/>
>>     <ProductFeatureType description="Software Feature" hasTable="N" parentTypeId="" productFeatureTypeId="SOFTWARE_FEATURE"/>
>>     <ProductFeatureType description="Style" hasTable="N" parentTypeId="" productFeatureTypeId="STYLE"/>
>>     <ProductFeatureType description="Symptom" hasTable="N" parentTypeId="" productFeatureTypeId="SYMPTOM"/>
>>     <ProductFeatureType description="Topic" hasTable="N" parentTypeId="" productFeatureTypeId="TOPIC"/>
>>     <ProductFeatureType description="Type" hasTable="N" parentTypeId="" productFeatureTypeId="TYPE"/>
>>     <ProductFeatureType description="Warranty" hasTable="N" parentTypeId="" productFeatureTypeId="WARRANTY"/>
>>     <ProductFeatureType description="Model Year" hasTable="N" parentTypeId="" productFeatureTypeId="MODEL_YEAR"/>
>>     <ProductFeatureType description="Year Made" hasTable="N" parentTypeId="" productFeatureTypeId="YEAR_MADE"/>
>>
>> Do we REALLY want to automatically show these to the customer?
>>
>> -David
>>
>>
>>
>> Hans Bakker wrote:
>>> David,
>>> I think it is usefull that features show up automatically without manual
>>> intervention, and when not desired can easily be supressed.
>>>
>>> Can you explain to me in which cases you have hundreds of features you
>>> do not want to show a customer? I can not even imagine that. Also the
>>> Demo data does not have these cases.
>>>
>>> Regards,
>>> Hans
>>>
>>> On Tue, 2007-09-18 at 01:54 -0600, David E Jones wrote:
>>>> Hans,
>>>>
>>>> What was the intent of this change?
>>>>
>>>> It seems a little funny to me because:
>>>>
>>>> 1. many features are not meant to EVER be shown a customer
>>>> 2. a product could have dozens or hundreds of features, which doesn't fit so well in a productsummary
>>>>
>>>> -David
>>>>
>>>>
>>>> [hidden email] wrote:
>>>>> Author: hansbak
>>>>> Date: Tue Sep 18 00:23:41 2007
>>>>> New Revision: 576743
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=576743&view=rev
>>>>> Log:
>>>>> list all features of a product in the product summary and not only a specific one.
>>>>>
>>>>> Modified:
>>>>>     ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
>>>>>     ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
>>>>>
>>>>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh?rev=576743&r1=576742&r2=576743&view=diff
>>>>> ==============================================================================
>>>>> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh (original)
>>>>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh Tue Sep 18 00:23:41 2007
>>>>> @@ -137,12 +137,41 @@
>>>>>      }
>>>>>  }
>>>>>  
>>>>> -// an example of getting features of a certain type to show
>>>>> -sizeProductFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "SIZE"), UtilMisc.toList("sequenceNum", "defaultSequenceNum"));
>>>>> +// Show all features and their values:
>>>>> +List productFeatures = new LinkedList();
>>>>> +productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl",
>>>>> +        UtilMisc.toMap("productId", productId),
>>>>> +        UtilMisc.toList("productFeatureTypeId","sequenceNum", "defaultSequenceNum"));
>>>>> +pfIter = productFeatureAndAppls.iterator();
>>>>> +oldProductFeatureTypeId = null;
>>>>> +values = new LinkedList();
>>>>> +while (pfIter.hasNext()) {
>>>>> +    productFeatureAppl = pfIter.next();
>>>>> +    Debug.logInfo("processing product: " + productId + "  " + productFeatureAppl.getString("productFeatureTypeId") + "--" + productFeatureAppl.getString("description"), "");
>>>>> +    if (oldProductFeatureTypeId != null && !oldProductFeatureTypeId.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
>>>>> +        productFeatures.add(
>>>>> +            UtilMisc.toMap("description",
>>>>> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
>>>>> +                "abbreviation",oldProductFeatureTypeId,
>>>>> +                "types", values));
>>>>> +        values = new LinkedList();
>>>>> +    }
>>>>> +    values.add(productFeatureAppl.getString("description"));
>>>>> +    oldProductFeatureTypeId = productFeatureAppl.getString("productFeatureTypeId");
>>>>> +}
>>>>> +if (values.size() != 0) {
>>>>> +    productFeatures.add(
>>>>> +            UtilMisc.toMap("description",
>>>>> +                delegator.findByPrimaryKeyCache("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", oldProductFeatureTypeId)).getString("description"),
>>>>> +                "abbreviation",oldProductFeatureTypeId,
>>>>> +                "types", values));
>>>>> +    context.put("productFeatures", productFeatures);
>>>>> +} else {
>>>>> +    context.remove("productFeatures");
>>>>> +}
>>>>>  
>>>>>  context.put("product", product);
>>>>>  context.put("productStoreId", productStoreId);
>>>>>  context.put("categoryId", categoryId);
>>>>>  context.put("productReviews", reviews);
>>>>> -context.put("sizeProductFeatureAndAppls", sizeProductFeatureAndAppls);
>>>>>      
>>>>>
>>>>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=576743&r1=576742&r2=576743&view=diff
>>>>> ==============================================================================
>>>>> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
>>>>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Tue Sep 18 00:23:41 2007
>>>>> @@ -93,17 +93,15 @@
>>>>>            <div class="tabletext">${prodCatMem.comments}</div>
>>>>>            </#if>
>>>>>            
>>>>> -          <#-- example of showing a certain type of feature with the product -->
>>>>> -          <#if sizeProductFeatureAndAppls?has_content>
>>>>> +          <#-- list all feature types and values with the product -->
>>>>> +          <#if productFeatures?has_content>
>>>>>              <div class="tabletext">
>>>>> -              <#if (sizeProductFeatureAndAppls?size == 1)>
>>>>> -                Size:
>>>>> -              <#else>
>>>>> -                Sizes Available:
>>>>> -              </#if>
>>>>> -              <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
>>>>> -                ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if>
>>>>> -              </#list>
>>>>> +            <#list productFeatures as productFeature>
>>>>> +                <b>${productFeature.description?default(productFeature.abbreviation)}(s):</b>
>>>>> +                <#list productFeature.types as type>
>>>>> +                  ${type}<#if type_has_next>,</#if>
>>>>> +                </#list>
>>>>> +            </#list>
>>>>>              </div>
>>>>>            </#if>
>>>>>            <div class="tabletext">
>>>>>
>>>>>