Hello,
I am writing some pricing optimizations for an online store. What I am trying to do is adjust the sale price based upon a combination of 3 factors...cost, weight, min advertised price (MAP).
I know I could code this in VB/ASP for web...not sure how to do it in an access query. Looking around here it looks as if I might be able to do it through a complex nesting of IIF statements too, but those would look messy.
Here is the logic I am trying to achieve...
Basically I am trying to build in some extra margin for low value orders that have high shipping costs and to let them reduce margin on big ticket orders.
item cost weight MAP sellprice
Thanks in advance,
John
I am writing some pricing optimizations for an online store. What I am trying to do is adjust the sale price based upon a combination of 3 factors...cost, weight, min advertised price (MAP).
I know I could code this in VB/ASP for web...not sure how to do it in an access query. Looking around here it looks as if I might be able to do it through a complex nesting of IIF statements too, but those would look messy.
Here is the logic I am trying to achieve...
Code:
If cost <25
if weight<1
sellprice=cost*1.3
if sellprice<MAP
[sellprice=MAP
end if
elseif
sellprice=cost*1.3+3
if sellprice<MAP
sellprice=MAP
end if
end if
end if
If cost >=25 and <50
'if weight...etc etc with maybe 5 cost brackets like this total.
item cost weight MAP sellprice
Code:
1 10 .5 null 13 2 10 2 null 16 3 10 3 40 40 4 40 2 null XXetc
John
Comment