[ic] Pricing question
Denis Heinrichs
interchange-users@icdevgroup.org
Thu Feb 6 14:32:00 2003
Hi,
Can anyone help me to find the best way to calculate the price based
upon the following criteria?
Each user has a pricing level (retail, level1, level2, level3) assigned
to them.
In my products table, I have fields for price, level1, level2 and level3.
I also have a discounts tables, which has the current monthly specials.
The is keyed on the sku
and also has the same four field names as above. These fields contain
the discounted price.
The final price should be the lowest value of: the retail price, their
pricing level price, and the discounted price
at their pricing level. The price in the database will show 0, if that
pricing level isn't being used.
Also, not all items will be in the discounts table, only the items on sale.
I am not sure of the direction I should be going here....I can probably
calculate the price based upon a whole
pile of sql queries and some calculations, but I am wondering if there
is a better way? I don't want to copy
this code to all of my pages.
Is there a way maybe using common adjust or something, or a usertag?
Any help would be greatly appreciated.
Denis Heinrichs