You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Christian Carlow (JIRA)" <ji...@apache.org> on 2014/01/10 00:17:51 UTC

[jira] [Updated] (OFBIZ-5420) Add ability to separately price BOM elements for orders

     [ https://issues.apache.org/jira/browse/OFBIZ-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Carlow updated OFBIZ-5420:
------------------------------------

    Attachment: OFBIZ-5420.patch

This patch is a starting point for this functionality.  The patch also includes changes to resolve the following issues:  
* OFBIZ-5423 - Add ability to add virtual products to existing orders
* OFBIZ-5425 - Improve editorderitems.ftl page for better readability
* OFBIZ-5430 - "Please Select Your Shipping Method" error sometimes occurs when updating order items
* OFBIZ-5437 - Add ability to select BOM virtual component features when adding item to cart
* OFBIZ-5440 - Improve BOM functionality to handle virtual BOM item variant selection

This patch builds off of the patches provided in OFBIZ-5400 and OFBIZ-5393 so they will have to be applied before this patch works (not sure if this is the best way to do this...).

Many of the major bugs related to the test scenario below have been worked out.  More testing and documentation is needed also as well as demo data.

To test this functionality:

1.  Create a virtual GZ-OUTER-BASKET with Black and Silver Color features
2.  Modify GZ-BASKET to match the GZ-OUTER-BASKET settings set in step 1
3.  Assign 3 GZ-BASKET products a BOM of GZ-OUTER-BASKET 
4.  Add GZ-OUTER-BASKET to the cart

The company for which I developed this requires the ability to individually price BOM items at any level to make up the whole order item price. 

The productdetail.ftl page to explode the BOM list for assembled items.  Each BOM Item is listed with price, feature selection, and ship group quantity fields.  Virtual BOM items can be split into multiple variant products by assigning a variant quantity less than the virtual total which triggers the creation of a new Virtual BOM node as a child awaiting for the remaining virtual quantity to be assigned to a variant.  Whenever the same variant is chosen then the quantity gets grouped with the existing variant BOM item.  

OFBIZ-5423 is mostly resolved by this patch because the productdetail.ftl page now appears whenever a virtual product is added to the order.  Without this patch a virtual product will be appended to an existing order without requiring a variant to be selected.

OFBIZ-5425 is mostly resolved by this patch in that the number of columns in the orderitems table is reduced by 2 and the list appears a bit more condensed which is important because this patch and the one in OFBIZ-5400 has the potential to make the page appear much more cluttered.  Any of the fields that existed in the two columns removed were placed to fall within the remaining columns.

OFBIZ-5430 is resolved by this patch because the orderItemShipGroupAssoc code is executed before the setUserLogin() function which expects ship groups to have already been created in the loadCartFromOrder() function.  

OFBIZ-5437 and OFBIZ-5437 are resolved because the BOM items include feature selection fields.  I don't think the company for which I developed this functionality will need feature selection fields but I implemented it anyway.  I hoped to implement selectedQuantity fields for each BOM item products with requireQuantity=Y as mentioned in OFBIZ-2820 but haven't done so yet.  I'll proabably create a separate issue for that.

OrderItemBom and OrderItemBomShipGrpAssoc entities were created to track the BOM items.

BOM Item ship group quantities can only be set when adding a product to an order (ie. accessing the productdetail.ftl page).  Once an order is added to the cart only the top-level parent product quantity can be changed.  Any remaining variant BOM item ship group quantities resulting from quantity increases will be applied to the first variant child item.  Any decreases will be applied to the last variant child items including the removal of last child items if necessary.  Clicking on the productId of an BOM order item will load the productdetails.ftl page to create a new BOM product but with the with the bom items configured to match the order item selected.

Prices can only be set for bom items when an order item is an assembled item.  The unit price is calculated by dividing the sum of the bom item totals by the order item quantity and displayed in a disabled text field.  Inverselty, BOM item quantity fields are displayed as disabled text fields and are assigned to the sum of the bom item ship quantities.


> Add ability to separately price BOM elements for orders
> -------------------------------------------------------
>
>                 Key: OFBIZ-5420
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5420
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: SVN trunk
>            Reporter: Christian Carlow
>         Attachments: OFBIZ-5420.patch
>
>
> I have a scenario where a company individually prices BOM elements of assembled products ordered.  So if an item is manufactured from 2 component products, the company needs to be able to specify prices for both of the components to made up the total parent product cost.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)