Hi,
Just To support the comments below we also customized the services like
shippingcosts service ,mail service.. and to do that customization remeber that
this service changes will be used by the frame work at all levels (i mean
calls).
You can customize this just by writing the service and giving the location to
your class.Service name have to be retained as they are now.....so that ofbiz
takes care of handling calls
Service framework is great and is configurable tooo...(For whatever contexts we
used the we were comfortable).
Regards
Sharad
Jonathon -- Improov <[EMAIL PROTECTED]> wrote: Yes, overriding that method will
mean you won't touch the OFBiz codes. That could mean you can
continue to use your custom method, while still conveniently watching the
community's updates to
the original method.
Such a method override will also kinda "document" your custom method as "being
related to some
original OFBiz method", so you know what original OFBiz codes to use for
side-by-side comparisons
of your codes. Making huge overhauls to the original method can make it
difficult to do such
comparisons.
One gotcha here. Make sure you fully understand the original method you're
overriding, so that you
don't break any dependencies on that method.
As far as possible, I do try to touch as few OFBiz codes as possible. If any
OFBiz codes need to
be enhanced, it is possibly to make them more generic and more base-level or
more fine-grained or
more customizable building blocks.
Jonathon
[EMAIL PROTECTED] wrote:
> I have had another discussion about pricing with my customer today and the
> pricing is more complicated that I remembered. Their pricing is based on a
> percentage above cost and package quantity, i.e. 30% above cost for one
> package (12 pieces), 25% above cost for 2 packages (24 pieces), and 100
> percent above cost for any broken package plus a fixed abount depending on
> cost, i.e. + a buck for all below 1 dollar, + 2 for all below 5 and nothing
> for above 10.
>
> This is outside what I see in the ofbiz pricing module in
> PriceServices.java, and so it appears as if I will have to write my own
> price calculation service.
>
> What I would like to do is write a subclass of PriceServices so my
> "calculateProductPrice" subclass gets called whenever
> runSync("calculateProductPrice") gets called. I would like to do this in
> such a way that I don't bother the core Ofbiz code as I'll still be using
> the shoppingcart, etc.
>
> Can anyone offer any advice or point me to samples?
>
> Skip
>
>
---------------------------------
Download prohibited? No problem. CHAT from any browser, without download.