Hi All,
For this I did suggested a way when this topic was discussed on the user mailing list. The way I suggested was that, we can add the field with name virtualVariantMethod either in Product of Product store and for this field we can define the enumerations like VARIANT_TREE and FEATURE_TREE. If it is defined on Product than it will give us a way to select one of the two methods for that product. On the other hand, if this field is defined for a ProductStore, than the selected method will apply to all the products that comes under that ProductStore. This way it won't seem odd like it is when using Old and New keywords.

    Does it seems a suitable approach?

Regards,
Mridul Pathak

On Apr 1, 2008, at 9:43 AM, Hans Bakker wrote:

Hi David,

sure, i have investigated first to improve the current method. That is
not possible because the dependencies are stored with the available
variants. If a variant is not available the feature cannot be selected.

This means however that always all variants need to be checked for all
options. If you have 6 feature types with each of them 6 options the
total number of possibilities is about 6*6*6*6*6*6 is about 46000 which
need to be retrieved and kept in the html form.....

The basic difference between the old method and the new method is that
the dependencies are now stored at the feature level and that in the
above case only 6*6 features need to be retrieved. Incompatibilities
will be checked after the selection. It will now also be possible to
check dependencies which is not possible in the old method.

On the other hand both methods are compatible and one can switch from
the old method to the new method, add the dependencies at the feature
level and ready you are....One can also go back afterwards.

So to answer your question, i think with not so many variants the old
method is better and with many variants the new one is. Integration is
pretty difficult because the data retrieved and the html used is
completely different although the display is very similar

Hope this answers your question?

Regards,
Hans



On Mon, 2008-03-31 at 20:57 -0600, David E Jones wrote:
My first thought is that a field on the Product entity is not the best
way to set this up... aside from the possibility that maybe we don't
want an "old" way and a "new" way, maybe we just want one way.

Has any effort been put into combining the two methods, or are they
totally incompatible? If someone with old data used the new code would
it work as it used to, as is expected?

-David


On Mar 31, 2008, at 4:19 AM, Hans Bakker wrote:
By Accident the new field on the product has also slipped in to
indicate
the new virtual/variant implementation

Please let me know if this is acceptable, or we should do it
differently.

Regards,
Hans


On Mon, 2008-03-31 at 10:13 +0000, [EMAIL PROTECTED] wrote:
Author: hansbak
Date: Mon Mar 31 03:13:05 2008
New Revision: 642949

URL: http://svn.apache.org/viewvc?rev=642949&view=rev
Log:
add feature interactions to a product

Modified:
  ofbiz/trunk/applications/product/config/ProductUiLabels.xml
  ofbiz/trunk/applications/product/entitydef/entitymodel.xml
  ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/
controller.xml
  ofbiz/trunk/applications/product/webapp/catalog/product/
ProductForms.xml
ofbiz/trunk/applications/product/widget/catalog/ ProductScreens.xml

