[
https://issues.apache.org/jira/browse/OFBIZ-5430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13850436#comment-13850436
]
Christian Carlow commented on OFBIZ-5430:
-----------------------------------------
Hey Jacques,
I think you are right. I restarted my local dev server and tried it again and
it worked fine. Before the restart I managed to debug to determine that the
new empty ship group was added at index=0 when cart.setUserLogin(userLogin,
dispatcher); is called on line 208 of ShoppingCartServices.loadCartFromOrder().
Here is the chain of function calls I followed that was causing the empty ship
group to be added (sorry meant to copy call stack):
ShoppingCartServices.loadCartFromOrder()
setUserLogin()
doPromotions()
runProductPromos()
doPromotions()
runProductPromoRules()
performAction()
Within the ProductPromoWorker.performAction() that was eventually called line
1531 was responsible for adding the empty ship group:
gwpItem = ShoppingCartItem.makeItem(null, product, null, quantity, null, null,
null, null, null, null, null, null, prodCatalogId, null, null, null,
dispatcher, cart, Boolean.FALSE, Boolean.TRUE, null, Boolean.FALSE,
Boolean.FALSE);
The line is called as part of the productPromoActionEnumId="PROMO_GWP" logic.
So it seems that somehow the cart ship groups are not yet set when a promo is
added so a new empty one is created to support the promo item to be added.
I'm still unable to reproduce intentionally.
> "Please Select Your Shipping Method" error sometimes occurs when updating
> order items
> -------------------------------------------------------------------------------------
>
> Key: OFBIZ-5430
> URL: https://issues.apache.org/jira/browse/OFBIZ-5430
> Project: OFBiz
> Issue Type: Bug
> Affects Versions: SVN trunk
> Reporter: Christian Carlow
>
> Sometimes when an order item is appended or existing order items are updated,
> a "Please Select Your Shipment Method" error occurs. I'm not exactly sure
> what causes this but it seems to be intermittent because sometimes I'm able
> to perform both of the operations without the error occur.
> The problem seems to be that an extra empty ship group is added to the cart
> and takes the index position of first ship group. Because the empty ship
> group contains no shipmentMethodTypeId or carrierPartyId the error occurs.
> Logic needs to exist to prevent the empty ship group that causes this issue
> from ever being added to the cart.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)