You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Naveen Kumar B V <na...@gmail.com> on 2010/12/01 20:23:22 UTC

Not able to Cancel Products from an order

Hi,
first of all...
Sorry for such a lengthy description. Just wanted to make sure that i am
clear in what I say.

    I am facing a problem in cancelling products from an order.
Lets take a scenario here:
After an order has been successfully created, (Order status may be CREATED
or APPROVED). Due to some reasons a customer wanted to cancel
a particular product from an order. I am not able to perform this
operations, and faced the problems listed below:

1. ERROR: Insecure Request cannot be converted to a Secure Request.

             I got an error as shown above, after researching i found that
http call was being redirected to httpS call.
So i edited url.properties file and changed a property as shown below:
              "port.https.enabled=N"

I hope the above problem is rectified. (Is it the correct approach)


2. Now after the cancel button is clicked, the page is just getting
reloaded, and the status is not getting updated.

Analysis:
     I tried debugging the code, and looked at cancelOrderItem() method in
OrderServices.java file. the service which was actually getting invoked....

In that method,  i am getting NULL values for some of the parameters listed
below:
     cancelQuantity, shipGroupSeqId, itemReasonMap, itemCommentMap.

And, after the flow gets executed further,

          Map fields = UtilMisc.toMap("orderId", orderId);
        if (orderItemSeqId != null) {
            fields.put("orderItemSeqId", orderItemSeqId);
        }
        if (shipGroupSeqId != null) {
            fields.put("shipGroupSeqId", shipGroupSeqId);
        }

        List orderItemShipGroupAssocs = null;
        try {
         Debug.log("--->>> Getting Order ItemShip Group.........");
           * orderItemShipGroupAssocs =
delegator.findByAnd("OrderItemShipGroupAssoc", fields);*
*
*
*
*
*
*
*  orderItemShipGroupAssocs       is empty, the size is 0.*



Subsequently, when the above list orderItemShipGroupAssocs is iterated over
a while loop, it is getting executed 0 times and no operation is being
performed
in cancellation, and hence no errors also.


Can anyone help me by telling why is the size of above
List orderItemShipGroupAssocs 0, and null values for some of the fields.
Any help would be appreciated.....



Regards,
Naveen Kumar B.V


**