Shipment custom method implementation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Shipment custom method implementation

biletnikov
Hello,
you know that the shipment cost estimation can be specified via "Shipping Estimates" module by using simple formulas and conditions , or by entering a custom shipment method.

There is the calcShipmentCostEstimate service which is responsible for the shipment cost estimation.
The interface for this service has (since OFBiz 11.04):

        <attribute name="shipmentCustomMethodId" type="String" mode="IN" optional="true"/>
        <attribute name="shipmentGatewayConfigId" type="String" mode="IN" optional="true"/>

attributes, but they are not used in this service.
This custom method logic for shipments is out of this service and can be found in:
org.ofbiz.order.shoppingcart.shipping.ShippingEvents.java

there is getExternalShipEstimate method which has the implementation.
But actually, this logic is placed in the event class. I think it should be moved to calcShipmentCostEstimate service, to do not split it via the service and event. Also, these not used attributes (shipmentCustomMethodId, shipmentGatewayConfigId) say me that this refactoring was not finished. And I do not see any obstacles to do that now. Am I right?
Kind regards,
Sergei
Reply | Threaded
Open this post in threaded view
|

Re: Shipment custom method implementation

Jacques Le Roux
Administrator
Did you get a chance to digg further?

Jacques

biletnikov wrote:

> Hello,
> you know that the shipment cost estimation can be specified via "Shipping
> Estimates" module by using simple formulas and conditions , or by entering a
> custom shipment method.
>
> There is the *calcShipmentCostEstimate* service which is responsible for the
> shipment cost estimation.
> The interface for this service has (since OFBiz 11.04):
>
>        <attribute name="shipmentCustomMethodId" type="String" mode="IN"
> optional="true"/>
>        <attribute name="shipmentGatewayConfigId" type="String" mode="IN"
> optional="true"/>
>
> attributes, but they are not used in this service.
> This custom method logic for shipments is out of this service and can be
> found in:
> org.ofbiz.order.shoppingcart.shipping.ShippingEvents.java
>
> there is getExternalShipEstimate method which has the implementation.
> But actually, this logic is placed in the event class. I think it should be
> moved to *calcShipmentCostEstimate* service, to do not split it via the
> service and event. Also, these not used attributes (shipmentCustomMethodId,
> shipmentGatewayConfigId) say me that this refactoring was not finished. And
> I do not see any obstacles to do that now. Am I right?
>
> -----
> Kind regards,
> Sergei
Reply | Threaded
Open this post in threaded view
|

Re: Shipment custom method implementation

biletnikov
Unfortunately, I did not have enough time for that, but I am sure that we still need some kind of refactoring here, i.e. move some logic from event to service.

On Thu, May 10, 2012 at 12:45 AM, Jacques Le Roux [via OFBiz] <[hidden email]> wrote:
Did you get a chance to digg further?

Jacques

biletnikov wrote:

> Hello,
> you know that the shipment cost estimation can be specified via "Shipping
> Estimates" module by using simple formulas and conditions , or by entering a
> custom shipment method.
>
> There is the *calcShipmentCostEstimate* service which is responsible for the
> shipment cost estimation.
> The interface for this service has (since OFBiz 11.04):
>
>        <attribute name="shipmentCustomMethodId" type="String" mode="IN"
> optional="true"/>
>        <attribute name="shipmentGatewayConfigId" type="String" mode="IN"
> optional="true"/>
>
> attributes, but they are not used in this service.
> This custom method logic for shipments is out of this service and can be
> found in:
> org.ofbiz.order.shoppingcart.shipping.ShippingEvents.java
>
> there is getExternalShipEstimate method which has the implementation.
> But actually, this logic is placed in the event class. I think it should be
> moved to *calcShipmentCostEstimate* service, to do not split it via the
> service and event. Also, these not used attributes (shipmentCustomMethodId,
> shipmentGatewayConfigId) say me that this refactoring was not finished. And
> I do not see any obstacles to do that now. Am I right?
>
> -----
> Kind regards,
> Sergei



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/Shipment-custom-method-implementation-tp4269648p4621888.html
To unsubscribe from Shipment custom method implementation, click here.
NAML



--
Best regards,
Sergei Biletnikov
Kind regards,
Sergei