Modified: ofbiz/trunk/applications/product/config/ ProductUiLabels.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=642949&r1=642948&r2=642949&view=diff
=
=
=
=
=
=
=
=
=
= = ===================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml
(original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Mon
Mar 31 03:13:05 2008
@@ -4082,7 +4082,16 @@
<value xml:lang="ru">Изменить кÐ
°Ñ‚егории осоÐ
±ÐµÐ½Ð½Ð¾ÑÑ‚ей</value>
       <value xml:lang="th">แกà¹
‰à¹„ขประเภท
การทำงาน</value>
       <value xml:lang="zh">编辑特征ç
±»åž‹</value>
-    </property>
+    </property>
+    <property key="AddFeatureInteraction">
+        <value xml:lang="en">Add Feature Interaction</value>
+    </property>
+    <property key="ListFeatureInteractions">
+        <value xml:lang="en">List Feature Interactions</value>
+    </property>
+    <property key="PageTitleEditProductFeatureInteractions">
+        <value xml:lang="en">Edit Product Feature Interactions</
value>
+    </property>
   <property key="PageTitleAddFeatureInterAction">
       <value xml:lang="en">Add Feature InterAction</value>
   </property>
@@ -11466,6 +11475,9 @@
       <value xml:lang="ru">Новый поÐ
´Ð¿Ð¸ÑÐ½Ð¾Ð¹ ресурс</value>
       <value xml:lang="th">แหà¸
¥à¹ˆà¸‡à¸‚้ภมูภ¥à¸à¸²à¸
£à¸ªà¸±à¹ˆà¸‡à¸‹à¸·à¹‰à¸
ใหม่</value>
       <value xml:lang="zh">新建订阅
资源</value>
+    </property>
+    <property key="ProductNewVirtualVariantMethod">
+        <value xml:lang="en">New Method</value>
   </property>
   <property key="ProductNewVirtualProduct">
       <value xml:lang="en">New Virtual Product</value>

Modified: ofbiz/trunk/applications/product/entitydef/ entitymodel.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=642949&r1=642948&r2=642949&view=diff
=
=
=
=
=
=
=
=
=
= = ===================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml
(original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Mon
Mar 31 03:13:05 2008
@@ -2387,6 +2387,7 @@
     <field name="includeInPromotions" type="indicator"></field>
     <field name="isVirtual" type="indicator"></field>
     <field name="isVariant" type="indicator"></field>
+      <field name="newVirtualVariantMethod"
type="indicator"><description>If this field is set to 'Y', the new
feature variant selection method will be used, other values will
use the old method</description></field>
     <field name="originGeoId" type="id"></field>
     <field name="requirementMethodEnumId" type="id"></field>
     <field name="billOfMaterialLevel" type="numeric"></field>

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/
controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=642949&r1=642948&r2=642949&view=diff
=
=
=
=
=
=
=
=
=
= = ===================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/
controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/
controller.xml Mon Mar 31 03:13:05 2008
@@ -1174,6 +1174,18 @@
       <response name="success" type="request-redirect-noparam"
value="EditFeatureInterActions"/>
       <response name="error" type="view"
value="EditFeatureInterAction"/>
   </request-map>
+    <request-map uri="AddProductFeatureIactn">
+        <security https="true" auth="true"/>
+        <event type="service" path=""
invoke="createProductFeatureIactn"/>
+        <response name="success" type="view"
value="EditProductFeatures"/>
+        <response name="error" type="view"
value="EditProductFeatures"/>
+    </request-map>
+    <request-map uri="removeFeatureIactn">
+        <security https="true" auth="true"/>
+        <event type="service" path=""
invoke="removeProductFeatureIactn"/>
+        <response name="success" type="view"
value="EditProductFeatures"/>
+        <response name="error" type="view"
value="EditProductFeatures"/>
+    </request-map>
   <request-map uri="createProductFeatureType">
       <security https="true" auth="true"/>
       <event type="service" path=""
invoke="createProductFeatureType"/>

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/
ProductForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml?rev=642949&r1=642948&r2=642949&view=diff
=
=
=
=
=
=
=
=
=
= = ===================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/
ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/
ProductForms.xml Mon Mar 31 03:13:05 2008
@@ -41,6 +41,9 @@
       <field position="2" name="isVariant" title="$
{uiLabelMap.ProductVariantProduct}">
           <drop-down><option key="N" description="$
{uiLabelMap.CommonN}"/><option key="Y" description="$
{uiLabelMap.CommonY}"/></drop-down>
       </field>
+ <field position="3" name="newVirtualVariantMethod" title="$
{uiLabelMap.ProductNewVirtualVariantMethod}">
+            <drop-down><option key="N" description="$
{uiLabelMap.CommonN}"/><option key="Y" description="$
{uiLabelMap.CommonY}"/></drop-down>
+        </field>
       <field name="productTypeId" title="$
{uiLabelMap.ProductProductType}">
           <drop-down no-current-selected-key="FINISHED_GOOD">
               <entity-options entity-name="ProductType"
description="${description}"> <!-- [${productTypeId}] -->
@@ -1219,7 +1222,50 @@
       </field>
       <field name="submitButton" title="$
{uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
   </form>
-
+    <form name="ListFeatureInteractions"  list-
name="featureInteractions" type="list"
+        odd-row-style="alternate-row" default-table-style="basic-
table">
+        <field name="productFeatureId">
+            <display-entity entity-name="ProductFeature"
description="${description}">
+                <sub-hyperlink target="EditFeature?
productFeatureId=${productFeatureId}" description="[$
{productFeatureId}]"/>
+            </display-entity>
+        </field>
+        <field name="productFeatureIdTo">
+            <display-entity entity-name="ProductFeature"
description="${description}" key-field-name="productFeatureId">
+                <sub-hyperlink target="EditFeature?
productFeatureId=${productFeatureIdTo}" description="[$
{productFeatureIdTo}]"/>
+            </display-entity>
+        </field>
+        <field name="productFeatureIactnTypeId"><display-entity
entity-name="ProductFeatureIactnType"/></field>
+
+        <field name="removeFeatureInterAction" title="$
{uiLabelMap.CommonDelete}" widget-style="buttontext">
+ <hyperlink target="removeFeatureIactn? productFeatureId=
${productFeatureId}&amp;productFeatureIdTo=$
{productFeatureIdTo}&amp;productId=${productId}" description="$
{uiLabelMap.CommonDelete}"/>
+        </field>
+    </form>
+    <form name="AddFeatureInteraction" type="single"
target="AddProductFeatureIactn" title="" default-map-
name="productFeatureIactn"
+        header-row-style="header-row" default-table-style="basic-
table">
+        <field name="productId"><hidden/></field>
+        <field name="productFeatureId" position="1">
+            <drop-down allow-empty="true">
+                <entity-options description="${description} [$
{productFeatureId}]" entity-name="ProductFeature">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="productFeatureIdTo" position="2">
+            <drop-down allow-empty="true">
+                <entity-options description="${description} [$
{productFeatureId}]" entity-name="ProductFeature" key-field-
name="productFeatureId">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="productFeatureIactnTypeId">
+            <drop-down allow-empty="false">
+                <entity-options description="${description}"
entity-name="ProductFeatureIactnType">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}"
widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
   <form name="AddProductFeatureApplAttr" type="single"
