Skip to content

Commit

Permalink
A slightly modified patch from Pierre Smits for <<comments on orderin…
Browse files Browse the repository at this point in the history
…g products should be store driven>> https://issues.apache.org/jira/browse/OFBIZ-6924

Currently, in ecommerce/tiny-gismo-GZ-1000-p a comment field is shown.
This is a result of the following code in productdetail.ftl
{code}
<#assign commentEnable = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("order", "order.item.comment.enable", delegator)>
            <#if commentEnable.equals("Y")>
                <#assign orderItemAttr = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("order", "order.item.attr.prefix", delegator)>
                ${uiLabelMap.CommonComment}&nbsp;<input type="text" name="${orderItemAttr}comment"/>
            </#if>
{code}
Based on the code excerpt this is set by a property value in the order component. However this should be based on a configuration setting in the store.

jleroux: I simply changed the place of the ProductStore.allowComment field (not after the old deprecated fields) and used a description instead of an XML comment there.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735435 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
JacquesLeRoux committed Mar 17, 2016
1 parent 4c18f5e commit 4de29b5
Show file tree
Hide file tree
Showing 4 changed files with 390 additions and 383 deletions.
2 changes: 2 additions & 0 deletions applications/datamodel/entitydef/product-entitymodel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3777,12 +3777,14 @@ under the License.
<field name="managedByLot" type="indicator"><description>If Y, the preparator can choose the InventoryItem by this lotId when he makes the picklist.</description></field>
<field name="showOutOfStockProducts" type="indicator"><description>Default Y. If N then out of stock products will not be displayed on site</description></field>
<field name="orderDecimalQuantity" type="indicator"><description>use to indicate if decimal quantity can be ordered for this producStore. Default value is Y</description></field>
<field name="allowComment" type="indicator"><description>Allow comments for order line items per store</description></field>

<!-- old fields, deprecated -->
<field name="oldStyleSheet" col-name="STYLE_SHEET" type="url"></field>
<field name="oldHeaderLogo" col-name="HEADER_LOGO" type="url"></field>
<field name="oldHeaderMiddleBackground" col-name="HEADER_MIDDLE_BACKGROUND" type="url"></field>
<field name="oldHeaderRightBackground" col-name="HEADER_RIGHT_BACKGROUND" type="url"></field>

<prim-key field="productStoreId"/>
<relation type="one" fk-name="PROD_STR_PRSTRGP" title="Primary" rel-entity-name="ProductStoreGroup">
<key-map field-name="primaryStoreGroupId" rel-field-name="productStoreGroupId"/>
Expand Down
Loading

0 comments on commit 4de29b5

Please sign in to comment.