You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Naveen Kumar B V <na...@gmail.com> on 2010/12/01 20:24:27 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

Re: Not able to Cancel Products from an order

Posted by BJ Freeman <bj...@free-man.net>.
for a customer and/or  back end person to change an order they much be 
logged in (https) this is by design.
it is best to use the demo site and show your steps so it can be replicated.


=========================
BJ Freeman
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Naveen Kumar B V sent the following on 12/1/2010 11:24 AM:
> 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
>