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