I know in the cart a SECA is called to update the grand total in the header of the order. I would do widget that has a bsh that does the calculations for you. or a FTL that uses a bsh or groovy script.
ian tabangay sent the following on 9/10/2008 10:25 PM: > Hi. I have this view-entity: > > <view-entity entity-name="OrderItemGroupByProduct" > package-name="ph.ati.ofbiz.order"> > <member-entity entity-alias="ORIT" entity-name="OrderItem"/> > <alias name="orderId" entity-alias="ORIT" group-by="true"/> > <alias name="productId" entity-alias="ORIT" group-by="true"/> > <alias name="quantity" entity-alias="ORIT" group-by="true" > function="sum"/> > <relation type="one" rel-entity-name="OrderHeader"> > <key-map field-name="orderId" /> > </relation> > <relation type="one" rel-entity-name="Product"> > <key-map field-name="productId" /> > </relation> > </view-entity> > > What I wanted to have is a row containing the sum of quantity ordered for > each productId and orderId. > The error comes from calling 'arraySize = (int) > delegator.findCountByCondition(entityName, condition, null, null);' > when it is executing this sql: > 'SELECT COUNT(1) FROM (SELECT COUNT(1) FROM public.ORDER_ITEM ORIT GROUP BY > ORIT.ORDER_ID, ORIT.PRODUCT_ID, SUM(ORIT.QUANTITY)) TEMP_NAME' > How should I make the view-entity? > > ~ ian >