target="createProductFeatureApplAttr" title=""
       header-row-style="header-row" default-table-style="basic-
table">
       <auto-fields-service service-
name="createProductFeatureApplAttr" />

Modified: ofbiz/trunk/applications/product/widget/catalog/
ProductScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=642949&r1=642948&r2=642949&view=diff
=
=
=
=
=
=
=
=
=
= = ===================================================================
--- ofbiz/trunk/applications/product/widget/catalog/
ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/
ProductScreens.xml Mon Mar 31 03:13:05 2008
@@ -1067,10 +1067,13 @@
               <set field="headerItem" value="product"/>
               <set field="tabButtonItem"
value="EditProductFeatures"/>
               <set field="labelTitleProperty"
value="ProductFeatures"/>
-
+
               <set field="productId" from-
field="parameters.productId"/>
               <entity-one entity-name="Product" value-
name="product"/>
               <script location="component://product/webapp/
catalog/WEB-INF/actions/product/EditProductFeatures.bsh"/>
+ <entity-and entity-name="ProductFeatureIactn" list-
name="featureInteractions">
+                    <field-map field-name="productId" env-
name="parameters.productId"/>
+                </entity-and>
           </actions>
           <widgets>
               <decorator-screen name="CommonProductDecorator"
location="${parameters.mainDecoratorLocation}">
@@ -1083,6 +1086,26 @@
                                   </platform-specific>
                               </widgets>
                           </section>
+                        </container>
+                        <container style="screenlet">
+ <container style="screenlet-title- bar">
+                                <container style="h3">
+                                    <label text="$
{uiLabelMap.ListFeatureInteractions}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form
name="ListFeatureInteractions" location="component://product/ webapp/
catalog/product/ProductForms.xml"/>
+                            </container>
+                        </container>
+                        <container style="screenlet">
+ <container style="screenlet-title- bar">
+                                <container style="h3">
+                                    <label text="$
{uiLabelMap.AddFeatureInteraction}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form
name="AddFeatureInteraction" location="component://product/webapp/
catalog/product/ProductForms.xml"/>
+                            </container>
                       </container>
                       <container style="screenlet">
                           <container style="screenlet-title-bar">



--
AntWebsystems.com: Quality OFBiz services for competitive rates.....



--
AntWebsystems.com: Quality OFBiz services for competitive rates.....


Reply via email to