Price Rules Wierdness

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

Price Rules Wierdness

Walter Vaughan
ofBiz svn'ed to within last hour or so...

We were getting ready to make a second pass at importing our products more
correctly (we'll still need several more passes), and started to look at how we
will import items that get different discounts based upon product classification
and party classification.

What's weird is that the discounts work just fine if the LIST price is the same
as DEFAULT PRICE. For example we created two price rules that give us an
effective 10% discounts on certain items for customers that normally get 50% off
most everything in our catalog.

It looks like ProductPriceAction is the table that does the lifting...
productPriceRuleId productPriceActionSeqId productPriceActionTypeId   amount  
10000              01                      PRICE_POD                    -50.0
10001              01                      PRICE_POD                     40.0

In this case the first rule subtracts 50%, and the second one adds back 40%
giving us our effective 90%. It seem to work just fine with GZ-9290 if we made
the List and Default prices $100. The retail customer saw $100 and DemoCustomer
who was made part of a 50% Discount category saw it as $90 if we had rule 10001
in place or $50 if we removed the action for rule 10001.

What we did discover is that if we changed the list price of GZ-9290 to $200,
and left the default price as $100, that we got results that we didn't expect.

GZ-9290 List Price: $200.00 Your Price: $190.00 Save: $10.00 (5%)

What it seems to do is that price rules only apply values to the list price. In
this case it figures out what to subtract and then subtracts that from the list
price. We were expecting that it would compute the price based solely upon the
default price and use that for "Your Price".

I don't think this is a bug (except in my brain). I know you cannot delete
default price, however if you have a list price, that's the price that is
displayed, and all calculations are applied to the List price rather than the
calculated result.

If I change the actions at the top to PRICE_POL I get...
GZ-9290  List Price: $200.00   Your Price: $180.00   Save: $20.00 (10%)
which is correct (in that it's the correct discount for an item at $200 list)

If I delete the list price for GZ-9290 and change the rules to reflect against
default price I get...
GZ-9290   Your Price: $100.00
which is wrong, in my thinking, should it not say $90? Price rules don't apply
unless you have a list price?

If put only put the list price back in at $100 I get...
GZ-9290  List Price: $100.00   Your Price: $90.00   Save: $10.00 (10%)

I understand what's happening. All the calculations are correct, I just don't
understand how/why the list and default prices were decoupled the way they were.

Can anyone shed some light on this for us?

--
Walter

Reply | Threaded
Open this post in threaded view
|

Re: Price Rules Wierdness

David E Jones-2

This sounds like confusion with basic price rules stuff...

In essence price rule actions always start with the List Price, and  
then modify it however each action tells it to. So, if you start with  
the list price and then do other operations based on the Default  
Price (with the PRICE_POD, or Percent of Default, actions), then what  
you describe sounds exactly right.

If you don't want the List Price to be the basis of calculation you  
need to have your rule subtract off 100% of the List Price.

-David


On Dec 1, 2006, at 4:10 PM, Walter Vaughan wrote:

> ofBiz svn'ed to within last hour or so...
>
> We were getting ready to make a second pass at importing our  
> products more correctly (we'll still need several more passes), and  
> started to look at how we will import items that get different  
> discounts based upon product classification and party classification.
>
> What's weird is that the discounts work just fine if the LIST price  
> is the same as DEFAULT PRICE. For example we created two price  
> rules that give us an effective 10% discounts on certain items for  
> customers that normally get 50% off most everything in our catalog.
>
> It looks like ProductPriceAction is the table that does the lifting...
> productPriceRuleId productPriceActionSeqId  
> productPriceActionTypeId   amount  
> 10000              01                      
> PRICE_POD                    -50.0
> 10001              01                      
> PRICE_POD                     40.0
>
> In this case the first rule subtracts 50%, and the second one adds  
> back 40% giving us our effective 90%. It seem to work just fine  
> with GZ-9290 if we made the List and Default prices $100. The  
> retail customer saw $100 and DemoCustomer who was made part of a  
> 50% Discount category saw it as $90 if we had rule 10001 in place  
> or $50 if we removed the action for rule 10001.
>
> What we did discover is that if we changed the list price of  
> GZ-9290 to $200, and left the default price as $100, that we got  
> results that we didn't expect.
>
> GZ-9290 List Price: $200.00 Your Price: $190.00 Save: $10.00 (5%)
>
> What it seems to do is that price rules only apply values to the  
> list price. In this case it figures out what to subtract and then  
> subtracts that from the list price. We were expecting that it would  
> compute the price based solely upon the default price and use that  
> for "Your Price".
>
> I don't think this is a bug (except in my brain). I know you cannot  
> delete default price, however if you have a list price, that's the  
> price that is displayed, and all calculations are applied to the  
> List price rather than the calculated result.
>
> If I change the actions at the top to PRICE_POL I get...
> GZ-9290  List Price: $200.00   Your Price: $180.00   Save: $20.00  
> (10%)
> which is correct (in that it's the correct discount for an item at  
> $200 list)
>
> If I delete the list price for GZ-9290 and change the rules to  
> reflect against default price I get...
> GZ-9290   Your Price: $100.00
> which is wrong, in my thinking, should it not say $90? Price rules  
> don't apply unless you have a list price?
>
> If put only put the list price back in at $100 I get...
> GZ-9290  List Price: $100.00   Your Price: $90.00   Save: $10.00 (10%)
>
> I understand what's happening. All the calculations are correct, I  
> just don't understand how/why the list and default prices were  
> decoupled the way they were.
>
> Can anyone shed some light on this for us?
>
> --
> Walter
>