[ic] adjusting price total instead of individual items
mike at perusion.com
Mon Feb 18 05:47:57 EST 2008
Quoting Matthew Daniels (mpd at krilion.net):
> How do I handle the case where the price break for buying a large amount
> of items needs to match a specific (round number) total? For example,
> if you buy 500, the subtotal should be 660, so I set the q500 price to
> 1.32 and it works as expected. But for the 350 tier, the subtotal
> should be 506, which results in a per-item price that is not a repeating
> decimal. If I put a very precise number in there it works, but I'm
> worried about rounding errors. Should I be?
Yes, you should be.
Interchange has no such feature, and as long as it is described
as 350 of anything it would be difficult to achieve. Pricing is
designed to be multiplicative.
One possibility would be to write code that would consolidate
multiple units into one pack of 350 as they reached that amount.
Then the price for that unit could be made 506 with no problem.
Another possibility would be to do the pricing with decimal
math, which I have thought about but never acted on. That would
have the advantage of repeatability, but that wouldn't help your
case of someone buy 351 of something.
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Opportunity is missed by most people because it is dressed in
overalls and looks like work. -- Thomas Edison
More information about the interchange-users