You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by biletnikov <bi...@gmail.com> on 2012/01/06 16:01:28 UTC

Shipment custom method implementation

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
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Shipment-custom-method-implementation-tp4269648p4269648.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Shipment custom method implementation

Posted by biletnikov <bi...@gmail.com>.
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] <
ml-node+s135035n4621888h15@n4.nabble.com> 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<http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4269648&code=YmlsZXRuaWtvdkBnbWFpbC5jb218NDI2OTY0OHwyMDcwNzk3NDQ4>
> .
> NAML<http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Best regards,
Sergei Biletnikov


-----
Kind regards,
Sergei
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Shipment-custom-method-implementation-tp4269648p4632083.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Shipment custom method implementation

Posted by Jacques Le Roux <ja...@les7arts.com>.
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